Figure Title set at Bottom

后端 未结 1 1230
旧时难觅i
旧时难觅i 2021-02-19 16:23

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         


        
相关标签:
1条回答
  • 2021-02-19 17:23

    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

    0 讨论(0)
提交回复
热议问题