I am using matplotlib for a graphing application. I am trying to create a graph which has strings as the X values. However, the using
plot function expects a numeric value for X.
How can I use string X values?
You should try xticks
import pylab names = ['anne','barbara','cathy'] counts = [3230,2002,5456] pylab.figure(1) x = range(3) pylab.xticks(x, names) pylab.plot(x,counts,"g") pylab.show()