Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

changing facecolor to 'none' prevents updating canvas #8282

Copy link
Copy link
Closed
@birnstiel

Description

@birnstiel
Issue body actions

Bug report

Bug summary

line.set_ydata should update a drawn line, however this seems to break under some circumstances, depending on the background color.

Code for reproduction

fig,ax = plt.subplots(facecolor='none')
ax.set_facecolor('none')

plt.subplots_adjust(left=0.25, bottom=0.25)
plt.axis([0, 4, 0,2])
l, = ax.plot([1,2,3],[1,0,1])
ax.set_title('down')
def update():
    l.set_ydata([1,2,1])
    ax.set_title('up')

this creates a 'v' shape with title 'down' as expected, but then calling update()

leads to this:

ohne titel

It continuously draws over the previous plot. fig.canvas.draw() doesn't help, but if I fig.savefig('test.jpg') it updates correctly.

If the axis background is set to something else but 'none' , the lines updates correctly, but the title doesn't. The title only update correctly, if also the figure background is something else but 'none'.

Expected outcome

  • The update function should immediately update the interactive figure.

Matplotlib version

  • Matplotlib version: 2.0.0
  • Python version: 3.6.0 (but same issue with 2.7.13)
  • Platform: OSX
  • How did you install Matplotlib and Python: anaconda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.