Changeset 2200
- Timestamp:
- Apr 7, 2016 11:51:21 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r2199 r2200 308 308 repeated replotting. 309 309 ''' 310 self.status.DestroyChildren() #get rid of special stuff on status bar 311 self.status.SetFields(['','']) # clear old status message 312 G2frame.G2plotNB.status.SetStatusWidths([150,-1]) 310 313 if self.skipPageChange: 311 314 # print 'skipping OnPageChanged' … … 313 316 return 314 317 # print 'OnPageChanged' 315 self.status.DestroyChildren() #get rid of special stuff on status bar316 self.status.SetStatusText('',1) # clear old status message317 318 page = self.panelList[self.nb.GetSelection()] #GetCurrentPage() not in wx 2.7 318 319 page.needsUpdate = True … … 517 518 Page.figure.clf() 518 519 Plot = Page.figure.gca() #get a fresh plot after clf() 519 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab520 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 520 521 except ValueError: 521 522 Plot = G2frame.G2plotNB.addMpl('Structure Factors').gca() … … 533 534 if 'HKLF' in Name: 534 535 Page.Choice += ('w: select |DFsq|/sig','1: select |DFsq|>sig','3: select |DFsq|>3sig',) 535 #G2frame.G2plotNB.RaisePageNoRefresh(Page)536 G2frame.G2plotNB.RaisePageNoRefresh(Page) 536 537 Plot.set_aspect(aspect='equal') 537 538 … … 1119 1120 plotNum = G2frame.G2plotNB.plotList.index('3D Structure Factors') 1120 1121 Page = G2frame.G2plotNB.nb.GetPage(plotNum) 1121 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab1122 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 1122 1123 except ValueError: 1123 1124 Plot = G2frame.G2plotNB.addOgl('3D Structure Factors') … … 1128 1129 altDown = False 1129 1130 Font = Page.GetFont() 1130 #G2frame.G2plotNB.RaisePageNoRefresh(Page)1131 G2frame.G2plotNB.RaisePageNoRefresh(Page) 1131 1132 Page.Choice = None 1132 1133 choice = [' save as/key:','jpeg','tiff','bmp','h: view down h','k: view down k','l: view down l', … … 1637 1638 Page.figure.clf() 1638 1639 Plot = Page.figure.gca() #get a fresh plot after clf() 1639 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab1640 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 1640 1641 except ValueError: 1641 1642 if plottype == 'SASD': … … 2104 2105 Page.figure.clf() 2105 2106 Plot = Page.figure.gca() #get a fresh plot after clf() 2106 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2107 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2107 2108 except ValueError: 2108 2109 newPlot = True … … 2251 2252 Page.figure.clf() 2252 2253 Plot = Page.figure.gca() 2253 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2254 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2254 2255 except ValueError: 2255 2256 newPlot = True … … 2261 2262 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 2262 2263 2263 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2264 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2264 2265 G2frame.G2plotNB.status.DestroyChildren() 2265 2266 if G2frame.Contour: … … 2407 2408 Page.figure.clf() 2408 2409 Plot = Page.figure.gca() 2409 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2410 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2410 2411 except ValueError: 2411 2412 newPlot = True … … 2416 2417 2417 2418 Page.Choice = None 2418 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2419 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2419 2420 G2frame.G2plotNB.status.DestroyChildren() 2420 2421 Plot.set_title(Title) … … 2488 2489 Page.figure.clf() 2489 2490 Plot = Page.figure.gca() 2490 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2491 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2491 2492 except ValueError: 2492 2493 newPlot = True … … 2497 2498 2498 2499 Page.Choice = None 2499 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2500 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2500 2501 G2frame.G2plotNB.status.DestroyChildren() 2501 2502 Plot.set_title(Title) … … 2596 2597 Page.figure.clf() 2597 2598 Plot = Page.figure.gca() 2598 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2599 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2599 2600 except ValueError: 2600 2601 newPlot = True … … 2607 2608 Page.Choice = (' key press','d: lower contour max','u: raise contour max','o: reset contour max', 2608 2609 'i: interpolation method','s: color scheme') 2609 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2610 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2610 2611 Page.keyPress = OnKeyPress 2611 2612 Page.SetFocus() … … 2667 2668 Page.figure.clf() 2668 2669 Plot = Page.figure.gca() 2669 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2670 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2670 2671 except ValueError: 2671 2672 newPlot = True … … 2676 2677 2677 2678 Page.Choice = None 2678 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2679 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2679 2680 G2frame.G2plotNB.status.DestroyChildren() 2680 2681 Plot.set_title('Strain') … … 2725 2726 Page.figure.clf() 2726 2727 Plot = Page.figure.gca() #get a fresh plot after clf() 2727 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2728 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2728 2729 except ValueError: 2729 2730 newPlot = True … … 2734 2735 Page.canvas.mpl_connect('motion_notify_event', OnMotion) 2735 2736 Page.Choice = None 2736 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2737 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2737 2738 PatternId = G2frame.PatternId 2738 2739 data = G2frame.PatternTree.GetItemPyData(G2gd.GetPatternTreeItemId(G2frame,PatternId, 'Models')) … … 2782 2783 Page.figure.clf() 2783 2784 Plot = Page.figure.gca() 2784 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2785 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2785 2786 except ValueError: 2786 2787 Plot = G2frame.G2plotNB.addMpl('Powder Lines').gca() … … 2790 2791 2791 2792 Page.Choice = None 2792 #G2frame.G2plotNB.RaisePageNoRefresh(Page)2793 G2frame.G2plotNB.RaisePageNoRefresh(Page) 2793 2794 Plot.set_title('Powder Pattern Lines') 2794 2795 Plot.set_xlabel(r'$\mathsf{2\theta}$',fontsize=14) … … 2853 2854 Page.figure.clf() 2854 2855 Plot = Page.figure.gca() 2855 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab2856 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 2856 2857 except ValueError: 2857 2858 Plot = G2frame.G2plotNB.addMpl('Peak Widths').gca() … … 3191 3192 G2frame.G2plotNB.status.SetFields(['', 3192 3193 'psi =%9.3f, beta =%9.3f, MRD =%9.3f hkl=%5.2f,%5.2f,%5.2f'%(r,p,ipf,x,y,z)]) 3193 G2frame.G2plotNB.status.SetStatusWidths([150,-1])3194 #G2frame.G2plotNB.status.SetStatusWidths([150,-1]) 3194 3195 3195 3196 elif 'Axial' in SHData['PlotType']: … … 3206 3207 pf = G2lat.polfcal(ODFln,SamSym[textureData['Model']],np.array([r,]),np.array([p,])) 3207 3208 G2frame.G2plotNB.status.SetFields(['','phi =%9.3f, gam =%9.3f, MRD =%9.3f'%(r,p,pf)]) 3208 G2frame.G2plotNB.status.SetStatusWidths([150,-1])3209 #G2frame.G2plotNB.status.SetStatusWidths([150,-1]) 3209 3210 3210 3211 try: … … 3215 3216 if not Page.IsShown(): 3216 3217 Page.Show() 3217 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab3218 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 3218 3219 except ValueError: 3219 3220 if '3D' in SHData['PlotType']: … … 3371 3372 if not Page.IsShown(): 3372 3373 Page.Show() 3373 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab3374 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 3374 3375 except ValueError: 3375 3376 Plot = G2frame.G2plotNB.addMpl('Modulation').gca() … … 3506 3507 G2frame.G2plotNB.status.SetFields(['',msg]) 3507 3508 #for some reason this needs to be here - otherwise in later wx's width gets changed 3508 G2frame.G2plotNB.status.SetStatusWidths([150,-1])3509 #G2frame.G2plotNB.status.SetStatusWidths([150,-1]) 3509 3510 3510 3511 try: … … 3515 3516 if not Page.IsShown(): 3516 3517 Page.Show() 3517 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab3518 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 3518 3519 except ValueError: 3519 3520 Plot = G2frame.G2plotNB.addMpl('Covariance').gca() … … 3585 3586 if not Page.IsShown(): 3586 3587 Page.Show() 3587 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab3588 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 3588 3589 except ValueError: 3589 3590 Plot = G2frame.G2plotNB.addMpl('Torsion').gca() … … 3669 3670 if not Page.IsShown(): 3670 3671 Page.Show() 3671 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab3672 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 3672 3673 except ValueError: 3673 3674 Plot = G2frame.G2plotNB.addMpl('Ramachandran').gca() … … 4220 4221 Page.figure.clf() 4221 4222 Plot = Page.figure.gca() #get a fresh plot after clf() 4222 if not event: #event from GUI TextCtrl - don't want focus to change to plot!!!4223 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab4223 # if not event: #event from GUI TextCtrl - don't want focus to change to plot!!! 4224 # G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 4224 4225 except ValueError: 4225 4226 Plot = G2frame.G2plotNB.addMpl('2D Powder Image').gca() … … 4232 4233 xylim = [] 4233 4234 Page.Choice = None 4234 #if not event: #event from GUI TextCtrl - don't want focus to change to plot!!!4235 #G2frame.G2plotNB.RaisePageNoRefresh(Page)4235 if not event: #event from GUI TextCtrl - don't want focus to change to plot!!! 4236 G2frame.G2plotNB.RaisePageNoRefresh(Page) 4236 4237 Title = G2frame.PatternTree.GetItemText(G2frame.Image)[4:] 4237 4238 G2frame.G2plotNB.status.DestroyChildren() … … 4463 4464 Page.figure.clf() 4464 4465 Plot = Page.figure.gca() #get a fresh plot after clf() 4465 if not event:4466 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab4466 # if not event: 4467 # G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 4467 4468 4468 4469 except ValueError: … … 4474 4475 view = False 4475 4476 Page.Choice = None 4476 #if not event:4477 #G2frame.G2plotNB.RaisePageNoRefresh(Page)4477 if not event: 4478 G2frame.G2plotNB.RaisePageNoRefresh(Page) 4478 4479 4479 4480 Data = G2frame.PatternTree.GetItemPyData( … … 4531 4532 Page.figure.clf() 4532 4533 Plot = Page.figure.gca() #get a fresh plot after clf() 4533 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab4534 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 4534 4535 4535 4536 except ValueError: … … 4541 4542 view = False 4542 4543 Page.Choice = None 4543 #G2frame.G2plotNB.RaisePageNoRefresh(Page)4544 G2frame.G2plotNB.RaisePageNoRefresh(Page) 4544 4545 4545 4546 Data = G2frame.PatternTree.GetItemPyData( … … 5637 5638 plotNum = G2frame.G2plotNB.plotList.index(generalData['Name']) 5638 5639 Page = G2frame.G2plotNB.nb.GetPage(plotNum) 5639 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab5640 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 5640 5641 except ValueError: 5641 5642 Plot = G2frame.G2plotNB.addOgl(generalData['Name']) … … 5940 5941 plotNum = G2frame.G2plotNB.plotList.index('Rigid body') 5941 5942 Page = G2frame.G2plotNB.nb.GetPage(plotNum) 5942 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab5943 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 5943 5944 except ValueError: 5944 5945 Plot = G2frame.G2plotNB.addOgl('Rigid body') … … 5948 5949 view = False 5949 5950 altDown = False 5950 #G2frame.G2plotNB.RaisePageNoRefresh(Page)5951 G2frame.G2plotNB.RaisePageNoRefresh(Page) 5951 5952 Font = Page.GetFont() 5952 5953 Page.canvas.Bind(wx.EVT_MOUSEWHEEL, OnMouseWheel) … … 6324 6325 plotNum = G2frame.G2plotNB.plotList.index('Layer') 6325 6326 Page = G2frame.G2plotNB.nb.GetPage(plotNum) 6326 G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab6327 #G2frame.G2plotNB.SetSelectionNoRefresh(plotNum) # raises plot tab 6327 6328 except ValueError: 6328 6329 Plot = G2frame.G2plotNB.addOgl('Layer') -
trunk/makeMacApp.py
r1357 r2200 140 140 pythonpath,top = os.path.split(pythonpath) 141 141 else: 142 print("\nSorry, failed to find a Resources directory associated with "+str(sys.executable))142 #print("\nSorry, failed to find a Resources directory associated with "+str(sys.executable)) 143 143 pythonapp = sys.executable 144 144
Note: See TracChangeset
for help on using the changeset viewer.