- Timestamp:
- Jan 28, 2021 1:05:18 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIplot.py
r4782 r4786 977 977 Page.Choice += ('w: select |DFsq|/sig','1: select |DFsq|>sig','3: select |DFsq|>3sig',) 978 978 try: 979 Plot.set_aspect(aspect='equal') 980 except: #broken in mpl 3.1.1; worked in mpl 3.0.3 979 Plot.set_box_aspect((1,1,1)) 980 # Plot.set_aspect('equal') 981 except: #broken in mpl 3.1.1; worked in mpl 3.0.3 981 982 pass 982 983 … … 5330 5331 Plot.set_ylabel(labelY) 5331 5332 Plot.set_zlabel(labelZ) 5332 Plot.set_aspect('equal') 5333 try: 5334 Plot.set_box_aspect((1,1,1)) 5335 # Plot.set_aspect('equal') 5336 except: #broken in mpl 3.1.1; worked in mpl 3.0.3 5337 pass 5333 5338 # except: 5334 5339 # print('Plot3dXYZ failure') … … 6017 6022 Plot.set_zlim3d(XYZlim) 6018 6023 try: 6019 Plot.set_aspect('equal') 6024 Plot.set_box_aspect((1,1,1)) 6025 # Plot.set_aspect('equal') 6020 6026 except: #broken in mpl 3.1.1; worked in mpl 3.0.3 6021 6027 pass … … 6292 6298 Plot.set_zlim3d(XYZlim) 6293 6299 try: 6294 Plot.set_aspect('equal') 6300 Plot.set_box_aspect((1,1,1)) 6301 # Plot.set_aspect('equal') 6295 6302 except: #broken in mpl 3.1.1; worked in mpl 3.0.3 6296 pass 6303 pass 6297 6304 Plot.set_title('%d %d %d Pole distribution for %s'%(h,k,l,pName)) 6298 6305 Plot.set_xlabel(r'X, MRD') … … 9166 9173 GL.glPopMatrix() 9167 9174 9175 def RenderLabel2(x,y,z,label,r,color,matRot,offset=wx.RealPoint(0.,0.)): 9176 ''' 9177 color wx.Colour object - doesn't work 9178 ''' 9179 figure = mpl.figure.Figure(figsize=(1.,1.),facecolor=(0.,0.,0.,0.)) 9180 figure.clf() 9181 canvas = hcCanvas(figure) 9182 ax0 = figure.add_subplot(111) 9183 ax0.text(0.,0.,label) 9184 ax0.axis("off") 9185 figure.subplots_adjust(bottom=0.,top=1.,left=0.,right=1.,wspace=0.,hspace=0.) 9186 agg = canvas.switch_backends(hcCanvas) 9187 agg.draw() 9188 img, (width, height) = agg.print_to_buffer() 9189 Timg = np.frombuffer(img, np.uint8).reshape((height, width, 4)) 9190 RenderViewPlane(1.0*eplane,Timg,width,height) 9191 9192 9168 9193 def RenderMap(rho,rhoXYZ,indx,Rok): 9169 9194 GL.glShadeModel(GL.GL_FLAT)
Note: See TracChangeset
for help on using the changeset viewer.