Changeset 49e124c in sasview for src/sas


Ignore:
Timestamp:
Nov 22, 2016 7:23:03 AM (8 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:
14d9c7b
Parents:
469b4622
Message:

Initial functionality of Plot2D

Location:
src/sas/qtgui
Files:
1 added
1 edited

Legend:

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

    r469b4622 r49e124c  
    2121import PlotHelper 
    2222from Plotter import Plotter 
     23from Plotter2D import Plotter2D 
    2324from DroppableDataLoadWidget import DroppableDataLoadWidget 
    2425 
     
    393394 
    394395        # Call show on requested plots 
    395         new_plot = Plotter(self) 
    396396        for plot_set in plots: 
     397            new_plot = None 
     398            if isinstance(plot_set, Data1D): 
     399                new_plot = Plotter(self) 
     400            elif isinstance(plot_set, Data2D): 
     401                new_plot = Plotter2D(self) 
     402            else: 
     403                msg = "Incorrect data type passed to Plotting" 
     404                raise AttributeError, msg 
     405 
    397406            new_plot.data(plot_set) 
    398407            new_plot.plot() 
    399408 
    400         # Update the global plot counter 
    401         title = "Graph"+str(PlotHelper.idOfPlot(new_plot)) 
    402         new_plot.setWindowTitle(title) 
    403  
    404         # Add the plot to the workspace 
    405         self.parent.workspace().addWindow(new_plot) 
    406  
    407         # Show the plot 
    408         new_plot.show() 
    409  
    410         # Update the active chart list 
    411         self.active_plots.append(title) 
     409            # Update the global plot counter 
     410            title = "Graph"+str(PlotHelper.idOfPlot(new_plot)) 
     411            new_plot.setWindowTitle(title) 
     412 
     413            # Add the plot to the workspace 
     414            self.parent.workspace().addWindow(new_plot) 
     415 
     416            # Show the plot 
     417            new_plot.show() 
     418 
     419            # Update the active chart list 
     420            self.active_plots.append(title) 
    412421 
    413422    def appendPlot(self): 
Note: See TracChangeset for help on using the changeset viewer.