desc.plotting.plot_coils
- desc.plotting.plot_coils(coils, grid=None, fig=None, return_data=False, **kwargs)Source
Create 3D plot of coil geometry.
- Parameters:
coils (Coil, CoilSet, Curve, or iterable) – Coil or coils to plot.
grid (Grid, optional) – Grid to use for evaluating geometry
fig (plotly.graph_objs._figure.Figure, optional) – Figure to plot on.
return_data (bool) – If True, return the data plotted as well as fig,ax
**kwargs (dict, optional) –
Specify properties of the figure, axis, and plot appearance e.g.:
plot_X(figsize=(4,6), color="darkgrey")
Valid keyword arguments are:
unique: bool, only plots unique coils from a CoilSet if Truefigsize: tuple of length 2, the size of the figure in incheslw: float, linewidth of plotted coilsls: str, linestyle of plotted coilscolor: str, color of plotted coilsshowgrid: Bool, whether or not to show the coordinate grid lines. True by default.showticklabels: Bool, whether or not to show the coordinate tick labels. True by default.showaxislabels: Bool, whether or not to show the coordinate axis labels. True by default.zeroline: Bool, whether or not to show the zero coordinate axis lines. True by default.check_intersection: Bool, whether or not to check the intersection of the coils before plotting. False by default.
- Returns:
fig (plotly.graph_objs._figure.Figure) – Figure being plotted to
plot_data (dict) – Dictionary of the data plotted, only returned if
return_data=True
Examples
from desc.plotting import plot_coils from desc.coils import initialize_modular_coils coils = initialize_modular_coils(eq, num_coils=4, r_over_a=2) plot_coils(coils)