fastplotlib.Graphic#

class Graphic(name=None, offset=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0, 1.0), alpha=1.0, alpha_mode='auto', visible=True, metadata=None)[source]#
Parameters:
  • name (str, optional) – name this graphic to use it as a key to access from the plot

  • offset ((float, float, float), default (0., 0., 0.)) – (x, y, z) vector to offset this graphic from the origin

  • rotation ((float, float, float, float), default (0, 0, 0, 1)) – rotation quaternion

  • alpha ((float), default 1.0) – The global alpha value, i.e. opacity, of the graphic.

  • transparent (The alpha value for the colors. If you make your a graphic) – to ‘blend’ or ‘weighted_blend’ so it won’t write to the depth buffer.

  • alpha_mode (consider setting) – to ‘blend’ or ‘weighted_blend’ so it won’t write to the depth buffer.

  • alpha_mode

    The alpha-mode, e.g. ‘auto’, ‘blend’, ‘weighted_blend’, ‘solid’, or ‘dither’.

    Modes for method “opaque” (overwrites the value in the output texture):

    • “solid”: alpha is ignored.

    • “solid_premul”: the alpha is multipled with the color (making it darker).

    Modes for method “blended” (per-fragment blending, a.k.a. compositing):

    • “auto”: classic alpha blending, with depth_write defaulting to True. See note below.

    • “blend”: classic alpha blending using the over-operator. depth_write defaults to False.

    • “add”: additive blending that adds the fragment color, multiplied by alpha.

    • “subtract”: subtractuve blending that removes the fragment color.

    • “multiply”: multiplicative blending that multiplies the fragment color.

    Modes for method “weighted” (order independent blending):

    • “weighted_blend”: weighted blended order independent transparency.

    • “weighted_solid”: fragments are combined based on alpha, but the final alpha is always 1. Great for e.g. image stitching.

    Modes for method “stochastic” (alpha represents the chance of a fragment being visible):

    • “dither”: stochastic transparency with blue noise. This mode handles order-independent transparency exceptionally well, but it produces results that can look somewhat noisy.

    • “bayer”: stochastic transparency with an 8x8 Bayer pattern.

visible: (bool), default True

Whether the graphic is visible.

metadata: Any, optional

metadata attached to this Graphic, this is for the user to manage

Examples#

Volume movie

Volume movie

Volume modes

Volume modes