VisualAttributes¶
- class glue.core.visual.VisualAttributes(parent=None, color=None, alpha=None, preferred_cmap=None, linewidth=1, linestyle='solid', marker='o', markersize=3)[source]¶
Bases:
HasCallbackProperties
This class is used to define visual attributes for any kind of objects.
- Parameters:
- parentQObject, optional
The object that this visual attributes object is attached to. Default is None.
- colorstr, optional
A matplotlib color string. Default is set from
SettingRegistry
.- alphafloat, optional
Opacity, between 0-1. Default is set from
SettingRegistry
.- preferred_cmapstr or
Colormap
, optional A colormap to be used as the preferred colormap, by name or instance. Default is None.
- linewidthfloat, optional
The linewidth. Default is 1.
- linestylestr, optional
The linestyle. Default is ‘solid’.
- markerstr, optional
The matplotlib marker shape. Default is ‘o’.
- markersizefloat, optional
The size of the marker. Default is 3.
Attributes Summary
Transparency, given as a floating point value between 0 and 1.
Color specified using Matplotlib notation
The line style, which can be one of 'solid', 'dashed', 'dash-dot', 'dotted', or 'none'.
The line width, in points.
The marker symbol.
A preferred colormap specified using Matplotlib notation
Methods Summary
copy
([new_parent])Create a new instance with the same visual properties
set
(other)Update this instance's properties based on another VisualAttributes instance.
Attributes Documentation
- DEFAULT_ATTS = ['color', 'alpha', 'linewidth', 'linestyle', 'marker', 'markersize', 'preferred_cmap']¶
- color[source]¶
Color specified using Matplotlib notation
Specifically, it can be:
A string with a common color (e.g. ‘black’, ‘red’, ‘orange’)
A string containing a float in the rng [0:1] for a shade of gray (‘0.0’ = black,’1.0’ = white)
A tuple of three floats in the rng [0:1] for (R, G, B)
An HTML hexadecimal string (e.g. ‘#eeefff’)
- linestyle[source]¶
The line style, which can be one of ‘solid’, ‘dashed’, ‘dash-dot’, ‘dotted’, or ‘none’.
Methods Documentation