Changeset 1368 for trunk/GSASIIplot.py
 Timestamp:
 May 29, 2014 11:19:07 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIplot.py
r1366 r1368 462 462 G2frame.Offset[0] = 0 463 463 newPlot = True 464 elif event.key == 's' and 'PWDR' in plottype: 465 if G2frame.Contour: 466 choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")] 467 choice.sort() 468 dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice) 469 if dlg.ShowModal() == wx.ID_OK: 470 sel = dlg.GetSelection() 471 G2frame.ContourColor = choice[sel] 472 else: 473 G2frame.ContourColor = 'Paired' 474 dlg.Destroy() 475 elif G2frame.SinglePlot: 476 G2frame.SqrtPlot = not G2frame.SqrtPlot 477 if G2frame.SqrtPlot: 478 G2frame.delOffset = .002 479 G2frame.refOffset = 10.0 480 G2frame.refDelt = .001 481 else: 482 G2frame.delOffset = .02 483 G2frame.refOffset = 100.0 484 G2frame.refDelt = .01 485 newPlot = True 464 486 elif event.key == 'u' and (G2frame.Contour or not G2frame.SinglePlot): 465 487 if G2frame.Contour: … … 495 517 G2frame.sqPlot = not G2frame.sqPlot 496 518 elif event.key == 'm': 497 if G2frame.Contour: 498 choice = [m for m in mpl.cm.datad.keys() if not m.endswith("_r")] 499 choice.sort() 500 dlg = wx.SingleChoiceDialog(G2frame,'Select','Color scheme',choice) 501 if dlg.ShowModal() == wx.ID_OK: 502 sel = dlg.GetSelection() 503 G2frame.ContourColor = choice[sel] 504 else: 505 G2frame.ContourColor = 'Paired' 506 dlg.Destroy() 507 else: 508 G2frame.SinglePlot = not G2frame.SinglePlot 519 G2frame.SqrtPlot = False 520 G2frame.SinglePlot = not G2frame.SinglePlot 509 521 newPlot = True 510 522 elif event.key == '+': … … 790 802 if G2frame.SinglePlot: 791 803 Page.Choice = (' key press', 792 'b: toggle subtract background','n: log(I) on',' c: contour on',804 'b: toggle subtract background','n: log(I) on','s: toggle sqrt plot','c: contour on', 793 805 'q: toggle q plot','m: toggle multidata plot','w: toggle divide by sig','+: no selection') 794 806 else: … … 879 891 if 'C' in ParmList[0]['Type'][0]: 880 892 if 'PWDR' in plottype: 881 Plot.set_ylabel('$Intensity$',fontsize=16) 893 if G2frame.SqrtPlot: 894 Plot.set_ylabel(r'$\sqrt{Intensity}$',fontsize=16) 895 else: 896 Plot.set_ylabel('$Intensity$',fontsize=16) 882 897 elif 'SASD' in plottype: 883 898 if G2frame.sqPlot: … … 921 936 lenX = len(X) 922 937 if 'PWDR' in plottype: 923 Y = xye[1]+offset*N 938 if G2frame.SqrtPlot: 939 Y = np.where(xye[1]>=0.,np.sqrt(xye[1]),np.sqrt(xye[1])) 940 else: 941 Y = xye[1]+offset*N 924 942 elif 'SASD' in plottype: 925 943 B = xye[5] … … 957 975 DifLine = [''] 958 976 if ifpicked: 959 Z = xye[3]+offset*N 977 if G2frame.SqrtPlot: 978 Z = np.where(xye[3]>=0.,np.sqrt(xye[3]),np.sqrt(xye[3])) 979 else: 980 Z = xye[3]+offset*N 960 981 if 'PWDR' in plottype: 961 W = xye[4]+offset*N 962 D = xye[5]Ymax*G2frame.delOffset #powder background 982 if G2frame.SqrtPlot: 983 W = np.where(xye[4]>=0.,np.sqrt(xye[4]),np.sqrt(xye[4])) 984 D = np.where(xye[5],(YZ),0.)Ymax*G2frame.delOffset 985 else: 986 W = xye[4]+offset*N 987 D = xye[5]Ymax*G2frame.delOffset #powder background 963 988 elif 'SASD' in plottype: 964 989 if G2frame.sqPlot:
Note: See TracChangeset
for help on using the changeset viewer.