Changeset 6c4130a in sasview for plottools/src/danse/common
- Timestamp:
- Jul 7, 2012 4:53:54 PM (12 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:
- e4cd34c
- Parents:
- 88a65e2
- Location:
- plottools/src/danse/common/plottools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
plottools/src/danse/common/plottools/canvas.py
r10bfeb3 r6c4130a 152 152 """ 153 153 self.panel.subplot.grid(self.panel.grid_on) 154 if self.panel.legend _pos_loc:154 if self.panel.legend != None and self.panel.legend_pos_loc: 155 155 self.panel.legend._loc = self.panel.legend_pos_loc 156 156 self.idletimer.Restart(5, *args, **kwargs) # Delay by 5 ms -
plottools/src/danse/common/plottools/plottable_interactor.py
r69e0760 r6c4130a 4 4 import plottables 5 5 from BaseInteractor import _BaseInteractor 6 7 6 8 7 class PointInteractor(_BaseInteractor): … … 18 17 self.colorlist = ['b', 'g', 'r', 'c', 'm', 'y', 'k'] 19 18 self.symbollist = ['o', 'x', '^', 'v', '<', '>', 20 '+', 's', 'd', 'D', 'h', 'H', 'p', '-'] 19 '+', 's', 'd', 'D', 'h', 'H', 'p', '-', '--', 20 'vline', 'step'] 21 21 self.markersize = None 22 22 self.marker = None … … 40 40 """ 41 41 #Draw curve 42 if self._symbol(symbol) == '-' :42 if self._symbol(symbol) == '-' or self._symbol(symbol) == '--': 43 43 l_width = markersize * 0.4 44 return self.curve(x=x, y=y, color=color, label=label, width=l_width) 44 return self.curve(x=x, y=y, color=color, symbol=symbol, 45 label=label, width=l_width) 45 46 #return 47 if self._symbol(symbol) == 'vline': 48 l_width = markersize * 0.4 49 return self.vline(x=x, y=y, color=color, 50 label=label, width=l_width) 51 if self._symbol(symbol) == 'step': 52 l_width = markersize * 0.4 53 return self.step(x=x, y=y, color=color, 54 label=label, width=l_width) 46 55 if not self.marker == None: 47 56 self.base.connect.clear([self.marker]) … … 54 63 if dy != None and type(dy) == type(()): 55 64 dy = nx.vstack((y-dy[0], dy[1]-y)).transpose() 56 65 zorder = self.zorder 57 66 if dx == None and dy == None: 58 zorder = 167 #zorder = 1 59 68 self.marker = self.axes.plot(x, y, color=self.color, 60 69 marker=self._symbol(symbol), … … 65 74 66 75 if hide_error: 67 zorder = 176 #zorder = 1 68 77 self.marker = self.axes.plot(x, y, color=self.color, 69 78 marker=self._symbol(symbol), … … 72 81 zorder=zorder)[0] 73 82 else: 74 zorder = 283 #zorder = 2 75 84 self.marker = self.axes.errorbar(x, y, yerr=dy, 76 85 xerr=None, … … 97 106 self.color = self._color(color) 98 107 self.marker = self.axes.plot(x, y, color=self.color, lw=width, 99 marker='', linestyle='-', label=label)[0] 100 101 self.connect_markers([self.marker]) 102 self.update() 103 108 marker='', linestyle=self._symbol(symbol), 109 label=label, zorder=self.zorder)[0] 110 111 self.connect_markers([self.marker]) 112 self.update() 113 114 115 def vline(self, x, y, dy=None, color=0, symbol=0, label=None, width=2.0): 116 """ 117 """ 118 if not self.marker == None: 119 self.base.connect.clear([self.marker]) 120 self.color = self._color(color) 121 if min(y) < 0: 122 y_min = 0.0 123 else: 124 y_min = min(y)*9/10 125 self.marker = self.axes.vlines(x=x, ymin=y_min, ymax=y, 126 color=self.color, 127 linestyle='-', label=label, 128 lw=width, zorder=self.zorder) 129 self.connect_markers([self.marker]) 130 self.update() 131 132 def step(self, x, y, dy=None, color=0, symbol=0, label=None, width=2.0): 133 """ 134 """ 135 if not self.marker == None: 136 self.base.connect.clear([self.marker]) 137 self.color = self._color(color) 138 if self.markersize != None: 139 markersize = self.markersize 140 141 self.marker = self.axes.step(x, y, color=self.color, 142 marker='', 143 linestyle='-', label=label, 144 lw=width, zorder=self.zorder)[0] 145 self.connect_markers([self.marker]) 146 self.update() 147 104 148 def connect_markers(self, markers): 105 149 """
Note: See TracChangeset
for help on using the changeset viewer.