Changeset 1396 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Jun 25, 2014 6:20:41 PM (8 years ago)
Author:
toby
Message:

fix bugs in multieq seq fits; print results better

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r1386 r1396  
    24022402      number (or None) as the X-axis selection
    24032403    '''
    2404     G2frame.seqXselect = SelectX
    2405     try:
    2406         G2frame.seqXaxis
    2407     except:
    2408         G2frame.seqXaxis = None
    2409 
    24102404    def OnMotion(event):
    24112405        if event.xdata and event.ydata:                 #avoid out of frame errors
     
    24202414            Draw()
    24212415           
    2422     if fitnum is None:
    2423         label = 'Sequential refinement'
    2424     else:
    2425         label = 'Parametric fit #'+str(fitnum+1)
    2426     try:
    2427         plotNum = G2frame.G2plotNB.plotList.index(label)
    2428         Page = G2frame.G2plotNB.nb.GetPage(plotNum)
    2429         Page.figure.clf()
    2430         Plot = Page.figure.gca()
    2431         if not Page.IsShown():
    2432             Page.Show()
    2433     except ValueError:
    2434         Plot = G2frame.G2plotNB.addMpl(label).gca()
    2435         plotNum = G2frame.G2plotNB.plotList.index(label)
    2436         Page = G2frame.G2plotNB.nb.GetPage(plotNum)
    2437         Page.canvas.mpl_connect('key_press_event', OnKeyPress)
    2438         Page.canvas.mpl_connect('motion_notify_event', OnMotion)
    2439     Page.Choice = ['s to select plot x-axis',]
    2440     Page.keyPress = OnKeyPress
    2441     Page.seqYaxisList = ColumnList
    2442     Page.seqTableGet = TableGet
    2443     Page.fitvals = fitvals
    2444        
    24452416    def Draw():
    24462417        Page.SetFocus()
     
    24732444        Plot.set_xlabel(xName)
    24742445        Page.canvas.draw()           
     2446           
     2447    G2frame.seqXselect = SelectX
     2448    try:
     2449        G2frame.seqXaxis
     2450    except:
     2451        G2frame.seqXaxis = None
     2452
     2453    if fitnum is None:
     2454        label = 'Sequential refinement'
     2455    else:
     2456        label = 'Parametric fit #'+str(fitnum+1)
     2457    try:
     2458        plotNum = G2frame.G2plotNB.plotList.index(label)
     2459        Page = G2frame.G2plotNB.nb.GetPage(plotNum)
     2460        Page.figure.clf()
     2461        Plot = Page.figure.gca()
     2462        if not Page.IsShown():
     2463            Page.Show()
     2464    except ValueError:
     2465        Plot = G2frame.G2plotNB.addMpl(label).gca()
     2466        plotNum = G2frame.G2plotNB.plotList.index(label)
     2467        Page = G2frame.G2plotNB.nb.GetPage(plotNum)
     2468        Page.canvas.mpl_connect('key_press_event', OnKeyPress)
     2469        Page.canvas.mpl_connect('motion_notify_event', OnMotion)
     2470    Page.Choice = ['s to select plot x-axis',]
     2471    Page.keyPress = OnKeyPress
     2472    Page.seqYaxisList = ColumnList
     2473    Page.seqTableGet = TableGet
     2474    Page.fitvals = fitvals
     2475       
    24752476    Draw()
     2477    G2frame.G2plotNB.nb.SetSelection(plotNum) # raises plot tab
    24762478               
    24772479################################################################################
Note: See TracChangeset for help on using the changeset viewer.