Changeset 3804
- Timestamp:
- Jan 28, 2019 9:40:57 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r3799 r3804 5040 5040 G2frame.G2plotNB.status.SetStatusText('q =%.3f%s %sq/q =%.4f'%(xpos,Angstr+Pwrm1,GkDelta,ypos),1) 5041 5041 5042 def OnKeyPress(event): 5043 if event.key == 'g': 5044 mpl.rcParams['axes.grid'] = not mpl.rcParams['axes.grid'] 5045 wx.CallAfter(PlotPeakWidths,G2frame,PatternName) 5046 5042 5047 if PatternName: 5043 5048 G2frame.PatternId = G2gd.GetGPXtreeItemId(G2frame, G2frame.root, PatternName) … … 5068 5073 xylim = [] 5069 5074 new,plotNum,Page,Plot,lim = G2frame.G2plotNB.FindPlotTab('Peak Widths','mpl') 5070 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 5075 Page.Choice = (' key press','g: toggle grid',) 5076 Page.keyPress = OnKeyPress 5071 5077 if not new: 5072 5078 if not G2frame.G2plotNB.allowZoomReset: # save previous limits 5073 5079 xylim = lim 5080 else: 5081 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 5082 Page.canvas.mpl_connect('key_press_event', OnKeyPress) 5074 5083 # save information needed to reload from tree and redraw 5075 5084 G2frame.G2plotNB.RegisterRedrawRoutine(G2frame.G2plotNB.lastRaisedPlotTab, 5076 PlotPeakWidths,(G2frame,G2frame.GPXtree.GetItemText(G2frame.PatternId)) 5077 ) 5085 PlotPeakWidths,(G2frame,G2frame.GPXtree.GetItemText(G2frame.PatternId))) 5078 5086 5079 5087 TreeItemText = G2frame.GPXtree.GetItemText(G2frame.PatternId) 5080 5088 G2frame.G2plotNB.status.SetStatusText('histogram: '+TreeItemText,1) 5081 Page.Choice = None5082 5089 Page.SetToolTipString('') 5083 5090 X = []
Note: See TracChangeset
for help on using the changeset viewer.