Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python save figure

# 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)
Comment

save plot python

from matplotlib import pyplot as plt
# As png
plt.savefig('Path/FigureName.png')

# As pdf
plt.savefig('Path/FigureName.pdf')
Comment

how to save plot in python

In [5]: plt.savefig('books_read.png')
Comment

save plot in python

plt.savefig('books_read.png')
Comment

python save plot

from matplotlib import pyplot as plt

plt.savefig('foo.png')
plt.savefig('foo.pdf')
Comment

how to save plot in matplotlib

Copied to clipboard
plt.savefig('plot.png', dpi=300, bbox_inches='tight')
Comment

save python plot

plt.savefig('your_path/a/b/'+str(yname)+'_'+str(xname)+'_'+str(dimername), bbox_inches='tight', dpi=300 )
																		^this is your name abc_AC (varibales)				^ crop edges			
Comment

PREVIOUS NEXT
Code Example
Python :: python sleep 10 seconds 
Python :: pdf to jpg 
Python :: how to get user input in python 
Python :: python __dict__ 
Python :: pygame get rect 
Python :: range() in python 
Python :: python if statements 
Python :: how to create a window in pygame 
Python :: how to remove a specific element from an array in python 
Python :: python string: .find() 
Python :: how to update a python package 
Python :: how to use pyplot 
Python :: compute confusion matrix using python 
Python :: how to check if a value is nan in python 
Python :: django class based views listview 
Python :: list len python 
Python :: pd.explode 
Python :: sign python 
Python :: python buffer 
Python :: filter json python 
Python :: add key to dictionairy 
Python :: why is python so popular 
Python :: count python 
Python :: how to check if user pressed enter in python 
Python :: list comprehension in python 
Python :: Finding the maximum element from a matrix with Python numpy.argmax() 
Python :: how to sum only the odd values in python 
Python :: python __name__ == "__main__" 
Python :: fluffy ancake recipe 
Python :: sphinx themes 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =