'Figure Title set at Bottom
I am using Matplotlib and want to show my title at the bottom below my labels. Below is the code I am trying.
plt.scatter(ax1['favorite_count'], ax1['citation_count'], c="DarkBlue", alpha=0.5)
plt.text(15, 15,"Correlation Graph between Citation & Favorite Count")
plt.show()
But I show at the right of the graph above the x-axis. Anyone here to guide me how to do this
Solution 1:[1]
If you are trying to set text() method there are x and y coordinates you can use to change the location of the text. Using any negative value would place it below the axis. Make sure that all your texts and titles are placed properly and do not overlap each other.
import matplotlib.pyplot as plt
plt.text(15, -0.01, "Correlation Graph between Citation & Favorite Count")
Same for a title:
import matplotlib.pyplot as plt
plt.title('Scatter plot pythonspot.com', y=-0.01)
Here is more info about the matplotlib text() and title() methods
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Mr. T |
