pyleecan.Functions.init_fig module¶
- init_fig(fig=None, ax=None, shape='default', is_3d=False)[source]¶
Get all the handle and legend of a figure or initialize them (for matplotlib)
- Parameters:
fig (Matplotlib.figure.Figure) – The figure to get the handle from (can be None)
ax (Matplotlib.axes.Axes object) – Axis on which to plot the data
shape (str) – Shape of the figure: “default”, “square” or “rectangle” for 20x10 figure
is_3d (bool) – 3D or 2D figure
- Returns:
(fig,axes,patch_leg,label_leg) – Figure handle, Axes Handle, List of legend patches, List of legend label
- Return type:
Matplotlib.figure.Figure, matplotlib.axes._subplots.AxesSubplot, patch, string
- init_subplot(fig=None, subplot_index=None, is_3d=False)[source]¶
Initialize subplot (given position or automatic stacking)
- Parameters:
fig (Matplotlib.figure.Figure) – The figure to get the handle from (can be None)
subplot_index (int) – Index of the subplot, or None
is_3d (bool) – 3D or 2D figure
- Returns:
(fig,ax) – Figure handle, Axes Handle
- Return type:
Matplotlib.figure.Figure, matplotlib.axes._subplots.AxesSubplot