Skip to content
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

Move plots in Plots pane #12158

Closed
OverLordGoldDragon opened this issue Apr 6, 2020 · 19 comments · Fixed by #22029
Closed

Move plots in Plots pane #12158

OverLordGoldDragon opened this issue Apr 6, 2020 · 19 comments · Fixed by #22029

Comments

@OverLordGoldDragon
Copy link
Contributor

Possible? I currently have to re-plot stuff to order them a certain way for viewing, which can be quite expensive. The Plots pane is nice for directly comparing images, but this feature seems absent.

@goanpeca
Copy link
Member

goanpeca commented Apr 6, 2020

@jnsebgosselin what do you think?

@ccordoba12
Copy link
Member

Nice suggestion @OverLordGoldDragon! It shouldn't be that hard to implement (I think).

@jnsebgosselin
Copy link
Member

jnsebgosselin commented Apr 6, 2020

Do you mean moving up and down the plots in the thumbnail scrollbar?

If it is implemented with toolbuttons like for the Python path manger, this will be easy. If it needs to be done with some kind of drag and drop feature, this will be harder.

image

@tstreibl
Copy link

tstreibl commented Apr 6, 2020

Would be great to combine this with a full size view of the thumb upon double click? Ideally you could scroll through your thumbs with "image up", "image down" keys in full size view. Maybe the magnifying glass icons already serve this purpos, but in my case they are disabled, at least for mathplotlib pictures.

@OverLordGoldDragon
Copy link
Contributor Author

@jnsebgosselin Yeah, in the thumbnail scrollbar. Drag & drop doesn't really matter - though it'd be even better if it had shortcuts.

@tstreibl Do you mean like below? You can undock the Plots pane and drag away the thumbnail bar to maximize view size.

image

Plot code
import numpy as np
import matplotlib.pyplot as plt

def pplot(r, w=1, h=1):
    plt.polar(r)
    plt.gcf().set_size_inches(18 * w, 18 * h)

pplot(- np.linspace(0, 1, 300)**12)
pplot(np.exp(- np.linspace(0, 1, 400)))
pplot(np.linspace(0, 1, 300) ** 2)

@tstreibl
Copy link

tstreibl commented Apr 6, 2020

Wow - did't realize that it's so easy. Sorry that I did't get it. Problem solved. Thanks.

@jnsebgosselin
Copy link
Member

Maybe the magnifying glass icons already serve this purpos, but in my case they are disabled, at least for mathplotlib pictures.

They are disabled when Fits plot to window is checked.

image

@tstreibl
Copy link

tstreibl commented Apr 6, 2020

komplete shame on me. Thanks.

@jnsebgosselin
Copy link
Member

No worries, it's not like it was well documented and you are not the first confused by this. Maybe we need to change that to make it less confusing...

@tstreibl
Copy link

tstreibl commented Apr 6, 2020

It's intuitive and fit's together once you decide to play around with the docking capabilities. I like that it's also easy to redock, so it's in deed a full featured image viewer. Great.

@OverLordGoldDragon
Copy link
Contributor Author

OverLordGoldDragon commented Feb 25, 2022

Any progress? Am willing to contribute, with some guidance

If it is implemented with toolbuttons like for the Python path manger, this will be easy.

Sounds good

@OverLordGoldDragon
Copy link
Contributor Author

Pinging in case notifs failed, @jnsebgosselin @ccordoba12

@jnsebgosselin
Copy link
Member

Ok, I should have time to work on this in the following week. I agree this feature would be very usefull.

@OverLordGoldDragon
Copy link
Contributor Author

@jnsebgosselin My main use case by far is executing some IPython code twice with an altered parameter, then comparing the resulting images. To me this is best done in an "overlapped" manner, just without overlapping - by pressing up and down arrow keys and changing between the images, effectively a GIF. When it's just one image, it can already be done, no problem.

In additional to manual sorting, it'd be great if there was a feature to automatically arrange images this way - like

0 1 2 3 4 5
-->
0 3 1 4 2 5

@jnsebgosselin
Copy link
Member

Thanks for your feedback @OverLordGoldDragon and sorry for not implementing this sooner. I am going to start on this next week, for real this time XD.

@OverLordGoldDragon
Copy link
Contributor Author

@jnsebgosselin Glad it's being worked on at all!

@OverLordGoldDragon
Copy link
Contributor Author

It can't be helped if I'm the only one asking, but, I'd still appreciate this feature. I understand if it's out of scope though.

@ccordoba12
Copy link
Member

Sorry for the long delay in addressing this one. I took a look at it today and managed to implement it quickly thanks to this resource on the web:

https://www.pythonguis.com/faq/pyqt-drag-drop-widgets/

So, I'm marking it for 6.0 beta1, to be released in two or three weeks.

@ccordoba12 ccordoba12 added this to the v6.0beta1 milestone Mar 30, 2024
@OverLordGoldDragon
Copy link
Contributor Author

Thank you! This is great for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants