Changeset 3366
- Timestamp:
- Apr 30, 2018 12:36:18 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r3365 r3366 5600 5600 G2frame.cid = None 5601 5601 #Dsp = lambda tth,wave: wave/(2.*npsind(tth/2.)) 5602 global Data,Masks,StrSta,Plot1 # RVD: these are needed for multiple image controls/masks5602 global Data,Masks,StrSta,Plot1,Page # RVD: these are needed for multiple image controls/masks 5603 5603 colors=['b','g','r','c','m','k'] 5604 5604 Data = G2frame.GPXtree.GetItemPyData( … … 5837 5837 pick.set_data([[arcxI[-1],arcxO[-1]],[arcyI[-1],arcyO[-1]]]) 5838 5838 elif 'linescan' in itemPicked: 5839 xlim = Plot1.get_xlim() 5839 5840 azm = Data['linescan'][1]-AzmthOff 5840 5841 dspI = wave/(2.0*sind(0.1/2.0)) … … 5852 5853 np.seterr(invalid=olderr['invalid']) 5853 5854 Plot1.plot(xy[0],xy[1]) 5854 Plot1.set_xlim( Data['IOtth'])5855 Plot1.set_xlim(xlim) 5855 5856 Plot1.set_xscale("linear") 5856 5857 Plot1.set_title('Line scan at azm= %6.1f'%(azm+AzmthOff)) … … 6033 6034 '''Called when the mouse is released inside an image plot window 6034 6035 ''' 6036 global Page 6035 6037 try: 6036 6038 treeItem = G2frame.GPXtree.GetItemText(G2frame.PickId) 6037 6039 except TypeError: 6038 6040 return 6041 if Data['linescan']: 6042 Page.xlim1 = Plot1.get_xlim() 6039 6043 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('2D Powder Image','mpl',newImage=False) 6040 6044 if G2frame.cid is not None: # if there is a drag connection, delete it … … 6302 6306 np.seterr(invalid=olderr['invalid']) 6303 6307 Plot1.plot(xy[0],xy[1]) 6304 Plot1.set_xlim(Data['IOtth'])6305 Plot1.set_xscale("linear")6306 6308 if newImage: 6307 6309 G2frame.MaskKey = '' # subtitle will be removed, so turn off mode … … 6413 6415 ind = np.searchsorted(Azm,cake) 6414 6416 Plot.plot([arcxI[ind],arcxO[ind]],[arcyI[ind],arcyO[ind]],color='k',dashes=(5,5)) 6415 if 'linescan' in Data and Data['linescan'][0] :6417 if 'linescan' in Data and Data['linescan'][0] and G2frame.GPXtree.GetItemText(G2frame.PickId) in ['Image Controls',]: 6416 6418 azm = Data['linescan'][1]-Data['azmthOff'] 6417 6419 IOtth = [0.1,60.] … … 6519 6521 Plot.set_xlim(xlim) 6520 6522 Plot.set_ylim(ylim) 6523 if Data.get('linescan',[False,0.])[0]: 6524 Plot1.set_xlim(Data['IOtth']) 6521 6525 if Data['invert_x']: 6522 6526 Plot.invert_xaxis() … … 6527 6531 Plot.set_xlim(xylim[0]) 6528 6532 Plot.set_ylim(xylim[1]) 6533 if Data['linescan']: 6534 try: 6535 Plot1.set_xlim(Page.xlim1) 6536 except: 6537 pass 6529 6538 xylim = [] 6530 6539 Page.toolbar.push_current()
Note: See TracChangeset
for help on using the changeset viewer.