Changeset f4a1433 in sasview for src/sas/sasgui/plottools
- Timestamp:
- Oct 24, 2017 2:44:26 AM (7 years ago)
- 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:
- fca1f50, d6b234b
- Parents:
- 16afe01 (diff), 5582b078 (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. - Location:
- src/sas/sasgui/plottools
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/LineModel.py
r959eb01 ra26f67f 2 2 """ 3 3 Provide Line function (y= Ax + B). Until July 10, 2016 this function provided 4 (y= A + Bx). This however was contrary to all the other code using it which 4 (y= A + Bx). This however was contrary to all the other code using it which 5 5 assumed (y= mx+b) or in this nomenclature (y=Ax + B). This lead to some 6 6 contortions in the code and worse incorrect calculations until now for at least … … 67 67 Evaluate the model 68 68 69 :note: This is the function called by fitDialog to calculate the70 the y(xmin) and y(xmax), but the only difference between this and71 runXY is when the if statement is true. I however cannot see what that72 function is for. It needs to be documented here or removed.73 PDB 7/10/1674 75 69 :param x: simple value 76 70 77 71 :return: (Line value) 72 73 .. note:: 74 This is the function called by fitDialog to calculate the 75 the y(xmin) and y(xmax), but the only difference between this and 76 runXY is when the if statement is true. I however cannot see what 77 that function is for. It needs to be documented here or removed. 78 PDB 7/10/16 78 79 """ 79 80 if x.__class__.__name__ == 'list': … … 89 90 """ 90 91 Evaluate the model. 91 92 :note: This is to be what is called by fitDialog for the actual fit93 but the only difference between this and run is when the if94 statement is true. I however cannot see what that function95 is for. It needs to be documented here or removed. PDB 7/10/1696 92 97 93 :param x: simple value … … 99 95 :return: Line value 100 96 97 .. note:: 98 This is to be what is called by fitDialog for the actual fit 99 the only difference between this and run is when the if 100 statement is true. I however cannot see what that function 101 is for. It needs to be documented here or removed. PDB 7/10/16 101 102 """ 102 103 if x.__class__.__name__ == 'list': -
src/sas/sasgui/plottools/__init__.py
rd7bb526 refe730d 1 import config2 1 from PlotPanel import PlotPanel 3 2 from plottables import Data1D, Theory1D -
src/sas/sasgui/plottools/plottables.py
r45dffa69 r2d9526d 239 239 def replace(self, plottable): 240 240 """Replace an existing plottable from the graph""" 241 selected_color = None 241 # If the user has set a custom color, ensure the new plot is the same color 242 selected_color = plottable.custom_color 242 243 selected_plottable = None 243 244 for p in self.plottables.keys(): 244 245 if plottable.id == p.id: 245 246 selected_plottable = p 246 selected_color = self.plottables[p] 247 if selected_color is None: 248 selected_color = self.plottables[p] 247 249 break 248 if 250 if selected_plottable is not None and selected_color is not None: 249 251 del self.plottables[selected_plottable] 252 plottable.custom_color = selected_color 250 253 self.plottables[plottable] = selected_color 251 254 -
src/sas/sasgui/plottools/config.py
ra2a1c20 r092a3d9 30 30 __all__ = [] 31 31 32 plot_version = "0.98" 33 plot_backend = "WXAgg" 32 #plot_version = "0.98" 33 #plot_backend = "WXAgg" 34 plot_backend = "Qt4Agg" 34 35 35 36 # Sort out matplotlib version 36 37 import matplotlib 37 try:38 import pkg_resources39 pkg_resources.require("matplotlib>=" + plot_version)40 except ImportError:41 from distutils.version import LooseVersion as Version42 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) 45 46 46 47 # Sort out matplotlib backend … … 51 52 elif matplotlib.get_backend() != plot_backend: 52 53 # 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 54 56 55 57 # set global plot style … … 58 60 matplotlib.rcParams[param] = 0.05 59 61 matplotlib.rcParams['legend.numpoints'] = 1 62 #matplotlib.rcParams['interactive'] = True 63 60 64 61 65 # this should happen after initial matplotlib configuration 62 from .toolbar import NavigationToolBar63 from matplotlib.backends import backend_wxagg64 backend_wxagg.NavigationToolbar2WxAgg = NavigationToolBar66 #from .toolbar import NavigationToolBar 67 #from matplotlib.backends import backend_wxagg 68 #backend_wxagg.NavigationToolbar2WxAgg = NavigationToolBar 65 69 66 70 # CRUFT: bumps 0.7.5.6 and older uses wrong toolbar 67 backend_wxagg.NavigationToolbar2Wx = NavigationToolBar71 #backend_wxagg.NavigationToolbar2Wx = NavigationToolBar -
src/sas/sasgui/plottools/toolbar.py
r959eb01 rc416a17 171 171 wx.TheClipboard.SetData(bmp) 172 172 wx.TheClipboard.Close() 173 174
Note: See TracChangeset
for help on using the changeset viewer.