Changeset 5471
- Timestamp:
- Jan 11, 2023 8:56:33 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIctrlGUI.py
r5455 r5471 151 151 import wx.lib.filebrowsebutton as wxfilebrowse 152 152 import matplotlib as mpl 153 import matplotlib.figure as mplfig 153 154 154 155 except ImportError: … … 6777 6778 hSizer.Add(vSizer,1,wx.EXPAND,1) 6778 6779 pltPanel = wx.Panel(self,size=(-1,-1)) 6779 self.figure = mpl .figure.Figure(dpi=100,figsize=(3,2))6780 self.figure = mplfig.Figure(dpi=100,figsize=(3,2)) 6780 6781 self.figure.subplots_adjust(right=0.99,top=0.99) 6781 6782 Canvas(pltPanel, wx.ID_ANY, self.figure) # no need to save, get this from self.figure.canvas -
trunk/GSASIIdataGUI.py
r5452 r5471 451 451 warn = True 452 452 break 453 if s in versionDict['tooNewWarn'] and not warn:454 match = compareVersions(pkgver,versionDict['tooNewWarn'][s])455 if match >= 0:456 msg += "Problems are anticipated with this version (not tested)"457 warn = True458 453 if s in versionDict['tooNewUntested'] and not warn: 459 454 match = compareVersions(pkgver,versionDict['tooNewUntested'][s]) … … 461 456 msg += "New version not tested; please keep us posted" 462 457 warn = True 458 if s in versionDict['tooNewWarn'] and not warn: 459 match = compareVersions(pkgver,versionDict['tooNewWarn'][s]) 460 if match >= 0: 461 msg += "Tests incomplete w/suspected bugs; Please report problems" 463 462 print(" {:12s}{} {}".format(s+':',pkgver,msg)) 464 463 -
trunk/GSASIIplot.py
r5467 r5471 126 126 import wx.aui 127 127 import wx.glcanvas 128 except (ImportError, ValueError): 129 print('GSASIIplot: wx not imported') 130 try: 128 131 import matplotlib as mpl 129 132 if not mpl.get_backend(): #could be assigned by spyder debugger 130 133 mpl.use('wxAgg') 134 import matplotlib.figure as mplfig 131 135 import matplotlib.collections as mplC 132 136 import mpl_toolkits.mplot3d.axes3d as mp3d 133 137 from scipy.ndimage.interpolation import map_coordinates 134 except (ImportError, ValueError): 135 pass 138 except (ImportError, ValueError) as err: 139 print('GSASIIplot: matplotlib not imported') 140 if GSASIIpath.GetConfigValue('debug'): print('error msg:',err) 141 136 142 import GSASIIpath 137 143 Clip_on = GSASIIpath.GetConfigValue('Clip_on',True) … … 316 322 mpl.rcParams['legend.fontsize'] = 10 317 323 mpl.rcParams['axes.grid'] = False 318 self.figure = mpl .figure.Figure(dpi=dpi,figsize=(5,6))324 self.figure = mplfig.Figure(dpi=dpi,figsize=(5,6)) 319 325 self.canvas = Canvas(self,-1,self.figure) 320 326 self.toolbar = GSASIItoolbar(self.canvas,publish=publish) … … 373 379 def __init__(self,parent,id=-1,dpi=None,**kwargs): 374 380 _tabPlotWin.__init__(self,parent,id=id,**kwargs) 375 self.figure = mpl .figure.Figure(dpi=dpi,figsize=(6,6))381 self.figure = mplfig.Figure(dpi=dpi,figsize=(6,6)) 376 382 self.canvas = Canvas(self,-1,self.figure) 377 383 self.toolbar = GSASIItoolbar(self.canvas,Arrows=False) … … 3999 4005 plotOpt['initNeeded'] = False 4000 4006 # create a temporary hard-copy figure to get output options 4001 figure = mpl .figure.Figure(dpi=200,figsize=(6,8))4007 figure = mplfig.Figure(dpi=200,figsize=(6,8)) 4002 4008 canvas = hcCanvas(figure) 4003 4009 fmtDict = canvas.get_supported_filetypes() … … 4837 4843 '''Write the current plot to a file 4838 4844 ''' 4839 hcfigure = mpl .figure.Figure(dpi=plotOpt['dpi'],figsize=(plotOpt['width'],plotOpt['height']))4845 hcfigure = mplfig.Figure(dpi=plotOpt['dpi'],figsize=(plotOpt['width'],plotOpt['height'])) 4840 4846 CopyRietveldPlot(G2frame,Pattern,Plot,Page,hcfigure) 4841 4847 if 'OriginPro' in plotOpt['format']: … … 5000 5006 5001 5007 # screen preview 5002 figure = mpl .figure.Figure(figsize=(plotOpt['width'],plotOpt['height']))5008 figure = mplfig.Figure(figsize=(plotOpt['width'],plotOpt['height'])) 5003 5009 canvas = Canvas(dlg,-1,figure) 5004 5010 vbox.Add(canvas,1,wx.ALL|wx.EXPAND,1) … … 5036 5042 :param mpl.axes Plot: The axes object from the Rietveld plot 5037 5043 :param wx.Panel Page: The tabbed panel for the Rietveld plot 5038 :param m pl.figure figure: The figure object from the Rietveld plot5044 :param matplotlib.figure.Figure figure: The figure object from the Rietveld plot 5039 5045 ''' 5040 5046 gs = mpl.gridspec.GridSpec(2, 1, height_ratios=[4, 1]) … … 10030 10036 color wx.Colour object - doesn't work 10031 10037 ''' 10032 figure = mpl .figure.Figure(figsize=(1.,1.),facecolor=(0.,0.,0.,0.))10038 figure = mplfig.Figure(figsize=(1.,1.),facecolor=(0.,0.,0.,0.)) 10033 10039 figure.clf() 10034 10040 canvas = hcCanvas(figure) … … 10501 10507 Z = np.where(Zslice<=Rmax,Zslice,Rmax) 10502 10508 ZU = np.flipud(Z) 10503 figure = mpl .figure.Figure(figsize=(6,6),facecolor=(1.,1.,1.,.5))10509 figure = mplfig.Figure(figsize=(6,6),facecolor=(1.,1.,1.,.5)) 10504 10510 canvas = hcCanvas(figure) 10505 10511 figure.clf() -
trunk/GSASIItestplot.py
r3935 r5471 10 10 import wx.aui 11 11 import matplotlib as mpl 12 import matplotlib.figure as mplfig 12 13 try: 13 14 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as Canvas … … 23 24 def __init__(self, parent, id = -1, dpi = None, **kwargs): 24 25 wx.Panel.__init__(self, parent, id=id, **kwargs) 25 self.figure = mpl .figure.Figure(dpi=dpi, #figsize=(5,7)26 self.figure = mplfig.Figure(dpi=dpi, #figsize=(5,7) 26 27 ) 27 28 self.canvas = Canvas(self, -1, self.figure)
Note: See TracChangeset
for help on using the changeset viewer.