pysdic.Plotter3D.add_scalar_bar#

Plotter3D.add_scalar_bar(*, title=None, width=None, height=None, position_x=None, position_y=None, font_family=None, title_font_size=None, label_font_size=None, color=None, bold=False, vertical=True, interactive=False)[source]#

Add a scalar bar to the plotter for visualizing scalar properties.

Parameters:
  • title (Optional[str], optional) – The title of the scalar bar. If None, no title is displayed.

  • width (Optional[int], optional) – The width of the scalar bar as a fraction of the window width. Must be between 0.0 and 1.0 if provided.

  • height (Optional[int], optional) – The height of the scalar bar as a fraction of the window height. Must be between 0.0 and 1.0 if provided.

  • position_x (Optional[int], optional) – The x position of the scalar bar as a fraction of the window width. Must be between 0.0 and 1.0 if provided.

  • position_y (Optional[int], optional) – The y position of the scalar bar as a fraction of the window height. Must be between 0.0 and 1.0 if provided.

  • font_family (Optional[str], optional) – The font type of the scalar bar title. Must be one of "arial", "courier", and "times".

  • title_font_size (Optional[int], optional) – The font size of the scalar bar title.

  • label_font_size (Optional[int], optional) – The font size of the scalar bar labels.

  • color (Optional[Union[str, Tuple[Real, Real, Real]]], optional) – The color of the scalar bar title text. Can be a string representing a color name (e.g., "black"), or an RGB tuple or hex string.

  • bold (bool, optional) – Whether to display the scalar bar title in bold font. Default is False.

  • vertical (bool, optional) – Whether to display the scalar bar vertically. If False, the scalar bar is displayed horizontally. Default is True.

  • interactive (bool, optional) – If True, enables interactive mode for the scalar bar in PyVista. Default is False.

Return type:

None