copyaxis#

copyaxis(command=None, *, source=None)#

Copy the current axes into an enlarged standalone figure.

Common scientific plot content (lines and images), labels, scales, limits, and legends are reproduced. A Python callback may customize the copied axes; MATLAB command strings are intentionally not evaluated.

Parameters:
  • command (Callable[[Axes], Any] | None) – Optional callback receiving the copied axes.

  • source (Axes | None) – Axes to copy. The current axes is used by default.

Returns:

The new figure containing the copied axes.

Return type:

Figure