save_graphic
(
filename
,
graphic
)
Save a graphic to a file. Two file formats are supported: PNG (raster graphics) and SVG (vector graphics). The extension of the filename (either “.png” or “.svg”) determines the format.
Graphics with no area cannot be saved in the PNG format.
When debug is True, adorns the visualization with useful information for debugging: a red border around the bounding box and a yellowish cross around the pinning position.
filename
name of the file to create (with the extension)
graphic
graphic to be saved
save_graphic('football_pitch.png', rectangle(100, 60, green))
PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI
Privacy Policy • Platform Version ede3c94 (Fri, 23 May 2025 14:43:18 GMT)