[R] Tutorial on rgl Graphics

Duncan Murdoch murdoch.duncan at gmail.com
Mon May 24 23:32:55 CEST 2010


vincent.deluard wrote:
> Hi Duncan,
>
> I love your plotlm3d function!
>   

That's not really my function.  I think I suggested some changes to it, 
but I didn't write most of it.

Duncan Murdoch

> I want to plot the following data:
>
>   
>> x
>>     
>  [1]  1  2  3  4  5  6  7  8  9 10
>   
>> y
>>     
>  [1] 0.5678042 0.3986702 0.3063544 0.2554426 0.1954868 0.1238850 0.1161249
> 0.1689951 0.1826783 0.2406300
>   
>> z
>>     
>  [1] 0.2558812 0.2619668 0.2585930 0.2563669 0.2588323 0.2734029 0.2770458
> 0.2782657 0.2850179 0.3015296
>
> Then i execute:
>
> open3d() 
> plotlm3d(x, y, z, 
>          surface = T, 
>          model   = 'z ~ x + y', 
>          xlab    = 'x', 
>          ylab    = 'y'
> )
>
> The chart is beautiful but I would like to change the scale on the z-axis
> to: 
> seq(0.25,0.31,0.01))
>
> I tried this command:
> axis(3, at=seq(0.25,0.34,0.01))
>
> But it not work - my guess is that the underlying function plotlm3d needs to
> modified but I cannot figure where.
>



More information about the R-help mailing list