ternary_figure

poisson_approval.ternary_figure(size_inches='auto', scale=None, boundary_width=1.0, **kwargs)[source]

Create a ternary plot (adaptation of figure from the package python-ternary).

Parameters
  • size_inches (tuple or str) – The horizontal and vertical sizes of the figure, in inches. If 'auto', we will try to do our best.

  • scale (Number) – The scale of the figure. The higher it is, the higher the resolution of the heatmap for example.

  • boundary_width – Width of the line representing the boundary of the triangle.

  • kwargs – Other keyword arguments are passed to the function figure of the package python-ternary.

Returns

Examples

Grid and lines:

>>> figure, tax = ternary_figure()
>>> tax.gridlines_simplex(multiple=0.1)
>>> tax.horizontal_line_simplex(0.1)
>>> tax.left_parallel_line_simplex(0.2)
>>> tax.right_parallel_line_simplex(0.3)
>>> tax.line_simplex((1, 0, 0), (0.2, 0.5, 0.3))

Titles and annotations:

>>> figure, tax = ternary_figure()
>>> tax.set_title_padded('The title of the figure')
>>> tax.right_corner_label('The right label')
>>> tax.top_corner_label('The top label')
>>> tax.left_corner_label('The left label')
>>> tax.annotate_simplex('An annotation', (0.33, 0.33, 0.33))