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!
I suppose this will save the window with the current camera settings? Is there a corresponding functionality to save already?
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
you mean save a png or serialize the scene to a file or something yet different?
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.
I mean save a png @SimonDanisch
Rather, save(scene) can have a default to do one thing and an option to do the other.
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.
I'm not very familiar with matplotlib, but should things like zooming not be handled easily in makie with mouse interaction?
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.
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 ;)
IMHO, if you do choose to put buttons on the image frame, it would be great if they were opt-in (or opt-out).