bmlite.plotutils#

A module with functions for plotting data and formatting figures. Functions here are generally useful for all models in BATMODS-lite. More specific plots are written within the postutils modules of their respective model.

Functions#

format_ticks(ax)

Formats an axis object by adjusting the ticks.

pixel(ax, xlims, ylims, z, cblabel)

Fill an axis instance with a pixel plot defined by the inputs.

Package Contents#

bmlite.plotutils.format_ticks(ax)[source]#

Formats an axis object by adjusting the ticks.

Specifically, the top and right ticks are added, minor ticks are turned on, and all ticks are set to face inward.

Parameters:

ax (object) – An axis instance from a matplotlib figure.

bmlite.plotutils.pixel(ax, xlims, ylims, z, cblabel)[source]#

Fill an axis instance with a pixel plot defined by the inputs.

Parameters:
  • ax (object) – An axis instance from a matplotlib figure.

  • xlims (list[float]) – Limits for the x-axis [x_low, x_high].

  • ylims (list[float]) – Limits for the y-axis [y_low, y_high].

  • z (2D array) – Data to plot against x and y. z[0, 0] corresponds to x_low, y_low, and z[-1, -1] corresponds to x_high, y_high.

  • cblabel (str) – The colorbar label.