Changeset 2654 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jan 22, 2017 2:28:44 PM (6 years ago)
Author:
toby
Message:

improve ComputeAllPDF progress msg; PDF contour plot: change G(r)_min

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2653 r2654  
    22932293    new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Error analysis','mpl')
    22942294    if new:
     2295        G2frame.Cmin = 0.0
    22952296        G2frame.Cmax = 1.0
    22962297    # save information needed to reload from tree and redraw
     
    23522353    or multiple plots with waterfall and contour plots as options
    23532354    '''
     2355    G2frame.ShiftDown = False
    23542356    if not plotType:
    23552357        plotType = G2frame.G2plotNB.plotList[G2frame.G2plotNB.nb.GetSelection()]
     
    23572359        return
    23582360   
     2361    def OnPlotKeyUp(event):   
     2362        if event.key == 'shift':
     2363            G2frame.ShiftDown = False
     2364            return
     2365       
    23592366    def OnPlotKeyPress(event):
     2367        if event.key == 'shift':
     2368            G2frame.ShiftDown = True
     2369            return
    23602370        newPlot = False
     2371        if G2frame.ShiftDown: event.key = event.key.upper()
    23612372        if event.key == 'u':
    23622373            if G2frame.Contour:
     
    23692380            elif Page.Offset[1] > 0.:
    23702381                Page.Offset[1] -= 1.
     2382        elif event.key == 'U':
     2383            G2frame.Cmin += (G2frame.Cmax - G2frame.Cmin)/20.
     2384        elif event.key == 'D':
     2385            G2frame.Cmin -= (G2frame.Cmax - G2frame.Cmin)/20.
    23712386        elif event.key == 'l':
    23722387            Page.Offset[0] -= 1.
     
    24432458    else:
    24442459        newPlot = True
     2460        G2frame.Cmin = 0.0
    24452461        G2frame.Cmax = 1.0
    24462462        Page.canvas.mpl_connect('key_press_event', OnPlotKeyPress)
     2463        Page.canvas.mpl_connect('key_release_event', OnPlotKeyUp)
    24472464        Page.canvas.mpl_connect('motion_notify_event', OnMotion)
    24482465        Page.Offset = [0,0]
     
    24512468    if G2frame.Contour:
    24522469        Page.Choice = (' key press','d: lower contour max','u: raise contour max',
    2453             'i: interpolation method','s: color scheme','c: contour off','f: select data')
     2470            'D: lower contour min','U: raise contour min',
     2471            'i: interpolation method','s: color scheme','c: contour off','f: select data',
     2472            )
    24542473    else:
    24552474        Page.Choice = (' key press','l: offset left','r: offset right','d: offset down','u: offset up',
     
    25302549    if G2frame.Contour and len(Pattern)>1:
    25312550        acolor = mpl.cm.get_cmap(G2frame.ContourColor)
    2532         Img = Plot.imshow(ContourZ,cmap=acolor,vmin=0,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate,
     2551        Img = Plot.imshow(ContourZ,cmap=acolor,vmin=Ymax*G2frame.Cmin,vmax=Ymax*G2frame.Cmax,interpolation=G2frame.Interpolate,
    25332552            extent=[ContourX[0],ContourX[-1],ContourY[0],ContourY[-1]],aspect='auto',origin='lower')
    25342553        Page.figure.colorbar(Img)
Note: See TracChangeset for help on using the changeset viewer.