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

FR: Add save button to the window opened up by Makie #208

Open
Datseris opened this issue Nov 2, 2018 · 11 comments
Open

FR: Add save button to the window opened up by Makie #208

Datseris opened this issue Nov 2, 2018 · 11 comments
Labels
feature request gui All GUI related improvements Makie Backend independent issues (Makie core)

Comments

@Datseris
Copy link
Contributor

Datseris commented Nov 2, 2018

Super - duper - convenient :)

When a plot is shown, it is very helpful to add a save button to this interactive window opened up by makie!

@mschauer
Copy link
Contributor

mschauer commented Nov 2, 2018

I suppose this will save the window with the current camera settings? Is there a corresponding functionality to save already?

@Datseris
Copy link
Contributor Author

Datseris commented Nov 2, 2018

I suppose this will save the window with the current camera settings?

Yeap this is why it is super convenient, because it uses the figure I got after moving around / zooming / rotating, and I believe it is so much easier to do this with the mouse than to start testing numbers upon numbers with a save command

@SimonDanisch
Copy link
Member

you mean save a png or serialize the scene to a file or something yet different?

@mkborregaard
Copy link
Contributor

Matplotlib has this as a button on the window, which to my aesthetics makes for a rather clunky plot window. Plotly has it as an invisible mouseover in the top right corner, if you do decide to implement this that would be prettier. But could an alternative be to have save(scene) be sensitive to the current state of the scene window? Would make sense I think.

@Datseris
Copy link
Contributor Author

Datseris commented Nov 2, 2018

I mean save a png @SimonDanisch

@mschauer
Copy link
Contributor

mschauer commented Nov 3, 2018

Rather, save(scene) can have a default to do one thing and an option to do the other.

@Datseris
Copy link
Contributor Author

Datseris commented Nov 3, 2018

I think you are misjudging the power that this button provides... and in general the power of the buttons of the window of matplotlib should not be understated. Just yesterday I was trying to solve a question in a quantum transport simulation. Both the save button as well as the "undo" button, which undoes the last zoom action of he user, where very useful for my work.

This goes way beyond development and touches the user's work, so you should look at it from a different perspective as well.

@mkborregaard
Copy link
Contributor

I'm not very familiar with matplotlib, but should things like zooming not be handled easily in makie with mouse interaction?

@Datseris
Copy link
Contributor Author

Datseris commented Nov 4, 2018

To the best of my knowledge you can't (not yet) zoom in a rectangle with make. You can only use the scroll wheel. Of course this is trivial to undo with rolling the wheel back, but if you zoom in a rectangle that is also displaced an undo button is much more powerful.

@SimonDanisch
Copy link
Member

Yes, you can, space + left drag ;)
It's very easy to implement those buttons.
Just add it and hook it up to save(scene) ;)

History is a bit more involved, but basically boils down to add a vector of camera states to the camera, and save the old state in this function:
https://github.com/JuliaPlots/AbstractPlotting.jl/blob/master/src/camera/camera2d.jl#L65
and connect a button to it as well ;)

@mkborregaard
Copy link
Contributor

IMHO, if you do choose to put buttons on the image frame, it would be great if they were opt-in (or opt-out).

@ffreyer ffreyer added enhancement Feature requests and enhancements Makie Backend independent issues (Makie core) gui All GUI related improvements feature request and removed enhancement Feature requests and enhancements labels Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request gui All GUI related improvements Makie Backend independent issues (Makie core)
Projects
None yet
Development

No branches or pull requests

5 participants