Changeset 1300 for trunk/GSASIIplot.py
- Timestamp:
- Apr 25, 2014 12:47:06 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r1297 r1300 450 450 elif event.key == 'e' and 'SASD' in plottype: 451 451 G2frame.ErrorBars = not G2frame.ErrorBars 452 elif event.key == 'b' and 'PWDR' in plottype:452 elif event.key == 'b': 453 453 G2frame.SubBack = not G2frame.SubBack 454 454 if not G2frame.SubBack: … … 479 479 G2frame.Cmax = 1.0 480 480 G2frame.Offset = [0,0] 481 elif event.key == 'c' :481 elif event.key == 'c' and 'PWDR' in plottype: 482 482 newPlot = True 483 483 G2frame.Contour = not G2frame.Contour … … 766 766 'c: contour on','q: toggle q plot','s: toggle single plot','+: no selection') 767 767 elif 'SASD' in plottype: 768 Page.Choice = (' key press',' c: contour on','n: semilog on',768 Page.Choice = (' key press','b: toggle subtract background','n: semilog on', 769 769 'd: offset down','l: offset left','r: offset right','u: offset up','o: reset offset', 770 770 'q: toggle S(q) plot','s: toggle single plot','+: no selection') … … 775 775 'q: toggle q plot','s: toggle single plot','w: toggle divide by sig','+: no selection') 776 776 elif 'SASD' in plottype: 777 Page.Choice = (' key press',' c: contour on','n: loglog on','e: toggle error bars',777 Page.Choice = (' key press','b: toggle subtract background','n: loglog on','e: toggle error bars', 778 778 'd: offset down','l: offset left','r: offset right','u: offset up','o: reset offset', 779 779 'q: toggle S(q) plot','s: toggle single plot','+: no selection') … … 896 896 Y = xye[1]+offset*N 897 897 elif 'SASD' in plottype: 898 B = xye[5] 898 899 if G2frame.sqPlot: 899 900 Y = xye[1]*Sample['Scale'][0]*(1.005)**(offset*N)*X**4 … … 934 935 elif 'SASD' in plottype: 935 936 if G2frame.sqPlot: 936 D= xye[4]*X**4937 W = xye[4]*X**4 937 938 Z = xye[3]*X**4 939 B = B*X**4 938 940 else: 939 D = xye[4] 941 W = xye[4] 942 if G2frame.SubBack: 943 YB = Y-B 944 ZB = Z 945 else: 946 YB = Y 947 ZB = Z+B 940 948 Plot.set_yscale("log",nonposy='mask') 941 949 Plot.set_ylim(bottom=np.min(np.trim_zeros(Y))/2.,top=np.max(Y)*2.) … … 951 959 if G2frame.ErrorBars: 952 960 if G2frame.sqPlot: 953 Plot.errorbar(X,Y ,yerr=X**4*Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])),961 Plot.errorbar(X,YB,yerr=X**4*Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])), 954 962 ecolor=colors[N%6],picker=3.,clip_on=False) 955 963 else: 956 Plot.errorbar(X,Y ,yerr=Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])),964 Plot.errorbar(X,YB,yerr=Sample['Scale'][0]*np.sqrt(1./(Pattern[0]['wtFactor']*xye[2])), 957 965 ecolor=colors[N%6],picker=3.,clip_on=False) 958 966 else: 959 Plot.plot(X,Y ,colors[N%6]+'+',picker=3.,clip_on=False)960 Plot.plot(X, D,colors[(N+2)%6],picker=False)961 Plot.plot(X,Z ,colors[(N+1)%6],picker=False)967 Plot.plot(X,YB,colors[N%6]+'+',picker=3.,clip_on=False) 968 Plot.plot(X,W,colors[(N+2)%6],picker=False) 969 Plot.plot(X,ZB,colors[(N+1)%6],picker=False) 962 970 elif G2frame.Weight and 'PWDR' in plottype: 963 971 DY = xye[1]*np.sqrt(xye[2]) … … 970 978 Plot.axhline(0.,color=wx.BLACK) 971 979 else: 972 if G2frame.SubBack and 'PWDR' in plottype:980 if G2frame.SubBack: 973 981 Plot.plot(Xum,Y-W,colors[N%6]+'+',picker=3.,clip_on=False) 974 982 Plot.plot(X,Z-W,colors[(N+1)%6],picker=False) … … 981 989 if 'PWDR' in plottype: 982 990 Plot.plot(X,W,colors[(N+2)%6],picker=False) 983 Plot.plot(X,D,colors[(N+3)%6],picker=False)991 Plot.plot(X,D,colors[(N+3)%6],picker=False) 984 992 Plot.axhline(0.,color=wx.BLACK) 985 993 Page.canvas.SetToolTipString('')
Note: See TracChangeset
for help on using the changeset viewer.