Changeset 1656


Ignore:
Timestamp:
Feb 13, 2015 3:56:32 PM (7 years ago)
Author:
vondreele
Message:

show succession of 3D HKL plots when switching histograms with arrow keys

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r1655 r1656  
    43844384        refList = data[1]['RefList']
    43854385        FoMax = np.max(refList.T[5+data[1].get('Super',0)])
    4386         controls = {'Type' : 'Fo','ifFc' : True,     
    4387             'HKLmax' : [int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))],
    4388             'HKLmin' : [int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))],
    4389             'FoMax' : FoMax,'Zone' : '001','Layer' : 0,'Scale' : 1.0,'Super':Super,'SuperVec':SuperVec}
    4390         G2plt.PlotSngl(G2frame,newPlot=True,Data=controls,hklRef=refList)
     4386        page = G2frame.G2plotNB.nb.GetSelection()
     4387        tab = ''
     4388        if page >= 0:
     4389            tab = G2frame.G2plotNB.nb.GetPageText(page)
     4390        if '3D' in tab:
     4391            Hmin = np.array([int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))])
     4392            Hmax = np.array([int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))])
     4393            Vpoint = [int(np.mean(refList.T[0])),int(np.mean(refList.T[1])),int(np.mean(refList.T[2]))]
     4394            Page = G2frame.G2plotNB.nb.GetPage(page)
     4395            controls = Page.controls
     4396            G2plt.Plot3DSngl(G2frame,newPlot=False,Data=controls,hklRef=refList,Title=phaseName)
     4397        else:
     4398            controls = {'Type' : 'Fo','ifFc' : True,     
     4399                'HKLmax' : [int(np.max(refList.T[0])),int(np.max(refList.T[1])),int(np.max(refList.T[2]))],
     4400                'HKLmin' : [int(np.min(refList.T[0])),int(np.min(refList.T[1])),int(np.min(refList.T[2]))],
     4401                'FoMax' : FoMax,'Zone' : '001','Layer' : 0,'Scale' : 1.0,'Super':Super,'SuperVec':SuperVec}
     4402            G2plt.PlotSngl(G2frame,newPlot=True,Data=controls,hklRef=refList)
    43914403                 
    43924404################################################################################
  • trunk/GSASIIplot.py

    r1652 r1656  
    596596            Data['Scale'] /= 1.25
    597597        elif key == '0':
     598            drawingData['viewPoint'][0] = [0,0,0]
    598599            Data['Scale'] = 1.0
    599600        elif key == 'I':
     
    926927    Page.camera['viewPoint'] = np.inner(Amat,drawingData['viewPoint'][0])
    927928    Page.camera['backColor'] = np.array(list(drawingData['backColor'])+[0,])/255.
     929    Page.controls = Data
    928930    try:
    929931        Page.canvas.SetCurrent()
Note: See TracChangeset for help on using the changeset viewer.