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?

3
  • stackoverflow.com/questions/9101497/… Commented Jan 18, 2015 at 19:58
  • Did you have a look at the examples on matplotlib's site? They're pretty useful - here's a histogram. Commented Jan 18, 2015 at 19:58
  • 1
    Strictly speaking this is a bar chart rather than a histogram. Use pyplot.bar (well-documented in the Matplotlib docs) Commented Jan 18, 2015 at 19:59

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.