Replies: 1 comment 4 replies
-
I would just make a second figure with one subplot and display the data in the clicked subplot, something like (not tested, just to give you an idea): fig_many = fpl.Figure(shape=(m, n))
fig_detailed = fpl.Figure(shape=(1, 1))
# add graphics to your subplots etc, I recommend naming them for convenience
# initialize the detailed fig with data from the first subplot
fig_detailed[0, 0].add_line_collection(fig_many[0, 0]["line-coll"].data[:], colors=line_stack.data[:], name="line-collection") # set any other properties you want
@fig_many.renderer.add_event_handler("click")
def fig_many_clicked(ev):
for subplot in fig_many:
pos = (ev.x, ev.y)
if subplot.map_screen_to_world(pos) is not None:
# this is the subplot that has been clicked, set the data of the line collection in the detailed subplot
for g in subplot["line-collecection"].graphics:
fig_detailed[0, 0]["line-collection"].data = g.data[:] If your lines are huge and GPU VRAM is a real concern you can share the buffer, but if you're plotting multiple lines to start with I'm assuming that's not an issue here. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi
I am looking at a lot of (stacked) time series grouped by some criteria. I would like to be able to click on one of the graphs in the example below and have a new pop-up window showing a larger version of the graph. Is this possible with current features?
Beta Was this translation helpful? Give feedback.
All reactions