Changeset 9687d58 in sasview for src/sas/sasgui/plottools


Ignore:
Timestamp:
Apr 10, 2017 4:01:46 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:
6c8fb2c
Parents:
9208346 (diff), c6f3aec (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into ESS_GUI

Location:
src/sas/sasgui/plottools
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/plottools/PlotPanel.py

    rcad617b r9687d58  
    452452        """ 
    453453        self.cusor_line(event) 
    454         if self.gotLegend == 1: 
     454        if self.gotLegend == 1 and self.leftdown: 
    455455            self._on_legend_motion(event) 
    456456            return 
  • src/sas/sasgui/plottools/plottables.py

    rcad617b r9687d58  
    212212                self.color += plottable.colors() 
    213213                self.plottables[plottable] = self.color 
     214                plottable.custom_color = self.color 
    214215 
    215216    def changed(self): 
  • src/sas/sasgui/plottools/config.py

    rd7bb526 r092a3d9  
    3030__all__ = [] 
    3131 
    32 plot_version = "0.98" 
    33 plot_backend = "WXAgg" 
     32#plot_version = "0.98" 
     33#plot_backend = "WXAgg" 
     34plot_backend = "Qt4Agg" 
    3435 
    3536# Sort out matplotlib version 
    3637import matplotlib 
    37 try: 
    38     import pkg_resources 
    39     pkg_resources.require("matplotlib>=" + plot_version) 
    40 except: 
    41     from distutils.version import LooseVersion as Version 
    42     if Version(matplotlib.__version__) < Version(plot_version): 
    43         msg = "Matplotlib version must be %s or newer" % (plot_version, ) 
    44         raise ImportError(msg) 
     38#try: 
     39#    import pkg_resources 
     40#    pkg_resources.require("matplotlib>=" + plot_version) 
     41#except: 
     42#    from distutils.version import LooseVersion as Version 
     43#    if Version(matplotlib.__version__) < Version(plot_version): 
     44#        msg = "Matplotlib version must be %s or newer" % (plot_version, ) 
     45#        raise ImportError(msg) 
    4546 
    4647# Sort out matplotlib backend 
     
    5152elif matplotlib.get_backend() != plot_backend: 
    5253    # if a backend has already been selected, make sure it is the correct one. 
    53     raise ImportError("Matplotlib not using backend " + plot_backend) 
     54    #raise ImportError("Matplotlib not using backend " + plot_backend) 
     55    pass 
    5456 
    5557# set global plot style 
     
    5860matplotlib.rcParams[param] = 0.05 
    5961matplotlib.rcParams['legend.numpoints'] = 1 
     62#matplotlib.rcParams['interactive'] = True 
     63 
    6064 
    6165# this should happen after initial matplotlib configuration 
    62 from .toolbar import NavigationToolBar 
    63 from matplotlib.backends import backend_wxagg 
    64 backend_wxagg.NavigationToolbar2WxAgg = NavigationToolBar 
     66#from .toolbar import NavigationToolBar 
     67#from matplotlib.backends import backend_wxagg 
     68#backend_wxagg.NavigationToolbar2WxAgg = NavigationToolBar 
    6569 
    6670# CRUFT: bumps 0.7.5.6 and older uses wrong toolbar 
    67 backend_wxagg.NavigationToolbar2Wx = NavigationToolBar 
     71#backend_wxagg.NavigationToolbar2Wx = NavigationToolBar 
  • src/sas/sasgui/plottools/toolbar.py

    rd7bb526 r092a3d9  
    3535 
    3636    # CRUFT: mpl 1.1 uses save rather than save_figure 
    37     try: save_figure = NavigationToolbar2WxAgg.save 
    38     except AttributeError: pass 
     37    #try: save_figure = NavigationToolbar2WxAgg.save 
     38    #except AttributeError: pass 
    3939     
    4040    def _init_toolbar(self): 
Note: See TracChangeset for help on using the changeset viewer.