গ্রুপড বারপ্লটে বার স্পেস কন্ট্রোল
DataFrame.plot(kind='bar') মেথডে linewidth প্যারামিটার ব্যবহার করে বারগুলোর মধ্যবর্তী গ্যাপ নিয়ন্ত্রণ করুন।
উদাহরণ
import pandas as pd
from matplotlib import pyplot as plt
plt.rcParams["figure.figsize"] = [7.50, 3.50]
plt.rcParams["figure.autolayout"] = True
d = {'Column 1': [i for i in range(10)],
'Column 2': [i * i for i in range(10)]}
df = pd.DataFrame(d)
df.plot(kind='bar', edgecolor='white', linewidth=1)
plt.legend(loc="upper left")
plt.show()
আউটপুট
দুটি কলামের গ্রুপড বার চার্ট যেখানে বারগুলোর স أبيض এজ (linewidth=1) থাকবে, যা স্পেস সৃষ্টি করে।