• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Python chart using matplotlib and pandas from csv does not show all x-axis labels

Resolved: Python chart using matplotlib and pandas from csv does not show all x-axis labels

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I have to chart a data from csv somewhere from my directory. I am using python by learning some samples online. Problem is, I can’t find any solution to show all x-axis labels.
x axis: Japan, maylay, sing, Thai, US

Answer:

you can do that by using set_xticklabels to set the names and set_xticks to show ticks for each country. Updated code is below…
Output graph
enter image description here

If you have better answer, please add a comment about this, thank you!

charts csv matplotlib pandas python
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: How can I copy files using the ansible.builtin.copy module and avoid conflicting file names?

26/03/2023

Resolved: Reshape tensors of unknown shape with tf.function

26/03/2023

Resolved: Use Svelte Component as Slot

26/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.