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 :: python head function show all columns 
Python :: python system of nonlinear equations 
Python :: how to convert a list to a string by newline python 
Python :: python convert int to bool 
Python :: combinations python 
Python :: add button to streamlit 
Python :: pandas groupby aggregate quantile 
Python :: how to save a dictionary as a file in python 
Python :: py pause script 
Python :: calcolatrice online 
Python :: python replace multiple spacis with spaces 
Python :: pygame.transform.scale 
Python :: python get time difference in milliseconds 
Python :: rotatable list python 
Python :: how to filter mask results in python cv2 
Python :: rerun file after change python 
Python :: from .cv2 import * ImportError: /home/pi/.local/lib/python3.7/site-packages/cv2/cv2.cpython-37m-arm-linux-gnueabihf.so: undefined symbol: __atomic_fetch_add_8 
Python :: pandas drop rows with empty list 
Python :: mongodb check if substring in string 
Python :: coronavirus tips 
Python :: python for loop backwards 
Python :: python remove stop words 
Python :: convert base64 to image python 
Python :: factorial recursion python 
Python :: check pip installed packages inside virtualenv 
Python :: next day in python without using datetime 
Python :: scanning 2d array in python 
Python :: python bcrypt 
Python :: how to find mean of one column based on another column in python 
Python :: python iterate over object fields 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =