pandas plot disable legend 1

pandas plot disable legend

# legend is True by default
df.plot(title= 'This is title', legend= False)

Here is what the above code is Doing:
1. df.plot() is a pandas method that returns a matplotlib.axes.AxesSubplot object.
2. We can then use the set_title() method to set the title of the plot.
3. We can also use the set_xlabel() and set_ylabel() methods to set the x-axis and y-axis labels, respectively.
4. Finally, we can use the set_xticks() and set_yticks() methods to set the x-axis and y-axis tick locations, respectively.

Similar Posts