desc.plotting.plot_grid
- desc.plotting.plot_grid(grid, return_data=False, **kwargs)[source]
Plot the location of collocation nodes on the zeta=0 plane.
- Parameters:
grid (Grid) – Grid to plot.
return_data (bool) – if True, return the data plotted as well as fig,ax
**kwargs (fig,ax and plotting properties) –
Specify properties of the figure, axis, and plot appearance e.g.:
plot_X(figsize=(4,6))
Valid keyword arguments are:
figsize: tuple of length 2, the size of the figure (to be passed to matplotlib) title_font_size: integer, font size of the title
- Returns:
fig (matplotlib.figure.Figure) – Figure being plotted to.
ax (matplotlib.axes.Axes or ndarray of Axes) – Axes being plotted to.
plot_data (dict) – dictionary of the data plotted only returned if return_data=True plot_data keys:
”rho”, “theta”: rho,theta positions of the grid nodes on zeta=0 surface plots are made as a polar plot using above keys
Examples
from desc.plotting import plot_grid from desc.grid import ConcentricGrid grid = ConcentricGrid(L=20, M=10, N=1, node_pattern="jacobi") fig, ax = plot_grid(grid)