Changeset b4b8589 in sasview
- Timestamp:
- Dec 8, 2016 7:53:56 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:
- fecfe28
- Parents:
- cad617b
- Location:
- src/sas/qtgui
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/DataExplorer.py
rcad617b rb4b8589 411 411 raise AttributeError, msg 412 412 413 413 414 if plots and \ 414 hasattr(new_plot, 'data') and \415 len(new_plot.data.x) > 0:416 self.plotAdd(new_plot)415 hasattr(new_plot, 'data') and \ 416 isinstance(new_plot.data, Data1D): 417 self.plotAdd(new_plot) 417 418 418 419 def plotAdd(self, new_plot): -
src/sas/qtgui/Plotter.py
r416fa8f rb4b8589 23 23 self.title(title=value.title) 24 24 25 def plot(self, marker=None, linestyle=None ):25 def plot(self, marker=None, linestyle=None, hide_error=False): 26 26 """ 27 27 Plot self._data … … 34 34 35 35 if linestyle == None: 36 linestyle = '-' 37 38 # plot data with title 39 ax.plot(self._data.view.x, 40 self._data.view.y, 41 marker=marker, 42 linestyle=linestyle, 43 label=self._title) 36 linestyle = '' 37 38 # plot data with/without errorbars 39 if hide_error: 40 ax.plot(self._data.view.x, self._data.view.y, 41 marker=marker, 42 linestyle=linestyle, 43 label=self._title) 44 else: 45 ax.errorbar(self._data.view.x, self._data.view.y, 46 yerr=self._data.view.dx, xerr=None, 47 capsize=2, linestyle='', 48 barsabove=False, 49 marker=marker, 50 lolims=False, uplims=False, 51 xlolims=False, xuplims=False, 52 label=self._title) 44 53 45 54 # Now add the legend with some customizations. … … 206 215 QtGui.QDialog.__init__(self) 207 216 PlotterWidget.__init__(self, manager=parent, quickplot=quickplot) 208 217 icon = QtGui.QIcon() 218 icon.addPixmap(QtGui.QPixmap(":/res/ball.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 219 self.setWindowIcon(icon) 220 221 -
src/sas/qtgui/Plotter2D.py
rcad617b rb4b8589 154 154 155 155 cbax = self.figure.add_axes([0.84, 0.2, 0.02, 0.7]) 156 157 # Current labels for axes 158 self.ax.set_ylabel(self.y_label) 159 self.ax.set_xlabel(self.x_label) 160 161 # Title only for regular charts 162 if not self.quickplot: 163 self.ax.set_title(label=self._title) 164 165 156 166 else: 157 167 # clear the previous 2D from memory … … 166 176 ax = Axes3D(self.figure) 167 177 cbax = self.figure.add_axes([0.84, 0.1, 0.02, 0.8]) 178 168 179 # Disable rotation for large sets. 169 180 # TODO: Define "large" for a dataset … … 182 193 else: 183 194 cb = self.figure.colorbar(im, cax=cbax) 195 184 196 cb.update_bruteforce(im) 185 197 cb.set_label('$' + self.scale + '$') … … 195 207 QtGui.QDialog.__init__(self) 196 208 Plotter2DWidget.__init__(self, manager=parent, quickplot=quickplot, dimension=dimension) 209 icon = QtGui.QIcon() 210 icon.addPixmap(QtGui.QPixmap(":/res/ball.ico"), QtGui.QIcon.Normal, QtGui.QIcon.Off) 211 self.setWindowIcon(icon) -
src/sas/qtgui/PlotterBase.py
r416fa8f rb4b8589 14 14 DEFAULT_CMAP = pylab.cm.jet 15 15 from sas.qtgui.ScaleProperties import ScaleProperties 16 import sas.qtgui.PlotUtilities as PlotUtilities17 16 import sas.qtgui.PlotHelper as PlotHelper 18 17 … … 50 49 self.qx_data = [] 51 50 self.qy_data = [] 52 self.color =053 self.symbol =051 self.color = 0 52 self.symbol = 0 54 53 self.grid_on = False 55 54 self.scale = 'linear' … … 79 78 @property 80 79 def data(self): 80 """ data getter """ 81 81 return self._data 82 82 … … 158 158 Display the context menu 159 159 """ 160 self.contextMenu.exec_( self.canvas.mapToGlobal(event.pos()))160 self.contextMenu.exec_(self.canvas.mapToGlobal(event.pos())) 161 161 162 162 def clean(self): … … 201 201 dialog.setModal(True) 202 202 dialog.setWindowTitle("Print") 203 if (dialog.exec_() != QtGui.QDialog.Accepted):203 if dialog.exec_() != QtGui.QDialog.Accepted: 204 204 return 205 205 206 206 painter = QtGui.QPainter(printer) 207 # Grab the widget screenshot 208 pmap = QtGui.QPixmap.grabWidget(self) 207 209 # Create a label with pixmap drawn 208 pmap = QtGui.QPixmap.grabWidget(self)209 210 printLabel = QtGui.QLabel() 210 211 printLabel.setPixmap(pmap)
Note: See TracChangeset
for help on using the changeset viewer.