Changeset 3958


Ignore:
Timestamp:
May 6, 2019 2:11:15 PM (2 years ago)
Author:
vondreele
Message:

add contour level list to status bar (when cursor is moved over plot)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIplot.py

    r3957 r3958  
    76757675
    76767676    # PlotStructure initialization here
    7677     global mcsaXYZ,mcsaTypes,mcsaBonds,txID
     7677    global mcsaXYZ,mcsaTypes,mcsaBonds,txID,contourSet
    76787678    global cell, Vol, Amat, Bmat, A4mat, B4mat
    76797679    txID = 0
     
    76917691    atomData = data['Atoms']
    76927692    mapPeaks = []
     7693    contourSet = 0
    76937694    if generalData.get('DisAglCtrls',{}):
    76947695        BondRadii = generalData['DisAglCtrls']['BondRadii']
     
    80928093            Cx,Cy,Cz = GLU.gluUnProject(newxy[0],View[3]-newxy[1],tz)
    80938094            rho = G2mth.getRho([Cx,Cy,Cz],mapData)
    8094             G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f'%(Cx,Cy,Cz,rho),1)
    8095            
     8095            contlevels = contourSet.get_array()
     8096            contstr = str(contlevels).strip('[]')
     8097            G2frame.G2plotNB.status.SetStatusText('Cursor position: %.4f, %.4f, %.4f; density: %.4f, contours at: %s'%(Cx,Cy,Cz,rho,contstr),1)
    80968098       
    80978099    def OnMouseWheel(event):
     
    89028904                    RenderPlane(plane,color)
    89038905        if drawingData.get('showSlice',False):
     8906            global contourSet
    89048907            if len(D4mapData.get('rho',[])):        #preferentially select 4D map if there
    89058908                modQ = np.array(generalData['SuperVec'][0])
     
    89318934            plt.rcParams['figure.figsize'] = [6.0,6.0]
    89328935            plt.cla()
    8933             plt.contour(Z,colors='k',linewidths=1)
     8936            contourSet = plt.contour(Z,colors='k',linewidths=1)
    89348937            plt.axis("off")
    89358938            plt.subplots_adjust(bottom=0.,top=1.,left=0.,right=1.,wspace=0.,hspace=0.)
Note: See TracChangeset for help on using the changeset viewer.