Changeset 5d89f43 in sasview for src/sas/qtgui/Plotter2D.py
- Timestamp:
- Jan 25, 2017 8:51:26 AM (8 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:
- 3bdbfcc
- Parents:
- 03c372d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotter2D.py
r03c372d r5d89f43 29 29 # Default scale 30 30 self.scale = 'log_{10}' 31 self.vmin = None 32 self.vmax = None 31 33 32 34 @property … … 208 210 data=self.data) 209 211 212 color_map_dialog.apply_signal.connect(self.onApplyMap) 213 210 214 if color_map_dialog.exec_() == QtGui.QDialog.Accepted: 211 self.cmap = color_map_dialog.cmap() 212 self.vmin, self.vmax = color_map_dialog.norm() 213 # Redraw the chart with new cmap 214 self.plot() 215 pass 215 self.onApplyMap(color_map_dialog.norm(), color_map_dialog.cmap()) 216 217 def onApplyMap(self, v_values, cmap): 218 """ 219 Update the chart color map based on data passed from the widget 220 """ 221 self.cmap = str(cmap) 222 self.vmin, self.vmax = v_values 223 # Redraw the chart with new cmap 224 self.plot() 216 225 217 226 def showPlot(self, data, qx_data, qy_data, xmin, xmax, ymin, ymax, … … 261 270 self.figure.subplots_adjust(left=0.2, right=.8, bottom=.2) 262 271 272 zmax_temp = self.zmax 273 if self.vmin is not None: 274 zmin_temp = self.vmin 275 zmax_temp = self.vmax 276 263 277 im = self.ax.imshow(output, interpolation='nearest', 264 278 origin='lower', 265 vmin=zmin_temp, vmax= self.zmax,279 vmin=zmin_temp, vmax=zmax_temp, 266 280 cmap=self.cmap, 267 281 extent=(self.xmin, self.xmax, … … 301 315 302 316 ax = Axes3D(self.figure) 303 #cbax = self.figure.add_axes([0.84, 0.1, 0.02, 0.8])304 317 305 318 # Disable rotation for large sets.
Note: See TracChangeset
for help on using the changeset viewer.