graphinglib.SmartFigureWCS.copy_with#
- SmartFigureWCS.copy_with(**kwargs) Self#
Returns a deep copy of the SmartFigure with specified attributes overridden. This is useful when including SmartFigures in other SmartFigures, as it allows to modify the attributes in a single call.
- Parameters:
- **kwargs
Public writable properties to override in the copied SmartFigure. The keys should be property names to modify and the values are the new values for those properties.
- Returns:
- SmartFigure
A new SmartFigure instance with the specified attributes overridden.
Examples
Copy an existing SmartFigure to remove the x and y labels:
fig2 = fig1.copy_with(x_label=None, y_label=None)