Changeset 0231f93 in sasview for src/sas/qtgui/Plotting/PlotUtilities.py
- 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)
- File:
-
- 1 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
Note: See TracChangeset
for help on using the changeset viewer.