Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

save plot as image python

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

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

save plot as image python matplotlib

import matplotlib.pyplot as plt
import numpy as np

x = np.arange(0, 10, 0.1)
y = np.sin(x)

plt.plot(x, y)
plt.savefig('saved_figure.png')
Comment

pyplot save image

pylot save image
Comment

PREVIOUS NEXT
Code Example
Python :: np.all() 
Python :: using progress bar with rich python 
Python :: numpy array to int type 
Python :: pick random value from dictionary python 
Python :: wikipedia api python 
Python :: how to sort a dictionary in python without sort function 
Python :: concat series to dataframe 
Python :: django user_passes_test 
Python :: print list vertically python 
Python :: format python decimal 
Python :: scikit decision tree regressor 
Python :: convert dictionary to string 
Python :: pygame python 
Python :: how to create a for loop in python 
Python :: how to import a module from a different directory in python 
Python :: how to print memory address in python 
Python :: round down number python 
Python :: How to use path in Django Python 
Python :: how to convert lower case to upper case in python 
Python :: create a range of numbers in python 
Python :: run python from c# 
Python :: python chatbot api 
Python :: average python 
Python :: how to get a user input in python 
Python :: Pass a variable to dplyr "rename" to change columnname 
Python :: how to slice string in python 
Python :: discord.py 
Python :: python code for twitter scraping using tweepy 
Python :: run flask in background 
Python :: -2 in python 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =