Changeset 1907 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jun 24, 2015 12:23:55 PM (7 years ago)
Author:
vondreele
Message:

comment out the G2plotNB.clear in OnRefine? so that the new plot will have the same limits as the old one before refinement

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1898 r1907  
    14201420        plotNum = G2frame.G2plotNB.plotList.index('Powder Patterns')
    14211421        Page = G2frame.G2plotNB.nb.GetPage(plotNum)
    1422         if not newPlot:
    1423             Plot = Page.figure.gca()          #get previous powder plot & get limits
    1424             xylim = Plot.get_xlim(),Plot.get_ylim()
     1422        Plot = Page.figure.gca()          #get previous powder plot & get limits
     1423        G2frame.xylim = Plot.get_xlim(),Plot.get_ylim()
    14251424        Page.figure.clf()
    14261425        Plot = Page.figure.gca()          #get a fresh plot after clf()
     
    18701869    if not newPlot:
    18711870        Page.toolbar.push_current()
    1872         Plot.set_xlim(xylim[0])
    1873         Plot.set_ylim(xylim[1])
     1871        Plot.set_xlim(G2frame.xylim[0])
     1872        Plot.set_ylim(G2frame.xylim[1])
    18741873#        xylim = []
    18751874        Page.toolbar.push_current()
    18761875        Page.toolbar.draw()
    18771876    else:
     1877        G2frame.xylim = Plot.get_xlim(),Plot.get_ylim()
    18781878        Page.canvas.draw()
    18791879    olderr = np.seterr(invalid='ignore') #ugh - this removes a matplotlib error for mouse clicks in log plots
Note: See TracChangeset for help on using the changeset viewer.