Changeset 6c4130a in sasview
- 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
- Files:
-
- 4 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 """ -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/Plotter1D.py
r7c755888 r6c4130a 139 139 i += 1 140 140 _labels['Line'] = i 141 i += 1 142 _labels['Dash'] = i 143 i += 1 144 _labels['Vline'] = i 145 i += 1 146 _labels['Step'] = i 141 147 return _labels 142 148 … … 268 274 if data.__class__.__name__ == 'Data2D': 269 275 return 270 if data.id in self.plots.keys(): 276 plot_keys = self.plots.keys() 277 if data.id in plot_keys: 271 278 #Recover panel prop.s 272 279 xlo, xhi = self.subplot.get_xlim() … … 279 286 data.symbol = old_data.symbol 280 287 data.markersize = old_data.markersize 288 data.zorder = len(plot_keys) 281 289 # Replace data 282 290 self.graph.replace(data) … … 298 306 self.plots[data.id] = data 299 307 self.graph.add(self.plots[data.id]) 308 data.zorder = len(plot_keys) 300 309 ## Set the view scale for all plots 301 310 try: -
sansguiframe/src/sans/guiframe/local_perspectives/plotting/appearanceDialog.py
rb618b7f r6c4130a 217 217 i += 1 218 218 _labels['Line'] = i 219 i += 1 220 _labels['Dash'] = i 221 i += 1 222 _labels['Vline'] = i 223 i += 1 224 _labels['Step'] = i 219 225 return _labels 220 226
Note: See TracChangeset
for help on using the changeset viewer.