Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/matplotlib/backends/qt_editor/figureoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ def apply_callback(data):

# Redraw
figure = axes.get_figure()
axes.legend()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of the block of code above this is to only do this if the user has asked. This will unconditionally add a legend, even if the user did not have one before and will destroy any non-default legend the user has created.

figure.canvas.draw()

data = formlayout.fedit(datalist, title="Figure options", parent=parent,
Expand Down