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

Support static screenshot mode including widgets #6339

Open
droumis opened this issue Jul 23, 2024 · 0 comments
Open

Support static screenshot mode including widgets #6339

droumis opened this issue Jul 23, 2024 · 0 comments
Labels
TRIAGE Needs triaging

Comments

@droumis
Copy link
Member

droumis commented Jul 23, 2024

Currently hv.output(example_holomap, fig='png') will not return a 'png' of the plot + widget as a '.png' - what I would call a 'screenshot' mode. I don't believe there is currently a way to do this.

This functionality would come in handy when building a notebook that displays incremental steps in building an application, but you do not want interactive versions of the intermediate steps of the application, and you don't want to have to save a png to file.

Code
import numpy as np
import holoviews as hv
hv.extension('bokeh')

frequencies = [0.5, 0.75, 1.0, 1.25]

def sine_curve(phase, freq):
    xvals = [0.1* i for i in range(100)]
    return hv.Curve((xvals, [np.sin(phase+freq*x) for x in xvals])).opts(tools=['hover'])

curve_dict = {f:sine_curve(0,f) for f in frequencies}

hmap = hv.HoloMap(curve_dict, kdims='frequency')
hv.output(hmap, fig='png') # same interactive result as just running `hmap`
@droumis droumis added the TRIAGE Needs triaging label Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Needs triaging
Projects
None yet
Development

No branches or pull requests

1 participant