Thread Subject: newbie question about plot and axis

Subject: newbie question about plot and axis

From: robert

Date: 23 Nov, 2009 17:01:20

Message: 1 of 2

Hi, im pretty new to matlab and the use of this kinds of tools. So I have a question that im having some problems with at the moment.

I have measured some frequencies on a oscilloscope that I want to display in a graph.
However, when i get the data into the graph I and everything with the curve, I see that the Y-point all are 1.002*10^6 and that isn't very good as a presentation model. So now i have a graph with the correct value ticks on the X axis, and only the 1.002*10^6 as ticks on my Y axis.

Can someone please explain how I can make the ticks show in the graph the whole value without the *10^6 ?

>> a=[14 13 12 11 10 9];
>> b=[1000241 1000237 1000232 1000223 1000215 1000204];
>> plot(a,b)

thats the values I need to have in my presentation..

Sorry for the lousy english and explanation, but as I said, this is my first time here..

(The values are the frequencies of a crystal oscillator that is feed less and less voltage) ;)

Subject: newbie question about plot and axis

From: Nathan

Date: 23 Nov, 2009 17:33:47

Message: 2 of 2

On Nov 23, 9:01 am, "robert " <rober...@stud.hist.no> wrote:
> Hi, im pretty new to matlab and the use of this kinds of tools. So I have a question that im having some problems with at the moment.
>
> I have measured some frequencies on a oscilloscope that I want to display in a graph.
> However, when i get the data into the graph I and everything with the curve, I see that the Y-point all are 1.002*10^6 and that isn't very good as a presentation model. So now i have a graph with the correct value ticks on the X axis, and only the 1.002*10^6 as ticks on my Y axis.
>
> Can someone please explain how I can make the ticks show in the graph the whole value without the *10^6 ?
>
> >> a=[14 13 12 11 10 9];
> >> b=[1000241 1000237 1000232 1000223 1000215 1000204];
> >> plot(a,b)
>
> thats the values I need to have in my presentation..  
>
> Sorry for the lousy english and explanation, but as I said, this is my first time here..
>
> (The values are the frequencies of a crystal oscillator that is feed less and less voltage) ;)

set(gca,'yticklabel',num2str(get(gca,'ytick')'))

This way, you're using string values for the yticklabel, so it cannot
be "rounded" or expressed in exponential form.

-Nathan

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com