Changeset 2f12acc in sasview for src/sas/sasgui
- Timestamp:
- Aug 12, 2016 10:26:05 AM (8 years ago)
- Branches:
- master, 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, costrafo411, magnetic_scatt, release-4.1.1, release-4.1.2, release-4.2.2, release_4.0.1, ticket-1009, ticket-1094-headless, ticket-1242-2d-resolution, ticket-1243, ticket-1249, ticket885, unittest-saveload
- Children:
- 2eb3d18c
- Parents:
- 2cff9db
- Location:
- src/sas/sasgui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/guiframe/local_perspectives/plotting/Plotter1D.py
refb482a r2f12acc 604 604 605 605 if self.parent.ClassName.count('wxDialog') == 0: 606 wx_id = ids.next() 607 plot_menu.Append(wx_id, '&Linear Fit', name) 608 wx.EVT_MENU(self, wx_id, self.onFitting) 609 plot_menu.AppendSeparator() 606 if plot.id != 'fit': 607 wx_id = ids.next() 608 plot_menu.Append(wx_id, '&Linear Fit', name) 609 wx.EVT_MENU(self, wx_id, self.onFitting) 610 plot_menu.AppendSeparator() 610 611 611 612 wx_id = ids.next() -
src/sas/sasgui/plottools/PlotPanel.py
r1ed6be7 r2f12acc 15 15 import os 16 16 import transform 17 from plottables import Data1D18 17 #TODO: make the plottables interactive 19 18 from binder import BindArtist … … 190 189 191 190 # new data for the fit 191 from sas.sasgui.guiframe.dataFitting import Data1D 192 192 self.fit_result = Data1D(x=[], y=[], dy=None) 193 193 self.fit_result.symbol = 13 … … 1725 1725 if remove_fit: 1726 1726 self.graph.delete(self.fit_result) 1727 if hasattr(self, 'plots'): 1728 if 'fit' in self.plots.keys(): 1729 del self.plots['fit'] 1727 1730 self.ly = None 1728 1731 self.q_ctrl = None … … 1738 1741 _yscale = 'linear' 1739 1742 for item in list: 1743 if item.id == 'fit': 1744 continue 1740 1745 item.setLabel(self.xLabel, self.yLabel) 1741 1746 # control axis labels from the panel itself … … 1892 1897 self.graph.render(self) 1893 1898 self._offset_graph() 1899 if hasattr(self, 'plots'): 1900 # Used by Plotter1D 1901 fit_id = 'fit' 1902 self.fit_result.id = fit_id 1903 self.fit_result.title = 'Fit' 1904 self.fit_result.name = 'Fit' 1905 self.plots[fit_id] = self.fit_result 1894 1906 self.subplot.figure.canvas.draw_idle() 1895 1907
Note: See TracChangeset
for help on using the changeset viewer.