VisualAttributes

class glue.core.visual.VisualAttributes(parent=None, washout=False, color=None, alpha=None)[source]

Bases: object

This class is used to define visual attributes for any kind of objects

The essential attributes of a VisualAttributes instance are:

Parameters:
  • color – A matplotlib color string
  • alpha – Opacity (0-1)
  • linewidth – The linewidth (float or int)
  • linestyle – The linestyle ('solid' | 'dashed' | 'dash-dot' | 'dotted' | 'none')
  • marker – The matplotlib marker shape ('o' | 's' | '^' | etc)
  • markersize – The size of the marker (int)

Attributes Summary

alpha Transparency, given as a floating point value between 0 and 1.
color Color specified using Matplotlib notation
linestyle The line style, which can be one of ‘solid’, ‘dashed’, ‘dash-dot’, ‘dotted’, or ‘none’.
linewidth The line width, in points.
marker The marker symbol.
markersize
rgba

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

alpha[source]

Transparency, given as a floating point value between 0 and 1.

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’.

linewidth[source]

The line width, in points.

marker[source]

The marker symbol.

markersize[source]
rgba[source]

Methods Documentation

copy(new_parent=None)[source]

Create a new instance with the same visual properties

set(other)[source]

Update this instance’s properties based on another VisualAttributes instance.