Zapisz fabułę Pythona
from matplotlib import pyplot as plt
plt.savefig('Path/FigureName.png')
Gabriel Juri
from matplotlib import pyplot as plt
plt.savefig('Path/FigureName.png')
# Basic syntax:
plt.savefig("/path/to/output/directory/figure.png")
# Example usage:
import matplotlib.pyplot as plt
plt.figure()
plt.plot(range(5))
plt.savefig("~/Documents/figure.png", dpi=300)
In [5]: plt.savefig('books_read.png')
plt.savefig('books_read.png')
from matplotlib import pyplot as plt
plt.savefig('foo.png')
plt.savefig('foo.pdf')