Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Last answered:

11 Jan 2024

Posted on:

09 Jan 2024

0

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')



2 answers ( 1 marked as helpful)
Instructor
Posted on:

11 Jan 2024

0

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

Super learner
This user is a Super Learner. To become a Super Learner, you need to reach Level 8.
Posted on:

11 Jan 2024

0

Hi Elitsa, the answer is very clear. Thank you.

Submit an answer