Changeset 4649 for trunk/GSASIIplot.py


Ignore:
Timestamp:
Nov 5, 2020 11:13:18 AM (3 years ago)
Author:
toby
Message:

showslice not defined in older GPXs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r4648 r4649  
    84108410                    G2frame.G2plotNB.status.SetStatusText('New quaternion: %.2f+, %.2fi+ ,%.2fj+, %.2fk'%(Q[0],Q[1],Q[2],Q[3]),1)
    84118411                Draw('move')
    8412         elif drawingData['showSlice']:
     8412        elif drawingData.get('showSlice'):
    84138413            View = GL.glGetIntegerv(GL.GL_VIEWPORT)
    84148414            Tx,Ty,Tz = drawingData['viewPoint'][0]
     
    84168416            Cx,Cy,Cz = GLU.gluUnProject(newxy[0],View[3]-newxy[1],tz)
    84178417            rho = G2mth.getRho([Cx,Cy,Cz],mapData)
    8418             if drawingData['showSlice'] in [1,3]:
     8418            if drawingData.get('showSlice') in [1,3]:
    84198419                contlevels = contourSet.get_array()
    84208420                contstr = str(contlevels).strip('[]')
     
    94719471            plt.rcParams['figure.figsize'] = [6.0,6.0]
    94729472            plt.cla()
    9473             if drawingData['showSlice'] in [1,]:
     9473            if drawingData.get('showSlice') in [1,]:
    94749474                contourSet = plt.contour(Z,colors='k',linewidths=1)
    9475             if drawingData['showSlice'] in [2,3]:
     9475            if drawingData.get('showSlice') in [2,3]:
    94769476                acolor = mpl.cm.get_cmap(drawingData.get('contourColor','Paired'))                   
    94779477                plt.imshow(ZU,aspect='equal',cmap=acolor,alpha=0.75,interpolation='bilinear')
    9478                 if drawingData['showSlice'] in [3,]:
     9478                if drawingData.get('showSlice') in [3,]:
    94799479                    contourSet = plt.contour(ZU,colors='k',linewidths=1)
    94809480            plt.axis("off")
Note: See TracChangeset for help on using the changeset viewer.