[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using data values as custom tic lebels
From: |
lukshuntim |
Subject: |
Re: Using data values as custom tic lebels |
Date: |
Fri, 13 Apr 2012 20:56:10 +0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
On Friday, April 13, 2012 08:29 PM, Ben Abbott wrote:
> On Apr 13, 2012, at 8:06 AM, address@hidden wrote:
>
>> Hi,
>>
>> Let's say I have an x-y of plot like this:
>>
>> x=[1.3, 2, 7.5];
>> y=[0, 6.1, 3.0];
>> plot (x, y);
>>
>> and I would to have the data values of x and y as tic labels on the
>> respective axes. I can think of turning the axis labels off and using
>> the text() command but that would be cumbersome. Is there any better way
>> to do that?
>>
>> Regards,
>> ST
>
> Does ...
>
> set (gca (), "xtick", x, "ytick", y)
>
> ... do what you want?
>
> Ben
>
Yes, indeed. :-)
Thanks,
ST
--