MATLAB: Link the plots(NOT LINKAXES)

MATLABplotsubplotzoom

Hi! I am trying to link the plots for example the line and the histogram. So, I have a set of data and I am plotting both line and histogram in the same figure as subplot. So i want a functionality that when I zoom in the line plot it even zooms in the hisogram(not linkaxes). what I mean is when I zoom in the line plot the histogram should recalulate itself and plot according to the zoom in data of the line plot and vice versa.

Best Answer

Create a zoom ActionPostCallback https://www.mathworks.com/help/matlab/ref/zoom.html#brux2aq that recalculates the histogram
Related Question