Re: [R] axis colours

2009-04-05 Thread Umesh Srinivasan
Thanks a lot. That's what I was looking for. Must have missed the fg bit in
the ? par.

Cheers,
Umesh

On Sun, Apr 5, 2009 at 3:19 AM, Duncan Murdoch murd...@stats.uwo.ca wrote:

 On 04/04/2009 5:13 PM, Umesh Srinivasan wrote:

 Hi,

 Is there a way to use par to change the colours of the axes lines (not the
 labels)? I've done this:

 par(bg = black)
 plot(x, y, col = yellow, pch = 16)

 but I have to use

 axes = F within the plot command, and then use

 axis (1, col = yellow)
 axis (2, col = yellow)

 and so on for axes 3  4.

 This does not help since the new axes are not of the same length as the
 default 'box' that you get around a plot.


 You can use box() to draw a box.  So you can get yellow axes and box using

 plot(1,1, axes=F)
 axis(1, col=yellow)
 axis(2, col=yellow)
 box(col=yellow)

 par() doesn't have an option for this.  plot() will use the default
 par(col) setting for the box, but that also affects the points being
 drawn.

 Duncan Murdoch


[[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] axis colours

2009-04-04 Thread Umesh Srinivasan
Hi,

Is there a way to use par to change the colours of the axes lines (not the
labels)? I've done this:

par(bg = black)
plot(x, y, col = yellow, pch = 16)

but I have to use

axes = F within the plot command, and then use

axis (1, col = yellow)
axis (2, col = yellow)

and so on for axes 3  4.

This does not help since the new axes are not of the same length as the
default 'box' that you get around a plot.

Thanks and cheers,
Umesh

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


Re: [R] axis colours

2009-04-04 Thread Uwe Ligges



Umesh Srinivasan wrote:

Hi,

Is there a way to use par to change the colours of the axes lines (not the
labels)? I've done this:

par(bg = black)
plot(x, y, col = yellow, pch = 16)

but I have to use

axes = F within the plot command, and then use

axis (1, col = yellow)
axis (2, col = yellow)

and so on for axes 3  4.

This does not help since the new axes are not of the same length as the
default 'box' that you get around a plot.

Thanks and cheers,
Umesh

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



I'd set
par(bg = black, fg = yellow)
at first and be happy, but if there is some reason why you want specific 
things to happen, it might make sense to tell us what exactly you are 
looking for.


Uwe Ligges

__
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] axis colours

2009-04-04 Thread Duncan Murdoch

On 04/04/2009 5:13 PM, Umesh Srinivasan wrote:

Hi,

Is there a way to use par to change the colours of the axes lines (not the
labels)? I've done this:

par(bg = black)
plot(x, y, col = yellow, pch = 16)

but I have to use

axes = F within the plot command, and then use

axis (1, col = yellow)
axis (2, col = yellow)

and so on for axes 3  4.

This does not help since the new axes are not of the same length as the
default 'box' that you get around a plot.


You can use box() to draw a box.  So you can get yellow axes and box using

plot(1,1, axes=F)
axis(1, col=yellow)
axis(2, col=yellow)
box(col=yellow)

par() doesn't have an option for this.  plot() will use the default 
par(col) setting for the box, but that also affects the points being 
drawn.


Duncan Murdoch

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