Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

save plot as pdf python

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

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

python save figure as pdf

import matplotlib.pyplot as plt

f = plt.figure()
plt.plot(range(10), range(10), "o")
plt.show()

f.savefig("foo.pdf", bbox_inches='tight')
Comment

PREVIOUS NEXT
Code Example
Python :: get path to file without filename python 
Python :: python get full path 
Python :: pd if value delete row 
Python :: python reimport module 
Python :: select categorical columns pandas 
Python :: import user in django 
Python :: how to sort by length python 
Python :: factorial sequence code in python with while loops 
Python :: get page source code selenium python 
Python :: erode dilate opencv python 
Python :: how to take list of integer as input in python 
Python :: python gui programming using pyqt5 
Python :: how to check if column has na python 
Python :: python find the key with max value 
Python :: how to strip quotation marks in python 
Python :: how to check if left mousebuttondown in pygame 
Python :: python3 install google 
Python :: matplotlib clear plot 
Python :: python selenium hover over element 
Python :: selenium change window size 
Python :: get file name from url python 
Python :: put comma in numbers python 
Python :: python auto module installer 
Python :: python discord bot join voice channel 
Python :: matplotlib x label rotation 
Python :: HOw to use passlock password manager python 
Python :: python check if is pandas dataframe 
Python :: print all keys having same value 
Python :: syntax to update sklearn 
Python :: pandas percent change between two rows 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =