Changeset 2454 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Aug 27, 2016 6:54:08 AM (7 years ago)
Author:
vondreele
Message:

make clip_on configurablle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2453 r2454  
    2525import matplotlib as mpl
    2626import mpl_toolkits.mplot3d.axes3d as mp3d
     27import config as cfg
    2728import GSASIIpath
    2829GSASIIpath.SetVersionNumber("$Revision$")
     
    15141515                backDict['FixedPoints'].append(xy)
    15151516                Plot = Page.figure.gca()
    1516                 Plot.plot(event.xdata,event.ydata,'rD',clip_on=True,picker=3.)
     1517                Plot.plot(event.xdata,event.ydata,'rD',clip_on=cfg.clip_on,picker=3.)
    15171518                Page.canvas.draw()
    15181519                return
     
    18751876                    if 'PWDR' in plottype:
    18761877                        Plot.set_yscale("log",nonposy='mask')
    1877                         Plot.plot(X,Y,colors[N%6]+pP,picker=3.,clip_on=True)
     1878                        Plot.plot(X,Y,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)
    18781879                        Plot.plot(X,Z,colors[(N+1)%6],picker=False)
    18791880                        Plot.plot(X,W,colors[(N+2)%6],picker=False)     #background
     
    18931894                                if G2frame.sqPlot:
    18941895                                    Plot.errorbar(X,YB,yerr=X**4*Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])),
    1895                                         ecolor=colors[N%6],picker=3.,clip_on=True)
     1896                                        ecolor=colors[N%6],picker=3.,clip_on=cfg.clip_on)
    18961897                                else:
    18971898                                    Plot.errorbar(X,YB,yerr=Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])),
    1898                                         ecolor=colors[N%6],picker=3.,clip_on=True)
     1899                                        ecolor=colors[N%6],picker=3.,clip_on=cfg.clip_on)
    18991900                            else:
    1900                                 Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=True)
     1901                                Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)
    19011902                            Plot.plot(X,W,colors[(N+2)%6],picker=False)     #const. background
    19021903                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
     
    19061907                    DZ = xye[3]*np.sqrt(xye[2])
    19071908                    DS = xye[5]*np.sqrt(xye[2])-Ymax*Pattern[0]['delOffset']
    1908                     ObsLine = Plot.plot(X,DY,colors[N%6]+pP,picker=3.,clip_on=True)         #Io/sig(Io)
     1909                    ObsLine = Plot.plot(X,DY,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)         #Io/sig(Io)
    19091910                    Plot.plot(X,DZ,colors[(N+1)%6],picker=False)                    #Ic/sig(Io)
    19101911                    DifLine = Plot.plot(X,DS,colors[(N+3)%6],picker=1.)                    #(Io-Ic)/sig(Io)
     
    19131914                    if G2frame.SubBack:
    19141915                        if 'PWDR' in plottype:
    1915                             Plot.plot(Xum,Y-W,colors[N%6]+pP,picker=False,clip_on=True)  #Io-Ib
     1916                            Plot.plot(Xum,Y-W,colors[N%6]+pP,picker=False,clip_on=cfg.clip_on)  #Io-Ib
    19161917                            Plot.plot(X,Z-W,colors[(N+1)%6],picker=False)               #Ic-Ib
    19171918                        else:
    1918                             Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=True)
     1919                            Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)
    19191920                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
    19201921                    else:
    19211922                        if 'PWDR' in plottype:
    1922                             ObsLine = Plot.plot(Xum,Y,colors[N%6]+pP,picker=3.,clip_on=True)    #Io
     1923                            ObsLine = Plot.plot(Xum,Y,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)    #Io
    19231924                            Plot.plot(X,Z,colors[(N+1)%6],picker=False)                 #Ic
    19241925                        else:
    1925                             Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=True)
     1926                            Plot.plot(X,YB,colors[N%6]+pP,picker=3.,clip_on=cfg.clip_on)
    19261927                            Plot.plot(X,ZB,colors[(N+1)%6],picker=False)
    19271928                    if 'PWDR' in plottype:
     
    20432044                else:
    20442045                    break
    2045             Plot.plot(x,y,'rD',clip_on=True,picker=3.)
     2046            Plot.plot(x,y,'rD',clip_on=cfg.clip_on,picker=3.)
    20462047    if not newPlot:
    20472048        # this restores previous plot limits (but I'm not sure why there are two .push_current calls)
Note: See TracChangeset for help on using the changeset viewer.