tools Package#
plotting
Module#
- orangery.tools.plotting.annotate_plot(self, ax=None)#
Add annotation to a plot to identify individual polygons.
- Parameters:
ax (Axis) – matplotlib Axis to which to add annotation.
- Returns:
patched matplotlib Axis.
- Return type:
ax (Axis)
- orangery.tools.plotting.get_scale_factor(fig, ax, scale, axis='x')#
Get the scale factor needed to obtain a desired scale in x-axis units per inch.
- Parameters:
fig (Figure) – the figure to scale.
ax (Axis) – the axis to scale.
scale (int or float) – the desired output scale.
- Returns:
the scale factor to apply to the figure size.
- Return type:
scale_factor (float)
- orangery.tools.plotting.polygon_plot(self, ax=None, fill_ec='black', fill_fc='none', fill_hatch='...', fill_label=None, cut_ec='black', cut_fc='none', cut_hatch='x', cut_label=None)#
Adds two groups of polygon patches to a matplotlib Axis.
Fill and label first polygon of each type separately, otherwise make sequential call to fill.
- Parameters:
ax (Axis) – matplotlib Axis to which to add polygon patches.
fill_ec (str) – fill polygon edge color.
fill_fc (str) – fill polygon face color.
fill_hatch (str) – fill polygon hatch pattern.
fill_label (str) – fill polygon label.
cut_ec (str) – cut polygon edge color.
cut_fc (str) – cut polygon face color.
cut_hatch (str) – cut polygon hatch pattern.
cut_label (str) – cut polygon label.
- Returns:
patched matplotlib Axis.
- Return type:
ax (Axis)