Changeset 3388 for trunk/GSASIIplot.py
 Timestamp:
 May 15, 2018 12:24:54 PM (4 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r3384 r3388 2413 2413 PickId = G2frame.PickId 2414 2414 PatternId = G2frame.PatternId 2415 colors=['b','g','r','c','m','k'] 2415 try: 2416 colors = GSASIIpath.GetConfigValue('Plot_Colors').split() 2417 for color in colors: 2418 if color not in ['k','r','g','b','m','c']: 2419 print('**** bad color code: '+str(color)+'  redo Preferences/Plot Colors ****') 2420 raise Exception 2421 except: 2422 colors = ['b','g','r','c','m','k'] 2416 2423 Lines = [] 2417 2424 exclLines = [] 2418 2425 if G2frame.SinglePlot and PatternId: 2419 Pattern = G2frame.GPXtree.GetItemPyData(PatternId)2426 Pattern = copy.deepcopy(G2frame.GPXtree.GetItemPyData(PatternId)) 2420 2427 Pattern.append(G2frame.GPXtree.GetItemText(PatternId)) 2421 2428 PlotList = [Pattern,] … … 2443 2450 for item in choices: 2444 2451 id = G2gd.GetGPXtreeItemId(G2frame,G2frame.root, item) 2445 Pattern = G2frame.GPXtree.GetItemPyData(id)2452 Pattern = copy.deepcopy(G2frame.GPXtree.GetItemPyData(id)) 2446 2453 if len(Pattern) < 3: # put name on end if needed 2447 2454 Pattern.append(G2frame.GPXtree.GetItemText(id)) … … 2546 2553 xye0 = ma.array(xye0,mask=False) 2547 2554 # xye0.mask = False # resets mask for xye0 & Pattern[1][0](!) 2555 xye0 = ma.masked_outside(xye0,limits[1][0],limits[1][1]) 2548 2556 for excl in excls: 2549 2557 xye0 = ma.masked_inside(xye0,excl[0],excl[1]) # sets mask on xye0 but not Pattern[1][0] ! … … 2661 2669 DX = xlim[1]xlim[0] 2662 2670 X += 0.002*offsetX*DX*N 2663 Xum = ma.getdata(X) # unmasked version of X, use to plot data (only) 2671 if G2frame.GPXtree.GetItemText(PickId) == 'Limits': 2672 Xum = ma.getdata(X) # unmasked version of X, use for data limits (only) 2673 else: 2674 Xum = X[:] 2675 Ibeg = np.searchsorted(X,limits[1][0]) 2676 Ifin = np.searchsorted(X,limits[1][1]) 2664 2677 if ifpicked: 2665 2678 if Page.plotStyle['sqrtPlot']: … … 2705 2718 Plot.set_ylim(bottom=np.min(np.trim_zeros(YB))/2.,top=np.max(Y)*2.) 2706 2719 if G2frame.Weight: 2707 Ibeg = np.searchsorted(X,limits[1][0])2708 Ifin = np.searchsorted(X,limits[1][1])2709 2720 Plot1.set_yscale("linear") 2710 2721 wtFactor = Pattern[0]['wtFactor'] … … 2721 2732 elif plottype in ['SASD','REFD']: 2722 2733 Plot.set_xscale("log",nonposx='mask') 2723 Ibeg = np.searchsorted(X,limits[1][0])2724 Ifin = np.searchsorted(X,limits[1][1])2725 2734 Plot.set_yscale("log",nonposy='mask') 2726 2735 if G2frame.ErrorBars:
Note: See TracChangeset
for help on using the changeset viewer.