Changeset 2107 for trunk/GSASIIplot.py
- Timestamp:
- Dec 24, 2015 2:15:40 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r2106 r2107 3567 3567 3568 3568 :param wx.Frame G2frame: The main GSAS-II tree "window" 3569 :param str eventkey: a single letter ('f' or 'p' ) that3569 :param str eventkey: a single letter ('f' or 'p', etc.) that 3570 3570 determines what type of mask is created. 3571 3571 ''' … … 3600 3600 '''Plot of 2D detector images as contoured plot. Also plot calibration ellipses, 3601 3601 masks, etc. 3602 3603 :param wx.Frame G2frame: main GSAS-II frame 3604 :param bool newPlot: if newPlot is True, the plot is reset (zoomed out, etc.) 3605 :param event: matplotlib mouse event (or None) 3606 :param bool newImage: If True, the Figure is cleared and redrawn 3602 3607 ''' 3603 3608 from matplotlib.patches import Ellipse,Arc,Circle,Polygon … … 3670 3675 G2frame.MaskKey = event.key 3671 3676 OnStartMask(G2frame) 3672 PlotImage(G2frame,newPlot=False)3677 wx.CallAfter(PlotImage,G2frame,newImage=False) 3673 3678 3674 3679 elif PickName == 'Stress/Strain': … … 3676 3681 G2frame.StrainKey = event.key 3677 3682 StrSta = OnStartNewDzero(G2frame) 3678 PlotImage(G2frame,newPlot=False)3683 wx.CallAfter(PlotImage,G2frame,newImage=False) 3679 3684 3680 3685 elif PickName == 'Image Controls': … … 3691 3696 Data['center'] = [Xpos,Ypos] 3692 3697 G2imG.UpdateImageControls(G2frame,Data,Masks) 3693 PlotImage(G2frame,newPlot=False)3698 wx.CallAfter(PlotImage,G2frame,newPlot=False) 3694 3699 finally: 3695 3700 dlg.Destroy() … … 3701 3706 elif event.key in ['y',]: 3702 3707 Data['invert_y'] = not Data['invert_y'] 3703 PlotImage(G2frame,newPlot=True)3708 wx.CallAfter(PlotImage,G2frame,newPlot=True) 3704 3709 3705 3710 def OnKeyBox(event): … … 3758 3763 G2imG.UpdateImageControls(G2frame,Data,Masks) 3759 3764 return 3760 PlotImage(G2frame,newImage=False)3765 wx.CallAfter(PlotImage,G2frame,newImage=False) 3761 3766 return 3762 3767 elif G2frame.MaskKey and PickName == 'Masks': … … 3797 3802 frame.append([Xpos,Ypos]) 3798 3803 G2imG.UpdateMasks(G2frame,Masks) 3799 PlotImage(G2frame,newImage=False)3804 wx.CallAfter(PlotImage,G2frame,newImage=False) 3800 3805 elif PickName == 'Stress/Strain' and G2frame.StrainKey: 3801 3806 Xpos,Ypos = [event.xdata,event.ydata] … … 3813 3818 G2imG.UpdateStressStrain(G2frame,StrSta) 3814 3819 PlotStrain(G2frame,StrSta) 3815 PlotImage(G2frame,newPlot=False)3820 wx.CallAfter(PlotImage,G2frame,newPlot=False) 3816 3821 else: 3817 3822 Xpos,Ypos = [event.xdata,event.ydata] … … 3907 3912 # else: #keep for future debugging 3908 3913 # print str(G2frame.itemPicked),event.xdata,event.ydata,event.button 3909 PlotImage(G2frame,newImage=True)3914 wx.CallAfter(PlotImage,G2frame,newImage=True) 3910 3915 G2frame.itemPicked = None 3911 3916 … … 3999 4004 wx.BeginBusyCursor() 4000 4005 try: 4001 4002 4006 if newImage: 4003 4007 Imin,Imax = Data['range'][1]
Note: See TracChangeset
for help on using the changeset viewer.