From: nils on
Does anyone know how to plot two or even more functions as e.g. linear curves in one diagram and break the y-axis ?
For instance in case of:

f1(x)=2*x+10 and
f2(x)=3*x+5000 with
0<x<1000

how could I skip the y-axis range between 50 and 4500 in order to avoid a huge white gap ?

With many thanks in advance,

Nils M.
From: dpb on
nils wrote:
> Does anyone know how to plot two or even more functions as e.g. linear
> curves in one diagram and break the y-axis ? For instance in case of:
> f1(x)=2*x+10 and f2(x)=3*x+5000 with 0<x<1000
> how could I skip the y-axis range between 50 and 4500 in order to avoid
> a huge white gap ?
> With many thanks in advance,
> Nils M.

AFAIK, that isn't possible in ML on a single axis; either use plotyy or
make a second axis manually on the left side. Seems like there's an
example in the documentation on customizing plots/figures that
demonstrates adding additional axis...

--
From: Walter Roberson on
dpb wrote:
> nils wrote:
>> Does anyone know how to plot two or even more functions as e.g. linear
>> curves in one diagram and break the y-axis ? For instance in case
>> of: f1(x)=2*x+10 and f2(x)=3*x+5000 with 0<x<1000 how could I skip
>> the y-axis range between 50 and 4500 in order to avoid a huge white
>> gap ? With many thanks in advance, Nils M.
>
> AFAIK, that isn't possible in ML on a single axis; either use plotyy or
> make a second axis manually on the left side. Seems like there's an
> example in the documentation on customizing plots/figures that
> demonstrates adding additional axis...

I seem to recall there being a FEX contribution named something similar
to "break_axis". And it wouldn't surprise me if the FEX contribution plt
could handle something like this.
From: us on
"nils " <nimainusch(a)freenet.de> wrote in message <i0qjns$ht8$1(a)fred.mathworks.com>...
> Does anyone know how to plot two or even more functions as e.g. linear curves in one diagram and break the y-axis ?
> For instance in case of:
>
> f1(x)=2*x+10 and
> f2(x)=3*x+5000 with
> 0<x<1000
>
> how could I skip the y-axis range between 50 and 4500 in order to avoid a huge white gap ?
>
> With many thanks in advance,
>
> Nils M.

a hint:
- this FEX contribution by michael robbins might be helpful

http://www.mathworks.com/matlabcentral/fileexchange/21864-breakplot

us
 | 
Pages: 1
Prev: mcc compilation error
Next: plotting