Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Line labels don't update in the legend after changing them through the Qt4Agg dialog box #2934

Closed
@anykraus

Description

@anykraus

Win7 64bit, using WinPython 64bit 3.3.3.3:
Python 3.3.3, NumPy 1.8.0, SciPy 0.13.3, Matplotlib 1.3.1, guidata 1.6.1, guiqwt 2.3.2

Assume you plot something using Qt4Agg (which seems to be the default) e.g.:

import matplotlib as mpl
mpl.use('Qt4Agg') #debug (qt4agg has problems with changing legend labels using its own dialog box/widget...)
import matplotlib.pyplot as plt
import numpy as np

plt.plot(np.arange(20), np.sin(np.arange(20)), label='coarse sine')
plt.legend()
plt.show()

Then the plot opens in a new window.
Click: "Edit curves line and axes parameter" (Button with the checked checkbox.) -> new window "Figure options"
Choose tab: "Curves"
Pick a curve from the drop-down menu.
Change its "Label".
Click: "Apply"
Click: "OK"

Result: The legend keeps showing the old label. (Going back to the "Figure options" dialog shows the curve with its new label.)

Expected: The legend shows the new label.

Other things in the "Figure options" dialog only update the curve as soon as you click apply. (Color, Marker, Line style, ...) The legend in contrast is not updated. e.g. changing the color in the plot is successful, but in the legend the old color stays.

Edit: Other changes also do not apply to the legend.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions