help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting grid with personalized scale


From: Renato S. Yamane
Subject: Re: Setting grid with personalized scale
Date: Wed, 25 Nov 2009 12:28:34 -0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4

On 25-11-2009 10:07, Ben Abbott wrote:
On Nov 25, 2009, at 5:45 AM, Renato S. Yamane wrote:
I'm using semilogx to generate my graph, but I would like to get a
x-axis like this:
<http://www.elitebastards.com/hanners/auzentech/forte/charts/rmaa/noise96.png>

But octave is generating a x-axis with grids 10, 100, 1000, 10000, 100000.

Is possible personalize the grid?

Does this do what you need?

clf
x = 1:1000;
semilogx (x, sqrt(x))
a = [1, 2, 3, 5];
xtick = [a, 10*a, 100*a, 1000];

So, xtick is:
1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500, 1000

set (gca, 'xtick', xtick)

What it does?

set (gca, 'xticklabel', 
{'1','2','3','5','10','20','30','50','100','200','300','500','10k'})

So sorry for this questions, I did it because I try change somethings in your suggestion but it don't work...

Like this:
- X-axis:
20, 30, 50, 100, 200, 300, 500, 1k, 2k, 3k, 5k, 10k, 20k

Regards,
Renato


reply via email to

[Prev in Thread] Current Thread [Next in Thread]