1

Lets say I have a list:

Name=['student','teacher','subjects']

Data=['70', '5', '8']

How do I plot this on a histogram using python matplotlib, with 'student','teacher','subjects' on the x axis, and '70', '5', '8' as the height of bar respectively?

n88b
  • 153
  • 2
  • 8
  • http://stackoverflow.com/questions/9101497/matplotlib-bar-graph-x-axis-wont-plot-string-values – M4rtini Jan 18 '15 at 19:58
  • Did you have a look at the examples on matplotlib's site? They're pretty useful - [here's a histogram](http://matplotlib.org/examples/statistics/histogram_demo_features.html). – Alex Riley Jan 18 '15 at 19:58
  • 1
    Strictly speaking this is a bar chart rather than a histogram. Use pyplot.bar (well-documented in the Matplotlib docs) – xnx Jan 18 '15 at 19:59

0 Answers0