SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: W. A. D. I. <wad...@gm...> - 2009年05月31日 01:05:59
I am sorry if this has been covered in teh archives or is RTFM-sh but I
looked in both places and am low on time. I want to use text as the value
for the X-axis ticks not numbers. Something like 'Trial1', 'Trial2',
'Control' instead of 1,2,3.
Is this even possible? It seems that this would be a VERY common need. I
think that it must be obvious but I just can not figure it out. I fi just
try to supply the text labels as a list the same place the normal xVals
would be used (pl.plot(xVals,yVals)) it does not understand.
Thanks.
Gus
-- 
Experience is not what happens to a man; it is what a man does with what
happens to him.
- Aldous Huxley
From: Gökhan S. <gok...@gm...> - 2009年05月31日 01:12:28
Hey,
Try this:
plot([1,2,3])
locs, labels = xticks([0,1,2], ['Trial1', 'Trial2', 'Control'])
Gökhan
On Sat, May 30, 2009 at 8:05 PM, W. Augustine Dunn III
<wad...@gm...>wrote:
> I am sorry if this has been covered in teh archives or is RTFM-sh but I
> looked in both places and am low on time. I want to use text as the value
> for the X-axis ticks not numbers. Something like 'Trial1', 'Trial2',
> 'Control' instead of 1,2,3.
>
> Is this even possible? It seems that this would be a VERY common need. I
> think that it must be obvious but I just can not figure it out. I fi just
> try to supply the text labels as a list the same place the normal xVals
> would be used (pl.plot(xVals,yVals)) it does not understand.
>
>
> Thanks.
>
> Gus
>
> --
> Experience is not what happens to a man; it is what a man does with what
> happens to him.
> - Aldous Huxley
>
>
> ------------------------------------------------------------------------------
> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
> is a gathering of tech-side developers & brand creativity professionals.
> Meet
> the minds behind Google Creative Lab, Visual Complexity, Processing, &
> iPhoneDevCamp as they present alongside digital heavyweights like Barbarian
> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
From: W. A. D. I. <wad...@gm...> - 2009年05月31日 01:17:53
Gökhan == "awesome"
Thanks, I KNEW it had to pretty simple.
Gus
On Sat, May 30, 2009 at 6:12 PM, Gökhan SEVER <gok...@gm...> wrote:
> Hey,
>
> Try this:
>
> plot([1,2,3])
> locs, labels = xticks([0,1,2], ['Trial1', 'Trial2', 'Control'])
>
> Gökhan
>
>
> On Sat, May 30, 2009 at 8:05 PM, W. Augustine Dunn III <wad...@gm...
> > wrote:
>
>> I am sorry if this has been covered in teh archives or is RTFM-sh but I
>> looked in both places and am low on time. I want to use text as the value
>> for the X-axis ticks not numbers. Something like 'Trial1', 'Trial2',
>> 'Control' instead of 1,2,3.
>>
>> Is this even possible? It seems that this would be a VERY common need. I
>> think that it must be obvious but I just can not figure it out. I fi just
>> try to supply the text labels as a list the same place the normal xVals
>> would be used (pl.plot(xVals,yVals)) it does not understand.
>>
>>
>> Thanks.
>>
>> Gus
>>
>> --
>> Experience is not what happens to a man; it is what a man does with what
>> happens to him.
>> - Aldous Huxley
>>
>>
>> ------------------------------------------------------------------------------
>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>> is a gathering of tech-side developers & brand creativity professionals.
>> Meet
>> the minds behind Google Creative Lab, Visual Complexity, Processing, &
>> iPhoneDevCamp as they present alongside digital heavyweights like
>> Barbarian
>> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>
>>
>
-- 
Experience is not what happens to a man; it is what a man does with what
happens to him.
- Aldous Huxley
From: Gökhan S. <gok...@gm...> - 2009年05月31日 01:21:44
You are welcome Gus :)
Go ahead and try these too.. I am assuming that you are experimenting in
Ipython with --pylab.
Use ? or ?? or browse and read for more information regarding to the usage
of functions (http://matplotlib.sourceforge.net/api/pyplot_api.html) I am
sure gallery has some extra demonstration, too
setp(labels, 'rotation', 'vertical')
xticklabels = getp(gca(), 'xticklabels')
setp(xticklabels, fontsize=14, weight='bold')
Have fun :)
Gökhan
On Sat, May 30, 2009 at 8:17 PM, W. Augustine Dunn III
<wad...@gm...>wrote:
> Gökhan == "awesome"
> Thanks, I KNEW it had to pretty simple.
>
> Gus
>
> On Sat, May 30, 2009 at 6:12 PM, Gökhan SEVER <gok...@gm...>wrote:
>
>> Hey,
>>
>> Try this:
>>
>> plot([1,2,3])
>> locs, labels = xticks([0,1,2], ['Trial1', 'Trial2', 'Control'])
>>
>> Gökhan
>>
>>
>> On Sat, May 30, 2009 at 8:05 PM, W. Augustine Dunn III <
>> wad...@gm...> wrote:
>>
>>> I am sorry if this has been covered in teh archives or is RTFM-sh but I
>>> looked in both places and am low on time. I want to use text as the value
>>> for the X-axis ticks not numbers. Something like 'Trial1', 'Trial2',
>>> 'Control' instead of 1,2,3.
>>>
>>> Is this even possible? It seems that this would be a VERY common need. I
>>> think that it must be obvious but I just can not figure it out. I fi just
>>> try to supply the text labels as a list the same place the normal xVals
>>> would be used (pl.plot(xVals,yVals)) it does not understand.
>>>
>>>
>>> Thanks.
>>>
>>> Gus
>>>
>>> --
>>> Experience is not what happens to a man; it is what a man does with what
>>> happens to him.
>>> - Aldous Huxley
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
>>> is a gathering of tech-side developers & brand creativity professionals.
>>> Meet
>>> the minds behind Google Creative Lab, Visual Complexity, Processing, &
>>> iPhoneDevCamp as they present alongside digital heavyweights like
>>> Barbarian
>>> Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com
>>> _______________________________________________
>>> Matplotlib-users mailing list
>>> Mat...@li...
>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>>>
>>>
>>
>
>
> --
> Experience is not what happens to a man; it is what a man does with what
> happens to him.
> - Aldous Huxley
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /