Answers for "plt ax plot title"

-1

plt title

import matplotlib.pyplot as plt 
 
plt.plot(x, y, color='green') 
plt.xlabel('x') 
plt.ylabel('y') 
  
# displaying the title
plt.title("Linear graph")
  
plt.show() 
Posted by: Guest on July-09-2021
2

matplotlib title inside plot

import matplotlib. pyplot as plt
A= [2,1,4,5]; B = [3,2,-2,1]
plt.scatter(A,B)
plt.title("title", x=0.9, y=0.9)
plt.xlabel("x-axis")
plt.ylabel("y-axis")
plt.show()
Posted by: Guest on January-25-2021

Python Answers by Framework

Browse Popular Code Answers by Language