Reputation: 1009
Using Jupyter Notebook to visual csv data, there are names printed on the x axis along side amount, how do i reduced its fonts and make sure that the names don't overlap, atleast print 10 characters of the name.
plt.bar(monthly_owner.Owner.head(6),monthly_owner.Amount.head(6))
plt.xlabel('Owner', fontsize=15)
plt.ylabel('Amount', fontsize=15)
plt.title('AWS Monthly Cost by Owner')
plt.savefig('plot3.png', dpi=300, bbox_inches='tight')
plt.show()
Upvotes: 1
Views: 188
Reputation: 831
You can rotate your label to show the owner's name using the below code.
plt.xticks(rotation=90)
Upvotes: 1