init_fig (method)

init_fig(fig, 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)
  • shape (str) – Shape of the figure: “default” 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