Re: [R] no y-axis

2012-11-16 Thread Geophagus
thank you!



--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649718.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] no y-axis

2012-11-13 Thread Jim Lemon

On 11/13/2012 11:01 PM, Geophagus wrote:

Hi Jim and thanks for your answer.
It does not work how I want. When I use your proposal, the values are
superimposed like shown on the pic.

pic.png

Thats my code (what I need is a y-scale with the following interrupts:
5,10,100,1000,5000):


Hi Geo,
I see. Try this:

plot(BE_UK_ABFG$year, BE_UK_ABFG$ammo,
 type="s",
 col= "#DB270F",
 yaxs="i",
 xaxt="n",
 yaxt="n",
 ylim=c(0,5000),
 xlab="",
 ylab="",
 main="Ammo Rep 1885b",
 adj=0,
 las = 1,
 lwd=3,
 bty="n"
 )
abline(h=0:0,  lwd=1, col="black")
abline(h=1000:1000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=2000:2000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=3000:3000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=4000:4000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=5000:5000,  lwd=0.3, col="darkgray", lty="dashed")
lines (BE_UK_AW$year, BE_UK_AW$ammo, type="s", col= "#826A9F", lwd=3.5)
library(plotrix)
axis(1,at=2007:2010)
axis(2,at=seq(0,5000,by=1000),labels=c("",seq(1000,5000,by=1000)),las=1)
mtext(c(5,10,100),at=c(-150,0,150),line=1,side=2,las=1)
par(xpd=TRUE)
# get rid of the bottom tick
rect(2006.8,-10,2006.87,10,col="white",border=NA)
segments(rep(2006.8,3),c(-150,0,150),rep(2006.88,3),c(5,10,100))
par(xpd=FALSE)

Jim

__
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.


Re: [R] no y-axis

2012-11-13 Thread Geophagus
Hi Jim and thanks for your answer.
It does not work how I want. When I use your proposal, the values are
superimposed like shown on the pic.

pic.png   

Thats my code (what I need is a y-scale with the following interrupts:  
5,10,100,1000,5000):

plot(BE_UK_ABFG$year, BE_UK_ABFG$ammo, 
 type="s", 
 col= "#DB270F",
 xaxt="n",
 #yaxt="n",
 ylim=c(0,5000),
 xlab="",
 ylab="",
 main="Ammo Rep 1885b", 
 adj=0,
 las = 1,
 lwd=3,
 bty="n"
 )
abline(h=0:0,  lwd=1, col="black")
abline(h=1000:1000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=2000:2000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=3000:3000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=4000:4000,  lwd=0.3, col="darkgray", lty="dashed")
abline(h=5000:5000,  lwd=0.3, col="darkgray", lty="dashed")
lines (BE_UK_AW$year, BE_UK_AW$ammo, type="s", col= "#826A9F", lwd=3.5)
axis(1,at=seq(2007,2010))
mtext(c(5,10,100,1000,5000),at=c(5,10,100,1000,5000),side=2,line=1, las=1) 


Thank you and best greetings
GeO



--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649368.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] no y-axis

2012-11-13 Thread Jim Lemon

On 11/13/2012 06:59 AM, Geophagus wrote:

thanks, that works fine! good idea.

I have one last question regarding this problem.
My y-scale now is grouped from 0 - 4000 in 1000.
Is it possible to set the scale into not equal breaks like
5,10,100,1000,5000 ?

My axis now:
axis(2,at=seq(0,4000,1000),col = "white", las=1)


Hi GeO,
I would suggest using mtext rather than axis.

mtext(c(5,10,100,1000,5000),at=c(5,10,100,1000,5000),
 side=2,line=1)

You may need to twiddle this a bit to get it right.

Jim

__
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.


Re: [R] no y-axis

2012-11-12 Thread Geophagus
thanks, that works fine! good idea.

I have one last question regarding this problem.
My y-scale now is grouped from 0 - 4000 in 1000.
Is it possible to set the scale into not equal breaks like
5,10,100,1000,5000 ?

My axis now:
axis(2,at=seq(0,4000,1000),col = "white", las=1)

thanks a lot
GeO




--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649336.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] no y-axis

2012-11-12 Thread arun
HI,
May be this helps:
 par(bty="n")

 plot(1:10,yaxt="n")
 axis(2, at = 1:10, labels = 1:10, tick = FALSE)
A.K.



- Original Message -
From: Geophagus 
To: r-help@r-project.org
Cc: 
Sent: Monday, November 12, 2012 12:18 PM
Subject: Re: [R] no y-axis

Hi and thanks for your answer,

I need no axis - only the labels.
In your example 1 to 10.

Greetz
GeO



--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649324.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


__
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.


Re: [R] no y-axis

2012-11-12 Thread Marc Schwartz
Or perhaps something this:

plot(1:10, axes = FALSE, ann = FALSE)
axis(2, at = 1:10, tick = FALSE, lty = "blank")

and if you want the x axis:

axis(1, at = 1:10)

Not clear if you want the frame around the plot region or not. If so, there are 
some options using ?box and see ?par, specifically, 'bty', for options there. 
Or, you can always use ?segments, knowing that par("usr") gives you the 
coordinates of the plot region corners...

Regards,

Marc Schwartz


On Nov 12, 2012, at 1:04 PM, Rui Barradas  wrote:

> Hello,
> 
> If you want to completely remove the axis, overplot in color white.
> 
> plot(1:10, yaxt = "n")
> axis(2, at = 1:10, labels = 1:10, tick = FALSE)
> axis(2, at = 1:10, labels = 1:10, col = "white")
> 
> Hope this helps,
> 
> Rui Barradas
> Em 12-11-2012 17:18, Geophagus escreveu:
>> Hi and thanks for your answer,
>> 
>> I need no axis - only the labels.
>> In your example 1 to 10.
>> 
>> Greetz
>> GeO
>>

__
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.


Re: [R] no y-axis

2012-11-12 Thread Rui Barradas

Hello,

If you want to completely remove the axis, overplot in color white.

plot(1:10, yaxt = "n")
axis(2, at = 1:10, labels = 1:10, tick = FALSE)
axis(2, at = 1:10, labels = 1:10, col = "white")

Hope this helps,

Rui Barradas
Em 12-11-2012 17:18, Geophagus escreveu:

Hi and thanks for your answer,

I need no axis - only the labels.
In your example 1 to 10.

Greetz
GeO



--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649324.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


__
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.


Re: [R] no y-axis

2012-11-12 Thread Geophagus
Hi and thanks for your answer,

I need no axis - only the labels.
In your example 1 to 10.

Greetz
GeO



--
View this message in context: 
http://r.789695.n4.nabble.com/no-drawn-y-axis-but-values-tp4649298p4649324.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] no y-axis

2012-11-12 Thread Rui Barradas

Hello,

Like this?

plot(1:10, yaxt = "n")
axis(2, at = 1:10, labels = 1:10, tick = FALSE)


Hope this helps,

Rui Barradas
Em 12-11-2012 10:08, Geophagus escreveu:

HI @ all,
I'm looking for a simple solution to supress the y-axis - but only the drawn
scale - not the values.
Only the numbers should be displayed.
I tried yaxt="n" but there everything of the y-axis is supressed.
Thanks
GeO




--
View this message in context: 
http://r.789695.n4.nabble.com/no-y-axis-tp4649298.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


__
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.


[R] no y-axis

2012-11-12 Thread Geophagus
HI @ all,
I'm looking for a simple solution to supress the y-axis - but only the drawn
scale - not the values.
Only the numbers should be displayed.
I tried yaxt="n" but there everything of the y-axis is supressed.
Thanks
GeO




--
View this message in context: 
http://r.789695.n4.nabble.com/no-y-axis-tp4649298.html
Sent from the R help mailing list archive at Nabble.com.

__
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.


Re: [R] No y-axis label using png on linux

2008-08-06 Thread Gabor Grothendieck
See if using bitmap() in place of png() works.

On Wed, Aug 6, 2008 at 8:19 AM, Xiaoming Cai <[EMAIL PROTECTED]> wrote:
> Dear all,
>
> I am grateful if anyone provides a solution to my problem of no y-axis
> label using png on linux. If I use postscript device or X11 device, it
> is fine.  On Windows, it works with png. I have tried different versions
> of R and none of them works.
>
> Best regards,
>
> Xiaoming Cai, Dr.
> School of Geography, Earth and Environmental Sciences
> University of Birmingham
> Edgbaston, Birmingham
> B15 2TT
> (0121) 4145533 (office)
> (0121) 4145528 (fax)
> Email: [EMAIL PROTECTED]
>
>
>[[alternative HTML version deleted]]
>
> __
> 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.
>

__
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.


[R] No y-axis label using png on linux

2008-08-06 Thread Xiaoming Cai
Dear all,

I am grateful if anyone provides a solution to my problem of no y-axis
label using png on linux. If I use postscript device or X11 device, it
is fine.  On Windows, it works with png. I have tried different versions
of R and none of them works.

Best regards,

Xiaoming Cai, Dr.
School of Geography, Earth and Environmental Sciences
University of Birmingham
Edgbaston, Birmingham
B15 2TT
(0121) 4145533 (office)
(0121) 4145528 (fax)
Email: [EMAIL PROTECTED]


[[alternative HTML version deleted]]

__
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.