plot (method)

plot(self, fig=None, display_field=False)[source]

Plot the Magnet in a matplotlib fig

Parameters:
  • self (Magnet) – A Magnet object
  • fig – if None, open a new fig and plot, else add to the current one (Default value = None)
  • display_field (bool) – if true, will display magnetization field arrow (Default value = False)
Returns:

Return type:

None