When drawing a pandas boxplot, grouped by another column, pandas automatically adds a title to the plot, saying 'Boxplot grouped by....'. Is there a way to remove that? I tried using
suptitle('')
as per Pandas: boxplot of one column based on another column
but this does not seem to work. I am using latest pandas (0.13.1) version.
Pandas Boxplot Title You can add a title to your boxplot by turning to the pyplot module. Now you have a title to inform any newcomers what this boxplot represents so they can understand it quicker. This final customization returns to the arguments of the . boxplot method.
tick_params(axis='both',which='major',direction='in',length=4,width=2,labelsize=8) ax. tick_params(axis='both',which='minor',direction='in',length=2,width=1.5) # and so on...you can do the same for the y-axis.
To draw a box plot for the given data first we need to arrange the data in ascending order and then find the minimum, first quartile, median, third quartile and the maximum. To find the First Quartile we take the first six values and find their median. For the Third Quartile, we take the next six and find their median.
You can set the labels on that object. Or, more succinctly: ax. set(xlabel="x label", ylabel="y label") . Alternatively, the index x-axis label is automatically set to the Index name, if it has one.
Make sure your calling suptitle('')
on the right figure.
In [23]: axes = df.boxplot(by='g') In [24]: fig = axes[0][0].get_figure() In [25]: fig.suptitle('') Out[25]: <matplotlib.text.Text at 0x109496090>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With