Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
axis tight in loglog

Subject: axis tight in loglog

From: Daphne

Date: 12 Sep, 2009 14:06:03

Message: 1 of 5


I am trying to get a nice tight plot in loglog scale and axis tight doesn't work well.
Axis auto, gives maybe 2-3 log decades more than needed, while axis tight cuts into the middle of a decade.
Is there any way to define an axis tight for full log decades? (going from 1-->100 and not from 4-->100 for example).

Thanks!
Daphne

Subject: axis tight in loglog

From: Daphne

Date: 13 Sep, 2009 14:18:01

Message: 2 of 5


Found a nice way to do it.
I read in what the "tight" values would be and then play with them to make them 1eXX. See below. One hitch, in a loglog plot, ylim seems to read the min as zero (when it's obviously not).

axis tight
xlim_tight = xlim;
xlim_log(1) = 10^(floor(log10(xlim_tight(1)))); % min x-axis
xlim_log(2) = 10^( ceil(log10(xlim_tight(2)))); % max x-axis

Daphne



"Daphne" <daphnew_too_nospam@yahoo.com> wrote in message <h8g9sb$2il$1@fred.mathworks.com>...
>
> I am trying to get a nice tight plot in loglog scale and axis tight doesn't work well.
> Axis auto, gives maybe 2-3 log decades more than needed, while axis tight cuts into the middle of a decade.
> Is there any way to define an axis tight for full log decades? (going from 1-->100 and not from 4-->100 for example).
>
> Thanks!
> Daphne

Subject: axis tight in loglog

From: dpb

Date: 13 Sep, 2009 15:49:08

Message: 3 of 5

Daphne wrote:
...

> ... in a loglog plot, ylim seems to read the min as zero ...

I certainly don't see that here...you sure it's not just display
formatting issue? How did you confirm this?

--

Subject: axis tight in loglog

From: Daphne

Date: 21 Sep, 2009 09:21:01

Message: 4 of 5


I've tried playing with the formatting, doesn't make a difference.
How do I confirm?

Daphne

dpb <none@non.net> wrote in message <h8j4ho$g4e$1@news.eternal-september.org>...
> Daphne wrote:
> ...
>
> > ... in a loglog plot, ylim seems to read the min as zero ...
>
> I certainly don't see that here...you sure it's not just display
> formatting issue? How did you confirm this?
>
> --

Subject: axis tight in loglog

From: dpb

Date: 21 Sep, 2009 12:36:26

Message: 5 of 5

Daphne wrote:

...[top posting repaired--please don't do that, makes conversation
difficult]...
> dpb <none@non.net> wrote in message <h8j4ho$g4e$1@news.eternal-september.org>...
>> Daphne wrote:
>> ...
>>
>>> ... in a loglog plot, ylim seems to read the min as zero ...
>> I certainly don't see that here...you sure it's not just display
>> formatting issue? How did you confirm this?

 > I've tried playing with the formatting, doesn't make a difference.
 > How do I confirm?

Let's see an example (a 2-3 line cut 'n paste should suffice) to see if
anybody else can reproduce.

What does something like

 >> yl=ylim;
 >> yl(1)==0

return?

--

Tags for this Thread

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.

Contact us