Plot

petrophys.visualization.Plot

class Plot(fig=None, ax=None)[source]

A drawn plot.

fig is the Matplotlib figure, ax its main axes and axes all of them (panels, tracks), to style further with Matplotlib. At the end of a notebook cell the plot shows its figure; .save(path) writes it as PNG, PDF, SVG or any format Matplotlib knows by the extension, and .show() displays it from a script.

Examples

>>> chart = pp.bar_chart(["A", "B"], [3, 5])
>>> chart.ax.set_ylim(0, 10); chart.save("pay.png")

Attributes

axes

the panels or tracks given, else the figure's.

Methods

close

Release the figure (frees memory in loops).

save

Save the figure, its format from the extension of path.

show

Display the figure (in a script, a window; in a notebook, inline).

Parameters:
  • fig (Any)

  • ax (Any)

property axes: List[Any]

the panels or tracks given, else the figure’s.

Type:

Every axes of the plot

show()[source]

Display the figure (in a script, a window; in a notebook, inline).

Return type:

None

save(path, dpi=150)[source]

Save the figure, its format from the extension of path.

Parameters:

dpi (int)

Return type:

None

close()[source]

Release the figure (frees memory in loops).

Return type:

None