views:

48

answers:

1

Hi All

I am drawing a plot using matplotlib and pyhon like the sample code below.

x = array([0,1,2,3])
y = array([20,21,22,23])
plot(x,y)
show()

As it is the code above on the x axis I will see drawn values 0.0, 0.5, 1.0, 1.5 i.e. the same values of my reference x values.

Is there anyway to map each point of x to a different string? So for example I want x axis to show months names( strings Jun, July,...) or other strings like people names ( "John", "Arnold", ... ) or clock time ( "12:20", "12:21", "12:22", .. ).

Do you know what I can do or what function to have a look at? For my purpose could it be matplotlib.ticker of help?

Regards EO

+1  A: 
unutbu
GREAT MAN!!! I Thank you very much!