gvec.plotting.plots3d#
- gvec.plotting.plots3d.plot_3d_surface(state: State, quantity: str = 'mod_B', rho: float | ndarray | list = 1.0, ntheta: int = 41, nzeta: int = 51, period: Literal['single', 'half', 'full'] = 'single', zeta_contours: int = 0, to_file: str | None = None, surface_kwargs: dict = {}, fig_in=None)#
Generate a 3D surface plot with the quantity provided by
quantityon it at a givenrhoposition and poloidal and toroidal resolutionnthetaandnzetaper field period.- Parameters:
state (GVEC state object)
quantity (str, optional) – Equilibrium quantity to plot on the surface. Default is
"mod_B".rho (float, optional) – Radial position of the surface. Default
1.0.ntheta (int) – Poloidal resolution. Default
41.nzeta (int) – Toroidal resolution, per field period Default
51.period (str) – Plot the
"full"surface, a"single"field period or"half"a field period. Default"single"zeta_contours (int) – Number of contour lines of zeta coordinate on each surface, per field period. Default is
0(no contours). Not counting the last contourmax(zeta), which is always added. Note: Adaptsnzetato ensure equally spaced contours.to_file (str) – If a string, will automatically save the plot to a file with the given input in the current working directory. Recommended to use this if the plots don’t display. Default is
Nonesurface_kwargs (dict, optional) – Keyword arguments for the
Surfacefunction ofplotly, i.e.dict(opacity=0.5)fig_in (
plotly.graph_objects.Figureobject, optional) – If provided, the plot adds to this figure instead of creating a new one. Default isNone.
- Return type:
plotly.plotobject