yt.visualization.plot_modifications.MagFieldCallback

class yt.visualization.plot_modifications.MagFieldCallback(factor=16, scale=None, scale_units=None, normalize=False)[source]

annotate_magnetic_field(factor=16, scale=None, scale_units=None, normalize=False):

Adds a ‘quiver’ plot of magnetic field to the plot, skipping all but every factor datapoint. scale is the data units per arrow length unit using scale_units (see matplotlib.axes.Axes.quiver for more info). if normalize is True, the magnetic fields will be scaled by their local (in-plane) length, allowing morphological features to be more clearly seen for fields with substantial variation in field strength.

Methods