Changeset 2311 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jun 7, 2016 2:30:49 PM (7 years ago)
Author:
vondreele
Message:

add tracking of 5 user selected reflection phases during charge flipping. Could be instructive...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r2310 r2311  
    24302430           
    24312431def PlotXY(G2frame,XY,XY2=None,labelX=None,labelY=None,newPlot=False,
    2432     Title='',lines=False,names=[]):
     2432    Title='',lines=False,names=[],names2=[]):
    24332433    '''simple plot of xy data, used for diagnostic purposes
    24342434    '''
     
    24802480        Page.Offset = [0,0]
    24812481   
    2482     if len(XY2) > 1:
     2482    if XY2 and len(XY2) > 1:
    24832483        Page.Choice = (' key press','l: offset left','r: offset right','d: offset down',
    24842484            'u: offset up','o: reset offset',)
     
    25052505        Ymax = max(Ymax,max(Y))
    25062506        if lines:
    2507             Plot.plot(X,Y,colors[ixy%6],picker=False)
     2507            if len(names):
     2508                Plot.plot(X,Y,colors[ixy%6],picker=False,label=names[ixy])
     2509            else:
     2510                Plot.plot(X,Y,colors[ixy%6],picker=False)
    25082511        else:
    25092512            Plot.plot(X,Y,colors[ixy%6]+'+',picker=False)
    2510     if len(XY2):
     2513    if XY2 and len(XY2):
    25112514        for ixy,xy in enumerate(XY2):
    25122515            X,Y = XY2[ixy]
    25132516            dX = Page.Offset[0]*(ixy+1)*Xmax/500.
    25142517            dY = Page.Offset[1]*(ixy+1)*Ymax/100.
    2515             if len(names):
    2516                 Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False,label=names[ixy])
     2518            if len(names2):
     2519                Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False,label=names2[ixy])
    25172520            else:
    25182521                Plot.plot(X+dX,Y+dY,colors[ixy%6],picker=False)
Note: See TracChangeset for help on using the changeset viewer.