Changeset b789967 in sasview for src/sas/qtgui/Plotter.py


Ignore:
Timestamp:
Feb 4, 2017 1:01:26 PM (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:
e712ca5
Parents:
965fbd8
Message:

More minor fixes to plotting

File:
1 edited

Legend:

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

    r3bdbfcc rb789967  
    8282 
    8383        # Plot name 
    84         self.title(title=self.data.title) 
     84        if self.data.title: 
     85            self.title(title=self.data.title) 
     86        else: 
     87            self.title(title=self.data.name) 
    8588 
    8689        # Error marker toggle 
     
    134137        # Now add the legend with some customizations. 
    135138        self.legend = ax.legend(loc='upper right', shadow=True) 
    136         self.legend.set_picker(True) 
     139        if self.legend: 
     140            self.legend.set_picker(True) 
    137141 
    138142        # Current labels for axes 
     
    191195        for id in self.plot_dict.keys(): 
    192196            plot = self.plot_dict[id] 
    193             #name = plot.name 
    194             name = plot.title 
     197 
     198            name = plot.name if plot.name else plot.title 
    195199            plot_menu = self.contextMenu.addMenu('&%s' % name) 
    196200 
Note: See TracChangeset for help on using the changeset viewer.