Changeset 55d89f8 in sasview for src/sas/qtgui/DataExplorer.py


Ignore:
Timestamp:
Dec 6, 2016 8:35:10 AM (7 years ago)
Author:
Piotr Rozyczko <rozyczko@…>
Branches:
ESS_GUI, ESS_GUI_Docs, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_iss959, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
Children:
64f1e93
Parents:
6d05e1d
Message:

Context menu 3D plotting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/qtgui/DataExplorer.py

    ref01be4 r55d89f8  
    768768            method_name='Plotter2D' 
    769769 
    770         # TODO: Replace this with the proper MaskPlotPanel from plottools 
    771770        new_plot = globals()[method_name](self, quickplot=True) 
    772771        new_plot.data = data 
     
    782781    def quickData3DPlot(self): 
    783782        """ 
    784         """ 
    785         print "quickData3DPlot" 
    786         pass 
     783        Slowish 3D plot 
     784        """ 
     785        index = self.treeView.selectedIndexes()[0] 
     786        model_item = self.model.itemFromIndex(self.data_proxy.mapToSource(index)) 
     787        data = GuiUtils.dataFromItem(model_item) 
     788 
     789        new_plot = Plotter2D(self, quickplot=True, dimension=3) 
     790        new_plot.data = data 
     791        new_plot.plot(marker='o', linestyle='') 
     792 
     793        # Update the global plot counter 
     794        title = "Plot " + data.name 
     795        new_plot.setWindowTitle(title) 
     796 
     797        # Show the plot 
     798        new_plot.show() 
    787799 
    788800    def showEditDataMask(self): 
Note: See TracChangeset for help on using the changeset viewer.