HAPPY.plot_functions module

HAPPY.plot_functions.addScaleBar(ax, scale, location='upper right')[source]

Add a scale bar to an axes.

Parameters

ax (matplotlib.axes.Axes) – Matplotlib axis on which to plot.

HAPPY.plot_functions.addArrows(ax, c='r', lenx=0.04, leny=0.06, flip=False)[source]

Add coordinate definition arrows (radial and circumferential) to an axes.

Parameters

ax (matplotlib.axes.Axes) – Matplotlib axis to plot on

HAPPY.plot_functions.plot(img, title, scale=None, location=None, ax=None)[source]

Plotting an imge.

Parameters
  • img (array) – Image data to be plotted

  • title (str) – Title of plot.

  • scale (float) – Scale in meters per pixel.

  • location (str) – Location of scale bar i.e. ‘lower right’, ‘upper left’

HAPPY.plot_functions.plot_comparison(img1, title1, img2, title2, scale=None, location=None)[source]

Plotting two images next to each other.

Parameters
  • img1 (array) – Image data to be plotted on left.

  • img2 (array) – Image data to be plotted on right.

  • title1 (str) – Title of left-hand plot.

  • title2 (str) – Title of right-hand plot.

  • scale (float) – Scale in meters per pixel.

  • location (str) – Location of scale bar i.e. ‘lower right’, ‘upper left’

HAPPY.plot_functions.plot_hist(arr)[source]