On 10/1/07, Iacopo <[EMAIL PROTECTED]> wrote:
> Hi everybody,
>
> I tried:
>
> >>> import pylab
> >>> pylab.plot(["a", "b", "c"], [1, 2, 3])
>
> ValueError: invalid literal for float(): a
>
> Well, I expected that. I wrote this to just explain my trouble: printing
> strings instead float along x-axes (a sort of mapping floats to strings...).
> Writing that pylab.plot I mean that "a", "b", "c" were equalli spaced and
> "a" --> 1, "b" --> 2, "c" --> 3. I think it could be a reasonnable command.
> Is there something similar?

pylab.plot([1,2,3], [4,5,6])
pylab.xticks([1,2,3], ['a', 'b', 'c'])

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to