Re: [R] 'persp' query

2009-10-07 Thread Peter Ehlers

Certainly, you will want to set zlab=.
mtext() is quite flexible; you can control distance to the
axis with line=1.5, say. But remember that mtext()
is a 2-dim graphics function - it looks at your plot as
a 2-d plot. That's why I made the comment about your
z-axis having to be fairly close to vertical on the page.
Try the first example in ?persp and follow the call with
mtext(my z label, side=2). Because of the tilt of
the z-axis, this looks a bit strange (to me).

 -Peter Ehlers

Geoffrey William Heard wrote:

Much thanks David and Peter

I thought about mtext, but didn't try it, as was unsure what the
appropriate 'side' value would be. Any thoughts?

Cheers

Geoff

-Original Message-
From: Peter Ehlers [mailto:ehl...@ucalgary.ca] 
Sent: Wednesday, 7 October 2009 1:43 AM

To: David Winsemius
Cc: Geoffrey William Heard; r-help@r-project.org
Subject: Re: [R] 'persp' query



David Winsemius wrote:

On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote:


Hi All

I'm creating some 3-D plots using the function 'persp', and have a 
query regarding the ability to make changes to the label of the

z-axis.
There are two things I would like to do. First, the default setting 
places the label a little close to the axis for my liking. Is there 
any way of moving the label? I've tried adjustments with 'mgp' in 
'par', but without success. The second is to change the direction of 
the label. Currently it reads top to bottom, whereas I would like it 
to read bottom to top, as per a y-axis on a standard plot. Is there 
anyway of doing so?

?mtext   # and use the adj argument


Good idea. This works well if your z-axis is fairly vertical
on you plot.

  -Peter Ehlers




__
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] 'persp' query

2009-10-06 Thread Geoffrey William Heard
Hi All
 
I'm creating some 3-D plots using the function 'persp', and have a query 
regarding the ability to make changes to the label of the z-axis.
 
There are two things I would like to do. First, the default setting places the 
label a little close to the axis for my liking. Is there any way of moving the 
label? I've tried adjustments with 'mgp' in 'par', but without success. The 
second is to change the direction of the label. Currently it reads top to 
bottom, whereas I would like it to read bottom to top, as per a y-axis on a 
standard plot. Is there anyway of doing so?
 
Would greatly appreciate any advice!
 
Much thanks
 
Geoff 

__
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] 'persp' query

2009-10-06 Thread Peter Ehlers

Geoff,

One way (the only way without modifying source code?) to satisfy
your first wish is to insert a newline before your label as in

  zlab = \nMy z-text.

I don't know of an answer for your second wish other than using
the single letter Z as your label :)

 -Peter Ehlers

Geoffrey William Heard wrote:

Hi All
 
I'm creating some 3-D plots using the function 'persp', and have a query regarding the ability to make changes to the label of the z-axis.
 
There are two things I would like to do. First, the default setting places the label a little close to the axis for my liking. Is there any way of moving the label? I've tried adjustments with 'mgp' in 'par', but without success. The second is to change the direction of the label. Currently it reads top to bottom, whereas I would like it to read bottom to top, as per a y-axis on a standard plot. Is there anyway of doing so?
 
Would greatly appreciate any advice!
 
Much thanks
 
Geoff 


__
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] 'persp' query

2009-10-06 Thread David Winsemius


On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote:


Hi All

I'm creating some 3-D plots using the function 'persp', and have a  
query regarding the ability to make changes to the label of the z- 
axis.


There are two things I would like to do. First, the default setting  
places the label a little close to the axis for my liking. Is there  
any way of moving the label? I've tried adjustments with 'mgp' in  
'par', but without success. The second is to change the direction of  
the label. Currently it reads top to bottom, whereas I would like it  
to read bottom to top, as per a y-axis on a standard plot. Is there  
anyway of doing so?


?mtext   # and use the adj argument

--
David Winsemius, MD
Heritage Laboratories
West Hartford, CT

__
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] 'persp' query

2009-10-06 Thread Peter Ehlers



David Winsemius wrote:


On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote:


Hi All

I'm creating some 3-D plots using the function 'persp', and have a 
query regarding the ability to make changes to the label of the z-axis.


There are two things I would like to do. First, the default setting 
places the label a little close to the axis for my liking. Is there 
any way of moving the label? I've tried adjustments with 'mgp' in 
'par', but without success. The second is to change the direction of 
the label. Currently it reads top to bottom, whereas I would like it 
to read bottom to top, as per a y-axis on a standard plot. Is there 
anyway of doing so?


?mtext   # and use the adj argument


Good idea. This works well if your z-axis is fairly vertical
on you plot.

 -Peter Ehlers

__
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] 'persp' query

2009-10-06 Thread Geoffrey William Heard
Much thanks David and Peter

I thought about mtext, but didn't try it, as was unsure what the
appropriate 'side' value would be. Any thoughts?

Cheers

Geoff

-Original Message-
From: Peter Ehlers [mailto:ehl...@ucalgary.ca] 
Sent: Wednesday, 7 October 2009 1:43 AM
To: David Winsemius
Cc: Geoffrey William Heard; r-help@r-project.org
Subject: Re: [R] 'persp' query



David Winsemius wrote:
 
 On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote:
 
 Hi All

 I'm creating some 3-D plots using the function 'persp', and have a 
 query regarding the ability to make changes to the label of the
z-axis.

 There are two things I would like to do. First, the default setting 
 places the label a little close to the axis for my liking. Is there 
 any way of moving the label? I've tried adjustments with 'mgp' in 
 'par', but without success. The second is to change the direction of 
 the label. Currently it reads top to bottom, whereas I would like it 
 to read bottom to top, as per a y-axis on a standard plot. Is there 
 anyway of doing so?
 
 ?mtext   # and use the adj argument
 
Good idea. This works well if your z-axis is fairly vertical
on you plot.

  -Peter Ehlers

__
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] 'persp' query

2009-10-06 Thread David Winsemius
I'm pretty sure side =2 will put it on the left hand side. May only  
work for specific views.


You would also want to assign an empty string to the persp zlab  
(although that's from memory and I don't have a session running to  
look up the argument.)


--
David.

On Oct 6, 2009, at 7:02 PM, Geoffrey William Heard wrote:


Much thanks David and Peter

I thought about mtext, but didn't try it, as was unsure what the
appropriate 'side' value would be. Any thoughts?

Cheers

Geoff

-Original Message-
From: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Sent: Wednesday, 7 October 2009 1:43 AM
To: David Winsemius
Cc: Geoffrey William Heard; r-help@r-project.org
Subject: Re: [R] 'persp' query



David Winsemius wrote:


On Oct 6, 2009, at 4:46 AM, Geoffrey William Heard wrote:


Hi All

I'm creating some 3-D plots using the function 'persp', and have a
query regarding the ability to make changes to the label of the

z-axis.


There are two things I would like to do. First, the default setting
places the label a little close to the axis for my liking. Is there
any way of moving the label? I've tried adjustments with 'mgp' in
'par', but without success. The second is to change the direction of
the label. Currently it reads top to bottom, whereas I would like it
to read bottom to top, as per a y-axis on a standard plot. Is there
anyway of doing so?


?mtext   # and use the adj argument


Good idea. This works well if your z-axis is fairly vertical
on you plot.

 -Peter Ehlers


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

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