holoviz-topics / EarthSim

Tools for working with and visualizing environmental simulations.
https://earthsim.holoviz.org
BSD 3-Clause "New" or "Revised" License
65 stars 21 forks source link

Saving plots #201

Open kcpevey opened 6 years ago

kcpevey commented 6 years ago

There is a save button in the drawing tools, but I can't find the image that it saves. What is the save location?

If I want to automatically generate png images (suppose I'm running a notebook via Lancet) - what is the best approach? I've come across something like this:

gv.renderer('bokeh')
save(file, 'output')

Would that be the best approach for auto-generated (without button clicking) save?

kcpevey commented 6 years ago

There is a save button in the drawing tools, but I can't find the image that it saves. What is the save location?

loading a tile source breaks the save button in the drawing toolbar due to an unsolvable security issue

kcpevey commented 6 years ago

163

philippjfr commented 6 years ago

Just to summarize what we discussed in the last meeting. The basic issue is that we need some way of reconstituting a plot, including all the drawing tool state, on the Python side so that we can run the selenium based png export. Since it is generally useful functionality to be able to save the state of annotators to file and restore the state, we should focus on having the annotators provide methods to:

a) Return a HoloViews object containing all the current state b) Provide a method to save the object to files c) Provide a method to restore an annotator from such a file

Once we have a) then we will get png export for free.