Changeset 4641 for trunk/GSASIIphsGUI.py


Ignore:
Timestamp:
Nov 3, 2020 8:30:31 AM (2 years ago)
Author:
vondreele
Message:

add color contouring to map slice display. Will plot lines, colors or lines+colors. Allows color scheme selection

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r4634 r4641  
    75157515            drawingData['showRigidBodies'] = True
    75167516        if 'showSlice' not in drawingData:
    7517             drawingData['showSlice'] = False
     7517            drawingData['showSlice'] = 0
     7518        if 'contourColor' not in drawingData:
     7519            drawingData['contourColor'] = 'RdYlGn'
    75187520        if 'Plane' not in drawingData:
    75197521            drawingData['Plane'] = [[0,0,1],False,False,0.0,[255,255,0]]
     
    88068808               
    88078809            def OnShowSlice(event):
    8808                 drawingData['showSlice'] = G2frame.phaseDisplay.showCS.GetValue()
     8810                drawingData['showSlice'] = G2frame.phaseDisplay.showCS.GetSelection()
     8811                G2frame.phaseDisplay.showCS.SetValue(slices[drawingData['showSlice']])
    88098812                G2plt.PlotStructure(G2frame,data)
    88108813               
     
    88828885            showSizer = wx.BoxSizer(wx.VERTICAL)           
    88838886            lineSizer = wx.BoxSizer(wx.HORIZONTAL)
    8884             lineSizer.Add(wx.StaticText(drawOptions,-1,' Background color:'),0,WACV)
    8885             backColor = wcs.ColourSelect(drawOptions, -1,colour=drawingData['backColor'],size=wx.Size(25,25))
     8887            lineSizer.Add(wx.StaticText(drawOptions,label=' Background color:'),0,WACV)
     8888            backColor = wcs.ColourSelect(drawOptions,colour=drawingData['backColor'],size=wx.Size(25,25))
    88868889            backColor.Bind(wcs.EVT_COLOURSELECT, OnBackColor)
    88878890            lineSizer.Add(backColor,0,WACV)
     
    89518954                line3Sizer = wx.BoxSizer(wx.HORIZONTAL)
    89528955           
    8953                 G2frame.phaseDisplay.showCS = wx.CheckBox(drawOptions,-1,label=' Show contour slice?')
    8954                 G2frame.phaseDisplay.showCS.Bind(wx.EVT_CHECKBOX, OnShowSlice)
    8955                 G2frame.phaseDisplay.showCS.SetValue(drawingData['showSlice'])           
     8956                slices = ['','lines','colors','lines+colors']
     8957                line3Sizer.Add(wx.StaticText(drawOptions,label=' Show map slice as '),0,WACV)
     8958                G2frame.phaseDisplay.showCS = wx.ComboBox(drawOptions,value=slices[drawingData['showSlice']],
     8959                    choices=slices,style=wx.CB_READONLY|wx.CB_DROPDOWN)
     8960                G2frame.phaseDisplay.showCS.Bind(wx.EVT_COMBOBOX, OnShowSlice)
     8961                G2frame.phaseDisplay.showCS.SetValue(slices[drawingData['showSlice']])           
    89568962                line3Sizer.Add(G2frame.phaseDisplay.showCS,0,WACV)
    8957                 contourMaxTxt = wx.StaticText(drawOptions,-1,' Max.: '+'%.2f'%(drawingData['contourMax']*generalData['Map']['rhoMax']))
     8963                contourMaxTxt = wx.StaticText(drawOptions,label=' Max.: '+'%.2f'%(drawingData['contourMax']*generalData['Map']['rhoMax']))
    89588964                line3Sizer.Add(contourMaxTxt,0,WACV)
    89598965                contourMax = wx.Slider(drawOptions,style=wx.SL_HORIZONTAL,size=(150,25),value=int(100*drawingData['contourMax']))
     
    94069412        shSizer = wx.FlexGridSizer(0,6,5,5)
    94079413        shSizer.Add(wx.StaticText(Texture,-1,' Texture model: '),0,WACV)
    9408         shModel = wx.ComboBox(Texture,-1,value=textureData['Model'],choices=shModels,
     9414        shModel = wx.ComboBox(Texture,value=textureData['Model'],choices=shModels,
    94099415            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    94109416        shModel.Bind(wx.EVT_COMBOBOX,OnShModel)
    94119417        shSizer.Add(shModel,0,WACV)
    94129418        shSizer.Add(wx.StaticText(Texture,-1,'  Harmonic order: '),0,WACV)
    9413         shOrder = wx.ComboBox(Texture,-1,value=str(textureData['Order']),choices=[str(2*i) for i in range(18)],
     9419        shOrder = wx.ComboBox(Texture,value=str(textureData['Order']),choices=[str(2*i) for i in range(18)],
    94149420            style=wx.CB_READONLY|wx.CB_DROPDOWN)
    94159421        shOrder.Bind(wx.EVT_COMBOBOX,OnShOrder)
Note: See TracChangeset for help on using the changeset viewer.