I'm a python beginner. This is a memo for myself
infinite loop
while True:
print("infinite loop")
Plot (straight line)
plt.plot(data,"r--") #(y data,color) r--Red, dotted line
plt.plot(a,b,c) #(x,y,color)
plt.show()
Other
plt.bar() #bar graph
plt.barh() #Bar chart
plt.scatter() #Scatter plot
plt.pie(data,explode=ex,labels=labels ,autopct=%1.1f%%,counterclock=False) #pie chart
#Data, make it stand out,label,Number of decimal places displayed, 1.2 to the second decimal place,False to place clockwise
#colors=You can also specify the color with
plt.hist() #histogram
plt.boxplot() #Box plot,Multiple drawings are possible by using tuples as arguments
Creating multiple graphs
#First
a=fig.add_subplot(1,2,1) #(Number of lines,Number of columns,number(From the left))
Recommended Posts