plot_object_general¶
- marxs.visualization.utils.plot_object_general(plot_registry, obj, display=None, **kwargs)[source] [edit on github]¶
Look up a plotting routine for an object and execute it.
This function is not meant to be called directly by the user, instead, it is designed to simplify the implementation of new plotting backends.
- Parameters:
- plot_registrydict
Keys are the names of the shape of an object and values in this dictionary are functions that know how to plot this type of shape. The appropriate plotting function is then called with the input
obj
,display
and any other keyword arguments. If the shape is"None"
(as a string), no plotting function is called.- obj
marxs.base.MarxsElement
The element that should be plotted.
- displaydict of None
Dictionary with display settings. If this is
None
,obj.display
is used. If that is alsoNone
then the objects is skipped.- kwargsother keyword arguments
These arguments are just passed through to the plotting function.
- Returns:
- outbackend-dependent
The output from the plotting function that was executed is passed through. Different plotting backends return different kinds of output.