I am trying to create a pair of scatter plots on the same figure
If scatter plot 1 is zoomed or panned I want to redisplay scatter plot 2 such that only the new data set is displayed
The sub plots share the same underlying dataset but don’t share equivalent axes so I can;t use sharex, sharey etc., .e.g. scatterplot 2 is the result of applying a different function to the same data shown in scatterplot 1 that results in different axes
I think I need to somehow extract the data set displayed each tme scatter plot 1 is zoomed/panned and pass that data to the function that plots scatter plot 2 but I cannot find any info on how this could be done
must be very common – i’m surprised I haven’t unearthed any cook-book type scripts for it
i have had some luck with returning sets of scatter point indices using the ‘picker’ event – what i really need is something that returns the scatter point indices for all visible points triggered after a zoom/pan event
You can retrieve the axes view intervals:
Then use the intervals to determine which points are visible in the first subplot and use that to decide what/how to show the second subplot. For example: