Changeset 1334 for trunk/GSASIIplot.py


Ignore:
Timestamp:
May 7, 2014 1:47:58 PM (8 years ago)
Author:
vondreele
Message:

auto reverse plot if seq refinement done in reverse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1319 r1334  
    23272327            G2frame.seqXaxis = G2frame.seqXselect()
    23282328            Draw()
     2329           
    23292330    if fitnum is None:
    23302331        label = 'Sequential refinement'
     
    23442345        Page.canvas.mpl_connect('key_press_event', OnKeyPress)
    23452346        Page.canvas.mpl_connect('motion_notify_event', OnMotion)
    2346     Page.Choice = ['s to select plot x-axis']
     2347    Page.Choice = ['s to select plot x-axis',]
    23472348    Page.keyPress = OnKeyPress
    23482349    Page.seqYaxisList = ColumnList
     
    23622363            name,Y,sig = Page.seqTableGet(col)
    23632364            if sig:
     2365                if G2frame.seqReverse and not G2frame.seqXaxis:
     2366                    Y = Y[::-1]
     2367                    sig = sig[::-1]
    23642368                Plot.errorbar(X,Y,yerr=sig,label=name)
    23652369            else:
     2370                if G2frame.seqReverse and not G2frame.seqXaxis:
     2371                    Y = Y[::-1]
    23662372                Plot.plot(X,Y)
    23672373                Plot.plot(X,Y,'o',label=name)
    23682374        if Page.fitvals:
    2369                 Plot.plot(X,fitvals,label='Fit')
     2375            if G2frame.seqReverse and not G2frame.seqXaxis:
     2376                Page.fitvals = Page.fitvals[::-1]
     2377            Plot.plot(X,Page.fitvals,label='Fit')
    23702378           
    23712379        Plot.legend(loc='best')
Note: See TracChangeset for help on using the changeset viewer.