Changeset 239214f in sasview
- Timestamp:
- Jan 13, 2017 9:23:38 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:
- 0f3c22d
- Parents:
- 2e3e959
- Location:
- src/sas
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/PlotProperties.py
rdb5cd8d r239214f 34 34 self.cbColor.setCurrentIndex(self._color) 35 35 else: 36 # Need the Custom entry here. "Custom" is always last. 37 self.cbColor.addItems([COLORS.keys()[-1]]) 36 38 self.cbColor.setCurrentIndex(COLORS.keys().index("Custom")) 37 39 -
src/sas/qtgui/PlotUtilities.py
r87cc73a r239214f 3 3 from collections import OrderedDict 4 4 5 # MPL shapes dictionary with some extra styles rendered internally. 6 # Ordered for consistent display in combo boxes 5 7 SHAPES = OrderedDict([ 6 8 ('Circle' , 'o'), … … 27 29 ]) 28 30 31 # MPL Colors dictionary. Ordered for consistent display 29 32 COLORS = OrderedDict([ 30 33 ('Blue', 'b'), -
src/sas/qtgui/Plotter.py
r87cc73a r239214f 166 166 # Additional menu items 167 167 self.contextMenu.addSeparator() 168 self.actionModifyGraphAppearance =\169 self.contextMenu.addAction("Modify Graph Appearance")170 self.contextMenu.addSeparator()171 168 self.actionAddText = self.contextMenu.addAction("Add Text") 172 169 self.actionRemoveText = self.contextMenu.addAction("Remove Text") … … 183 180 184 181 # Define the callbacks 185 self.actionModifyGraphAppearance.triggered.connect(self.onModifyGraph)186 182 self.actionAddText.triggered.connect(self.onAddText) 187 183 self.actionRemoveText.triggered.connect(self.onRemoveText) … … 264 260 self.xLogLabel, self.yLogLabel = self.properties.getValues() 265 261 self.xyTransform(self.xLogLabel, self.yLogLabel) 266 267 def onModifyGraph(self):268 """269 Show a dialog allowing chart manipulations270 """271 print ("onModifyGraph")272 pass273 262 274 263 def onAddText(self): -
src/sas/qtgui/UnitTesting/PlotPropertiesTest.py
rdb5cd8d r239214f 18 18 '''Create the PlotProperties''' 19 19 20 self.widget = PlotProperties(None, 20 self.widget = PlotProperties(None, 21 21 color=1, 22 22 marker=3, … … 36 36 # Check the combo boxes 37 37 self.assertEqual(self.widget.cbColor.currentText(), "Green") 38 self.assertEqual(self.widget.cbColor.count(), 7) 38 39 self.assertEqual(self.widget.cbShape.currentText(), "Triangle Down") 39 40 self.assertEqual(self.widget.txtLegend.text(), "LL") 40 41 self.assertEqual(self.widget.sbSize.value(), 10) 42 43 def testDefaultsWithCustomColor(self): 44 '''Test the GUI when called with custom color''' 45 widget = PlotProperties(None, 46 color="#FF00FF", 47 marker=7, 48 marker_size=10, 49 legend="LL") 50 51 self.assertEqual(widget.cbColor.currentText(), "Custom") 52 self.assertEqual(widget.cbColor.count(), 8) 41 53 42 54 def testOnColorChange(self): -
src/sas/sasgui/plottools/config.py
rcad617b r239214f 30 30 __all__ = [] 31 31 32 plot_version = "0.98"32 #plot_version = "0.98" 33 33 #plot_backend = "WXAgg" 34 34 plot_backend = "Qt4Agg" … … 60 60 matplotlib.rcParams[param] = 0.05 61 61 matplotlib.rcParams['legend.numpoints'] = 1 62 #matplotlib.rcParams['interactive'] = True 63 62 64 63 65 # this should happen after initial matplotlib configuration
Note: See TracChangeset
for help on using the changeset viewer.