Changeset 4543
- Timestamp:
- Aug 17, 2020 9:13:26 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r4541 r4543 331 331 return self.canvas.SetToolTipString(text) 332 332 333 def ToolBarDraw(self): 334 try: 335 self.toolbar.draw() 336 except: 337 self.toolbar.draw_idle() 338 333 339 class G2PlotOgl(_tabPlotWin): 334 340 'Creates an OpenGL plot in the GSAS-II graphics window' … … 375 381 else: 376 382 self.canvas.SetToolTipString(text) 383 384 def ToolBarDraw(self): 385 mplv = eval(mpl.__version__.replace('.',',')) 386 if mplv[0] >= 3 and mplv[1] >= 3: 387 self.toolbar.draw_idle() 388 else: 389 self.toolbar.draw() 377 390 378 391 class G2PlotNoteBook(wx.Panel): … … 546 559 page = G2Plot3D(self.nb) 547 560 self._addPage(name,page) 548 mplv = mpl.__version__.split('.') 549 if mplv[0] == '3' and (mplv[1] == '1' or mplv[1] == '2') and not self.MPLwarn: # patch for bad MPL 3D 550 self.MPLwarn = True 551 G2G.G2MessageBox(self,'3D plots with Matplotlib 3.1.x and 3.2.x are distorted, we suggest regressing to MPL 3.0.3 until 3.3.x or later is available.. You have '+mpl.__version__, 552 'Avoid Matplotlib 3.1 & 3.2') 561 mplv = eval(mpl.__version__.replace('.',',')) 562 if mplv[0] == 3: 563 if mplv[1] >= 3: 564 page.set_box_aspect((1,1,1)) 565 elif not self.MPLwarn: # patch for bad MPL 3D 566 self.MPLwarn = True 567 G2G.G2MessageBox(self,'3D plots with Matplotlib 3.1.x and 3.2.x are distorted, use MPL 3.0.3 or 3.3. You have '+mpl.__version__, 568 'Avoid Matplotlib 3.1 & 3.2') 553 569 return page.figure 554 570 … … 733 749 #print xmin,xmax,ymin,ymax 734 750 self.plotCanvas.figure.canvas.draw() 735 self.parent. toolbar.draw()751 self.parent.ToolBarDraw() 736 752 # self.parent.toolbar.push_current() 737 753 if self.updateActions: … … 1062 1078 # xylim = [] 1063 1079 Page.toolbar.push_current() 1064 Page. toolbar.draw()1080 Page.ToolBarDraw() 1065 1081 else: 1066 1082 Plot.set_xlim((HKLmin[pzone[izone][0]],HKLmax[pzone[izone][0]])) … … 1166 1182 xylim = [] 1167 1183 Page.toolbar.push_current() 1168 Page. toolbar.draw()1184 Page.ToolBarDraw() 1169 1185 Page.canvas.draw() 1170 1186 else: … … 3349 3365 Plot.set_ylim(G2frame.xylim[1]) 3350 3366 Page.toolbar.push_current() 3351 Page. toolbar.draw()3367 Page.ToolBarDraw() 3352 3368 else: 3353 3369 G2frame.xylim = Plot.get_xlim(),Plot.get_ylim() … … 4740 4756 xylim = [] 4741 4757 Page.toolbar.push_current() 4742 Page. toolbar.draw()4758 Page.ToolBarDraw() 4743 4759 else: 4744 4760 Page.canvas.draw() … … 4828 4844 # xylim = [] 4829 4845 Page.toolbar.push_current() 4830 Page. toolbar.draw()4846 Page.ToolBarDraw() 4831 4847 else: 4832 4848 Page.canvas.draw() … … 4934 4950 xylim = [] 4935 4951 Page.toolbar.push_current() 4936 Page. toolbar.draw()4952 Page.ToolBarDraw() 4937 4953 Page.canvas.draw() 4938 4954 else: … … 5082 5098 xylim = [] 5083 5099 Page.toolbar.push_current() 5084 Page. toolbar.draw()5100 Page.ToolBarDraw() 5085 5101 else: 5086 5102 Page.canvas.draw() … … 5294 5310 xylim = [] 5295 5311 Page.toolbar.push_current() 5296 Page. toolbar.draw()5312 Page.ToolBarDraw() 5297 5313 else: 5298 5314 Page.canvas.draw() … … 5701 5717 Plot.set_ylim(xylim[1]) 5702 5718 Page.toolbar.push_current() 5703 Page. toolbar.draw()5719 Page.ToolBarDraw() 5704 5720 else: 5705 5721 Page.canvas.draw() … … 5975 5991 try: 5976 5992 CS = Plot.contour(Y,X,Z) 5977 # CS = Plot.contour(Y,X,Z,aspect='equal')5978 5993 Plot.clabel(CS,fontsize=9,inline=1) 5979 5994 except ValueError: … … 7826 7841 xylim = [] 7827 7842 Page.toolbar.push_current() 7828 Page. toolbar.draw()7843 Page.ToolBarDraw() 7829 7844 # patch for wx 2.9 on Mac, to force a redraw 7830 7845 i,j= wx.__version__.split('.')[0:2] … … 7887 7902 xylim = [] 7888 7903 Page.toolbar.push_current() 7889 Page. toolbar.draw()7904 Page.ToolBarDraw() 7890 7905 else: 7891 7906 Page.canvas.draw() … … 7954 7969 xylim = [] 7955 7970 Page.toolbar.push_current() 7956 Page. toolbar.draw()7971 Page.ToolBarDraw() 7957 7972 else: 7958 7973 Page.canvas.draw() … … 10541 10556 Plot.set_xlim((ttmin,ttmax)) 10542 10557 Page.toolbar.push_current() 10543 Page. toolbar.draw()10558 Page.ToolBarDraw() 10544 10559 Page.canvas.draw() 10545 10560
Note: See TracChangeset
for help on using the changeset viewer.