jpt.plotting.helpers

Attributes

default_config

Functions

hex_to_rgb(→ Tuple[int, Ellipsis])

Parse hexadecimal string to extract color/alpha information

color_to_rgb(→ Tuple[str, str])

Extracts the color and alpha information of a given color string and reassembles it to an rgb and an rgba

pdf_grid_3d(→ Tuple[numpy.ndarray, numpy.ndarray, ...)

Create a mesh grid consistent of x, y, z coordinate values

Module Contents

jpt.plotting.helpers.default_config
jpt.plotting.helpers.hex_to_rgb(col) Tuple[int, Ellipsis]

Parse hexadecimal string to extract color/alpha information

Parameters:

col – color string of one of the following forms * #f0c (as short form of #ff00cc) * #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff

Returns:

a tuple reprsenting either RGB or RGBA values

jpt.plotting.helpers.color_to_rgb(color, opacity=0.6) Tuple[str, str]

Extracts the color and alpha information of a given color string and reassembles it to an rgb and an rgba color.

Parameters:
  • color – the color to examine; accepts str of form: * rgb(r,g,b) with r,g,b being int or float * rgba(r,g,b,a) with r,g,b being int or float, a being float * #f0c (as short form of #ff00cc) or #f0cf (as short form of #ff00ccff) * #ff00cc * #ff00ccff

  • opacity – the default opacity to assume if the given string contains only color information

Returns:

plotly.graph_objs.Figure

jpt.plotting.helpers.pdf_grid_3d(jpt, variable1, variable2) Tuple[numpy.ndarray, numpy.ndarray, numpy.ndarray]

Create a mesh grid consistent of x, y, z coordinate values representing all distinct interval boundaries forming the joint probability density function a projection of variable1 and variable2 represented the JPT passed the first argument.

Parameters:
  • jpt

  • variable1

  • variable2

Returns: