At My Fingertips

Documentation

Documentation

Function from library pytamaro
Side Effects

save_graphic(filenamegraphic)

save_graphicfilenamegraphic

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.

filenamename of the file to create (with the extension)

graphicgraphic to be saved

Code
save_graphic('football_pitch.png', rectangle(100, 60, green))

Logo of PyTamaro

PyTamaro is a project created by the Lugano Computing Education Research Lab at the Software Institute of USI

Privacy PolicyPlatform Version 4153f55 (Wed, 02 Apr 2025 06:58:19 GMT)