Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

plt.savefig

import matplotlib.pyplot as plt
plt.pie([1,2,3])
plt.savefig('name')
Comment

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 :: list sort by key and value 
Python :: how to run python file 
Python :: Convert two lists into a dictionary in python 
Python :: voice translate python 
Python :: python multiplication array 
Python :: one hot encoding 
Python :: redirect a post request django 
Python :: how to power in python 
Python :: rename in python 
Python :: pandas column rank 
Python :: kivy button disable 
Python :: python string remove accent 
Python :: how to write pretty xml to a file python 
Python :: python thousands separators 
Python :: python array input from user 
Python :: check if argv exists python 
Python :: open file in python directory 
Python :: in python how to use exp 
Python :: Cast image to float32 
Python :: pass a list to a function in python 
Python :: stack concatenate dataframe 
Python :: how to assign a new value in a column in pandas dataframe 
Python :: how to add percentage in countplot 
Python :: pandas reset index 
Python :: pandas apply lambda function with assign 
Python :: python smtp sendmail 
Python :: remove in list python 
Python :: change float column to percentage python 
Python :: merge 2 dataframes pythom 
Python :: python get current date 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =