Skip to content

[Bug]: Curve styles gets mixed up when edited in the Curves Tab of Figure Options (Edit Axis) #22384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gabrovche opened this issue Feb 3, 2022 · 1 comment
Milestone

Comments

@gabrovche
Copy link

gabrovche commented Feb 3, 2022

Bug summary

This happens when QT5, resp. Automatic backend is selected in Preferences (I'm using WinPython 3.9.10).
I have fixed the _exec() bug on in my edition to avoid the figure to freeze on dialogue close - that's why reporting to the 3.5.2 branch, even though I'm using matplotlib 3.5.1.
How to reproduce:
If a figure have multiple curves with different styles (dashed, continuous, doted, etc.) and one edits their Labels in the Curves Tab of Figure Options dialogue (invoked by clicking on Edit Axes button on the top of the figure) the line styles get get "scrambled" upon hitting Apply or OK button.
E.g. the Code snippet below produced a figure like the one shown in "expected outcome". Upon editing the default _child0,_child1,_child2 titles like this:
_child2 -> Test
_child1 -> Test 3
_child0 -> do not edit
Then the figure gets updated to the state depicted in "actual outcome" - i.e. line styles are scrambled.
Derived from the "new colors/styles" I suspect that the list of curves/styles gets "re-sorted" and the new curve positions are wrongly mapped!

Code for reproduction

figure()
plot([1,0],[1,1],'--')
plot([0,0],[0,1],'-')
plot([0,1],[1,0],'-.')

Actual outcome

grafik

Expected outcome

grafik

Additional information

No response

Operating system

Windows 10

Matplotlib Version

3.5.1, with _exec() fix applied

Matplotlib Backend

QT5

Python version

3.9.10

Jupyter version

No response

Installation

No response

@QuLogic
Copy link
Member

QuLogic commented Feb 3, 2022

This has already been fixed by #22208.

@QuLogic QuLogic closed this as completed Feb 3, 2022
@QuLogic QuLogic added this to the v3.5.2 milestone Feb 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants