Linking plot axes in different plots

Hi guys

I'm building a small application with a layout based on the CWT demo with two graphs showing the original data and the transform.

How can I link the horizontal axes of both plots? I want any zooming horizontally to be reflected in both plots, with any vertical zooming to be contained only to the plot that it was done it.

I'm agnostic on how to achieve or implement this, be it using the zoom box left mouse click, or some sort of scroll bar.

Thanks


Matthew
And of course, as soon as I post about it, I find a solution. (don't know if it is the optimum one though...)

I've got some SetVariable boxes to take values, and an "Update plots" button to press.

The button is linked to the following proc:
function updateCWTWindowProc(ctrlName) : ButtonControl
    String ctrlName

    Variable autoScaleInt=0
    ControlInfo/W=PeakPanel peakAutoScaleIntCheck
    if(V_Value)
        autoScaleInt=1
    endif

    NVAR cwtColour  =root:Packages:PeakPanelFolder:cwtColour
    NVAR xAxisMin   =root:Packages:PeakPanelFolder:xAxisMin
    NVAR xAxisMax   =root:Packages:PeakPanelFolder:xAxisMax
   
    //CWT window
    SetActiveSubwindow PeakPanel#G0
    ModifyImage M_CWT ctab= {-cwtColour,cwtColour,RedWhiteBlue,0}
    SetAxis bottom xAxisMin,xAxisMax

    //Data window
    SetActiveSubwindow PeakPanel#G1
   
    if(autoScaleInt)
        SetAxis/A=2 //autoscales the Y axis to match the values in the current X range
    else
        //Need a way to preserve the values that I already have
        GetAxis /Q left
        SetAxis /A //clears any previous autoscaling
        SetAxis left V_min, V_max
    endif
   
    SetAxis bottom xAxisMin,xAxisMax
       
    SetActiveSubwindow PeakPanel
       
end