From p.murrell at auckland.ac.nz  Wed Mar 28 00:46:47 2007
From: p.murrell at auckland.ac.nz (Paul Murrell)
Date: Wed, 28 Mar 2007 10:46:47 +1200
Subject: [Rd] [R] Can I scale the labels in a 'persp' graph?
In-Reply-To: <Pine.LNX.4.64.0703272341450.17069@gannet.stats.ox.ac.uk>
References: <mailman.11.1174042804.26780.r-help@stat.math.ethz.ch>
	<Pine.LNX.4.64.0703161252350.30144@obelix.umh.es>
	<45FA999D.1090406@stats.uwo.ca>
	<Pine.LNX.4.64.0703221909020.22676@gannet.stats.ox.ac.uk>
	<4609886C.7020402@stat.auckland.ac.nz>
	<Pine.LNX.4.64.0703272341450.17069@gannet.stats.ox.ac.uk>
Message-ID: <46099ED7.9060001@stat.auckland.ac.nz>

Hi


Prof Brian Ripley wrote:
> On Wed, 28 Mar 2007, Paul Murrell wrote:
> 
>> Hi
>>
>>
>> Prof Brian Ripley wrote:
>>> [Moved to R-devel to ask a policy question.]
>>>
>>> On Fri, 16 Mar 2007, Duncan Murdoch wrote:
>>>
>>>> On 3/16/2007 8:02 AM, salcaraz at obelix.umh.es wrote:
>>>>> Hi all:
>>>>>
>>>>> I'm using 'persp' for 3D graphics.
>>>>>
>>>>> I need the axis's labels smaller than by defect.
>>>>>
>>>>> I see in 'help()', the information about 'par()'.
>>>>>
>>>>> I have wrote:
>>>>>
>>>>>> par(.....,cex.axis=0.5,cex.lab=0.5)
>>>>> perspc(.................)
>>>>>
>>>>> and the result don't change.
>>>>>
>>>>> The question is: Can I change the size of labels in the perps graph??
>>>>>
>>>>> Thank you in advance:
>>>>>
>>>>> /salva
>>>>>
>>>>> 'cex.axis' The magnification to be used for axis annotation
>>>>>            relative to the current setting of 'cex'. (Some functions
>>>>>            such as 'points' accept a vector of values which are
>>>>>            recycled.  Other uses will take just the first value if a
>>>>>            vector of length greater than one is supplied.)
>>>>>
>>>>> 'cex.lab' The magnification to be used for x and y labels relative
>>>>>            to the current setting of 'cex'.
>>>> Those don't appear to be supported by persp, but cex is: e.g.
>>>>
>>>> x <- 1:10
>>>> y <- 1:10
>>>> z <- outer(x,y,function(x,y) sin((x+y)/10))
>>>> persp(x,y,z, cex=0.5)
>>> I've added this to ?persp and ?par, but I wondered if people thought we
>>> should change this to be like 2D plots.  Especially Ross I., who I believe
>>> is the author here?
>>
>> I think Ross wrote the original.  I've hacked some of it a couple of
>> times.  I have no problem with allowing par()s to work with persp(),
>> though not everything makes sense (e.g., par("mar"), or par("mgp") where
>> it gets tricky to get units right or units just do not make sense).
>> There are also 2D-specific ones, like par("xaxt"), though in those cases
>> one option might be to just offer an inline z-analogue in the arguments
>> to persp() (?)
> 
> I was not proposing anything so radical, just that 'cex' (and perhaps 
> 'font') should perhaps work in the same way as 2D plots.


Yep, sounds cool.

Paul
-- 
Dr Paul Murrell
Department of Statistics
The University of Auckland
Private Bag 92019
Auckland
New Zealand
64 9 3737599 x85392
paul at stat.auckland.ac.nz
http://www.stat.auckland.ac.nz/~paul/



[Rd] [R] Can I scale the labels in a 'persp' graph?
Paul Murrell