@@ -1705,6 +1705,9 @@ def drawTicks(Phases,phaseList,group=False):
17051705 # N.B. above creates two Line2D objects, 2nd is ignored.
17061706 # Not sure what each does.
17071707 elif Page .plotStyle .get ('flTicks' ,0 ) == 1 : # full length tick-marks
1708+ # axvline changes plot limits, triggering onGroupXlimChanged
1709+ # so turn that off for now.
1710+ G2frame .stop_onGroupXlimChanged = True
17081711 if len (xtick ) > 0 :
17091712 # create an ~hidden tickmark to create a legend entry
17101713 Page .tickDict [phase ] = Plot .plot (xtick [0 ],0 ,'|' ,mew = 0.5 ,ms = l ,
@@ -1713,17 +1716,26 @@ def drawTicks(Phases,phaseList,group=False):
17131716 Plot .axvline (xt ,color = plcolor ,
17141717 picker = 3. ,
17151718 label = '_FLT_' + phase ,lw = 0.5 )
1719+ del G2frame .stop_onGroupXlimChanged
17161720
17171721 # Callback used to update y-limits when user zooms interactively (from MG/Cl Sonnet)
17181722 def onGroupXlimChanged (ax ):
17191723 '''Callback to update y-limits for all panels in group plot when x-range changes.
17201724 We calculate the global y-range across all panels for the visible x-range,
17211725 then explicitly set y-limits on ALL panels.
17221726
1723- This currently allows the y-limit to be set manually for one plot. If
1724- a second one is changed, the previous manual change is lost.
1725- I wonder if we can identify which plots have manual changes.
1727+ This code behaves a bit funny w/r to zoom or pan of one plot in a group
1728+ in that the plot that is modified can have its y-axis range changed,
1729+ but if the another plot is changed, then the previous plot is given the
1730+ same y-range as all the others, so only one y-range can be changed.
1731+ Perhaps this is because the zoom/pan is applied after the changes
1732+ here are applied.
1733+
1734+ To do better, we probably need a mode that unlocks the coupling of
1735+ the y-axes ranges.
17261736 '''
1737+ if getattr (G2frame ,'stop_onGroupXlimChanged' ,False ):
1738+ return # disable this routine when needed
17271739 xlim = ax .get_xlim ()
17281740 # Save x-limits for persistence across refinements
17291741 if (plotOpt ['sharedX' ] and
0 commit comments