Changeset 5251ec6 in sasview for src/sas/sasgui/plottools/PlotPanel.py
- Timestamp:
- Oct 11, 2018 2:20:56 PM (6 years ago)
- Branches:
- master, magnetic_scatt, release-4.2.2, ticket-1009, ticket-1249
- Children:
- 98b9f32
- Parents:
- 67ed543
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/sasgui/plottools/PlotPanel.py
r2469df7 r5251ec6 6 6 import logging 7 7 import traceback 8 import math 9 import os 10 import operator 11 import copy 12 8 13 import wx 14 import numpy as np 15 9 16 # Try a normal import first 10 17 # If it fails, try specifying a version … … 15 22 from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg 16 23 from matplotlib.figure import Figure 17 import os18 import transform19 #TODO: make the plottables interactive20 from binder import BindArtist21 24 from matplotlib.font_manager import FontProperties 22 DEBUG = False23 24 from plottables import Graph25 from TextDialog import TextDialog26 from LabelDialog import LabelDialog27 import operator28 29 import math30 25 import pylab 31 26 DEFAULT_CMAP = pylab.cm.jet 32 import copy33 import numpy as np34 27 35 28 from sas.sasgui.guiframe.events import StatusEvent 29 30 #TODO: make the plottables interactive 31 from . import transform 32 from .TextDialog import TextDialog 33 from .LabelDialog import LabelDialog 34 from .binder import BindArtist 35 from .convert_units import convert_unit 36 from .plottables import Graph 36 37 from .toolbar import NavigationToolBar, PlotPrintout, bind 37 38 39 DEBUG = False 38 40 logger = logging.getLogger(__name__) 39 41 … … 44 46 for a in obj.get_children(): show_tree(a, d + 1) 45 47 46 from convert_units import convert_unit47 48 48 49 … … 116 117 self.figure = Figure(None, dpi, linewidth=2.0) 117 118 self.color = '#b3b3b3' 118 from canvas import FigureCanvas119 from .canvas import FigureCanvas 119 120 self.canvas = FigureCanvas(self, -1, self.figure) 120 121 self.SetColor(color) … … 657 658 else: 658 659 plot_dict = plotlist 659 from fitDialog import LinearFit660 from .fitDialog import LinearFit 660 661 661 662 if len(plot_dict.keys()) > 0: 662 first_item = plot_dict.keys()[0]663 first_item = list(plot_dict.keys())[0] 663 664 dlg = LinearFit(parent=None, plottable=first_item, 664 665 push_data=self.onFitDisplay, … … 703 704 704 705 """ 705 from fitDialog import LinearFit706 from .fitDialog import LinearFit 706 707 if self._fit_dialog is not None: 707 708 return … … 736 737 first_item = plot_list.keys()[0] 737 738 if first_item.x != []: 738 from PropertyDialog import Properties739 from .PropertyDialog import Properties 739 740 dial = Properties(self, -1, 'Properties') 740 741 dial.setValues(self.prevXtrans, self.prevYtrans, self.viewModel) … … 1001 1002 Remove legend for ax or the current axes. 1002 1003 """ 1003 from pylab import gca1004 1004 if ax is None: 1005 ax = gca()1005 ax = pylab.gca() 1006 1006 ax.legend_ = None 1007 1007 … … 1327 1327 if id is None: 1328 1328 id = name 1329 from plottable_interactor import PointInteractor1329 from .plottable_interactor import PointInteractor 1330 1330 p = PointInteractor(self, self.subplot, zorder=zorder, id=id) 1331 1331 if p.markersize is not None: … … 1344 1344 if id is None: 1345 1345 id = name 1346 from plottable_interactor import PointInteractor1346 from .plottable_interactor import PointInteractor 1347 1347 p = PointInteractor(self, self.subplot, zorder=zorder, id=id) 1348 1348 p.curve(x, y, dy=dy, color=color, symbol=symbol, zorder=zorder, … … 1754 1754 self.graph.delete(self.fit_result) 1755 1755 if hasattr(self, 'plots'): 1756 if 'fit' in self.plots .keys():1756 if 'fit' in self.plots: 1757 1757 del self.plots['fit'] 1758 1758 self.ly = None
Note: See TracChangeset
for help on using the changeset viewer.