I am using this simplified code to create mutiple boxplots:
from sklearn.datasets import load_iris
import pandas as pd
import matplotlib.pyplot as plt
data = load_iris()
df = pd.DataFrame(data.data, columns=data.feature_names)
df["index"]=range(1,len(df)+1)
df["CustomColumn"]=0
header=list(df.columns)
fig, axs = plt.subplots(1, 5, figsize=(10, 5), sharey=False)
boxplot=df.boxplot(by=CustomColumn, layout=(1,5), ax=axs)
plt.savefig("DataframeBoxplot.png")
plt.show()
For some other reason I need to group the boxplots by a CustomColumn
.
Are there any possibilities to remove the [CustomColumns]
under the plots as shown in the figure below?