Changeset 0231f93 in sasview
- Timestamp:
- Aug 31, 2018 5:55:51 AM (6 years ago)
- Branches:
- ESS_GUI, ESS_GUI_batch_fitting, ESS_GUI_bumps_abstraction, ESS_GUI_iss1116, ESS_GUI_iss879, ESS_GUI_opencl, ESS_GUI_ordering, ESS_GUI_sync_sascalc
- Children:
- aa1db44
- Parents:
- eef298d4
- git-author:
- Piotr Rozyczko <rozyczko@…> (08/31/18 05:55:03)
- git-committer:
- Piotr Rozyczko <rozyczko@…> (08/31/18 05:55:51)
- Location:
- src/sas/qtgui/Plotting
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/sas/qtgui/Plotting/PlotUtilities.py
rcee5c78 r0231f93 274 274 if 0 <= color <=6: 275 275 color = list(COLORS.values())[color] 276 # Check if it's an RGB string277 276 elif isinstance(color, str): 278 # Assure the correctnes of the string 279 assert(color[0]=="#" and len(color) == 7) 280 assert(all(c in string.hexdigits for c in color[1:])) 277 # This could be a one letter code 278 if len(color) == 1: 279 if not color in list (COLORS.values()): 280 raise AttributeError 281 else: 282 # or an RGB string 283 assert(color[0]=="#" and len(color) == 7) 284 assert(all(c in string.hexdigits for c in color[1:])) 281 285 else: 282 286 raise AttributeError -
src/sas/qtgui/Plotting/Plotter.py
r04ac604 r0231f93 5 5 import functools 6 6 import copy 7 import matplotlib .pyplot as plt7 import matplotlib as mpl 8 8 from matplotlib.font_manager import FontProperties 9 9 from sas.qtgui.Plotting.PlotterData import Data1D … … 126 126 127 127 color = PlotUtilities.getValidColor(color) 128 self.data.custom_color = color 128 129 129 130 markersize = self._data.markersize … … 162 163 picker=True) 163 164 165 # Now we know what the potential new color is, let's save it 166 if isinstance(line, mpl.lines.Line2D): 167 self.data.custom_color = line.get_color() 168 164 169 # Update the list of data sets (plots) in chart 165 170 self.plot_dict[self._data.id] = self.data … … 433 438 self.plot_dict = {} 434 439 435 plt.cla()440 mpl.pyplot.cla() 436 441 self.ax.cla() 437 442 … … 496 501 497 502 # Clean the canvas 498 plt.cla()503 mpl.pyplot.cla() 499 504 self.ax.cla() 500 505
Note: See TracChangeset
for help on using the changeset viewer.