How to set the size of a rgl window, par3d() ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to set the size of a rgl window, par3d() ?

begert
Dear R- Users,

   is there a way to determine the size of
   an rgl window (rgl.open()) either in advance or
   afterwards, (without using the mouse, of course) ?

   Intuitively, one would assume to set the size by:

   library("rgl");
   par3d(viewport=c(0,0,500,500));
   #rgl.open();

   for example. As the parameter 'viewport' is 'readonly'
   this results in an error message:
   Error in par3d(viewport = c(0, 0, 500, 500)) :
   invalid value specified for rgl parameter "viewport"
   In addition: Warning message:
   parameter "viewport" cannot be set.

   Any possible workarounds ?

Thanks
Bjoern

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: How to set the size of a rgl window, par3d() ?

Duncan Murdoch
On 1/3/2006 10:30 AM, begert wrote:

> Dear R- Users,
>
>    is there a way to determine the size of
>    an rgl window (rgl.open()) either in advance or
>    afterwards, (without using the mouse, of course) ?
>
>    Intuitively, one would assume to set the size by:
>
>    library("rgl");
>    par3d(viewport=c(0,0,500,500));
>    #rgl.open();
>
>    for example. As the parameter 'viewport' is 'readonly'
>    this results in an error message:
>    Error in par3d(viewport = c(0, 0, 500, 500)) :
>    invalid value specified for rgl parameter "viewport"
>    In addition: Warning message:
>    parameter "viewport" cannot be set.
>
>    Any possible workarounds ?

Not that I know of.  This is handled by OpenGL and the windowing system;
rgl just queries OpenGL to give the par3d("viewport") response.

It would take a bit of time to add this, because it would need to be
added for all 3 output devices (Windows, X11, OSX).

Duncan Murdoch

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html