Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

pyplot savefig

import matplotlib.pyplot as plt
  
# creating plotting data
xaxis, yaxis =[1, 4, 9, 16, 25, 36, 49, 64, 81, 100], [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  
# plotting 
plt.plot(xaxis, yaxis)
  
# saving the file.Make sure you 
# use savefig() before show().
plt.savefig("squares.png")
  
plt.show()
Comment

savefig matplotlib python

import matplotlib.pyplot as plt
plt.figure()
plt.plot([1,2,3],[1,2,3])
plt.savefig("out.png")
Comment

PREVIOUS NEXT
Code Example
Python :: how to open a software using python 
Python :: python cd to directory 
Python :: python string argument without an encoding 
Python :: load model keras 
Python :: pandas append csv files a+ 
Python :: plt tight layout 
Python :: rename df column 
Python :: rmse in python 
Python :: tkiner border 
Python :: discord.py ban 
Python :: save and load catboost model 
Python :: argparse 
Python :: wait function python 
Python :: all permutation from 2 arrays python 
Python :: tick labels vertical matplotlib 
Python :: python pyautogui how to change the screenshot location 
Python :: python loop through files in directory recursively 
Python :: run django app locally 
Python :: python 2 decimal places 
Python :: flask run app reset on change 
Python :: pygame change logo 
Python :: loop on dataframe lines python 
Python :: python take a screenshot 
Python :: python key down 
Python :: np.argsort reverse 
Python :: python most common element in list 
Python :: get files in directory python 
Python :: python heart code 
Python :: get video width and height cv2 
Python :: python pil resize image 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =