Resolved: Instead of use plt.bar maybe is better to use sns.barplot?
fig= plt.figure(figsize=(9, 4))
splot = sns.barplot(x=df_used_cars['Brand'],
y=df_used_cars['Cars Listings'],
color='midnightblue')
plt.title('Cars Listings by Brand', fontsize=16, fontweight='bold', loc='left')
plt.bar_label(splot.containers[0], fontweight='bold')
plt.xlabel(None)
plt.ylabel('Number of Listings')
plt.xticks(rotation=45)
plt.show()
fig.savefig('sns_bar_chart', bbox_inches='tight')
Hi Jorge,
thanks for reaching out! You're welcome to use whichever method you prefer. I like the seaborn library and its capabilities a lot. For the course, we concentrate on matplotlib, as it is a staple of python visualization, but it's far from the only available option or library that the language offers. In terms of the look, in the course, we use the seaborn skin, so technically the two visuals look similar, even though they're created with different libraries.
Let me know if you have any other suggestions and keep up the good work!
Best,
365 Eli
Hi Elitsa, the answer is very clear. Thank you.