Dear mailing list readers!
Using R and the plot function I stumbled over this little issue:
plot(x=NULL,
y=NULL,
xlim=range(1:10),
ylim=range(1e-9:1),
log="y")
produces an plot empty plot, where the y-axis is in the specified range.
Changing ylim to
ylim=range(1e-9:1e-3)
creates an y-axis in the range of 1e-12 to 1e-6. This appearance of the
y-axis is a bit unexpected for me. Could anyone point me to a FAQ entry
why this happens?
Thank you very much in advance!
Sincerely,
/steffen
--
Steffen Uhlig, PhD
Mechatronik und Sensortechnik
HTW des Saarlandes
Goebenstra?e 40
66117 Saarbr?cken
Tel.: +49 (0) 681 58 67 274
Hi,
The xlim and ylim arguments should be given the extremes of the range,
not a range:
plot(x=NULL,
y=NULL,
xlim=c(1, 10), ## with c()
ylim=v(1e-9, 1e-3), ## with c()
log="y")
HTH,
Ivan
Le 11/10/2010 10:00, Steffen Uhlig a ?crit :> Dear mailing list readers!
>
> Using R and the plot function I stumbled over this little issue:
>
> plot(x=NULL,
> y=NULL,
> xlim=range(1:10),
> ylim=range(1e-9:1),
> log="y")
>
> produces an plot empty plot, where the y-axis is in the specified
> range. Changing ylim to
>
> ylim=range(1e-9:1e-3)
>
> creates an y-axis in the range of 1e-12 to 1e-6. This appearance of
> the y-axis is a bit unexpected for me. Could anyone point me to a FAQ
> entry why this happens?
>
> Thank you very much in advance!
>
> Sincerely,
> /steffen
>
>
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. S?ugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/mitarbeiter.php
Steffen, Consider the input you have given to range:> 1e-9:1[1] 1e-09 1e+00 versus> 1e-9:1e-3[1] 1e-09>hth, Ingmar On Wed, Nov 10, 2010 at 10:00 AM, Steffen Uhlig < steffen.uhlig@htw-saarland.de> wrote:> Dear mailing list readers! > > Using R and the plot function I stumbled over this little issue: > > plot(x=NULL, > y=NULL, > xlim=range(1:10), > ylim=range(1e-9:1), > log="y") > > produces an plot empty plot, where the y-axis is in the specified range. > Changing ylim to > > ylim=range(1e-9:1e-3) > > creates an y-axis in the range of 1e-12 to 1e-6. This appearance of the > y-axis is a bit unexpected for me. Could anyone point me to a FAQ entry why > this happens? > > Thank you very much in advance! > > Sincerely, > /steffen > > > -- > Steffen Uhlig, PhD > Mechatronik und Sensortechnik > HTW des Saarlandes > Goebenstraße 40 > 66117 Saarbrücken > > Tel.: +49 (0) 681 58 67 274 > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >[[alternative HTML version deleted]]
Hi Ivan, thanks for the hint. Now it works as expected. Sincerely, /steffen Am 10.11.2010 10:10, schrieb Ivan Calandra:> Hi, > > The xlim and ylim arguments should be given the extremes of the range, > not a range: > plot(x=NULL, > y=NULL, > xlim=c(1, 10), ## with c() > ylim=v(1e-9, 1e-3), ## with c() > log="y") > > HTH, > Ivan > > Le 11/10/2010 10:00, Steffen Uhlig a ?crit : >> Dear mailing list readers! >> >> Using R and the plot function I stumbled over this little issue: >> >> plot(x=NULL, >> y=NULL, >> xlim=range(1:10), >> ylim=range(1e-9:1), >> log="y") >> >> produces an plot empty plot, where the y-axis is in the specified >> range. Changing ylim to >> >> ylim=range(1e-9:1e-3) >> >> creates an y-axis in the range of 1e-12 to 1e-6. This appearance of >> the y-axis is a bit unexpected for me. Could anyone point me to a FAQ >> entry why this happens? >> >> Thank you very much in advance! >> >> Sincerely, >> /steffen >> >> >-- Steffen Uhlig, PhD Mechatronik und Sensortechnik HTW des Saarlandes Goebenstra?e 40 66117 Saarbr?cken Tel.: +49 (0) 681 58 67 274