X11 Device Driver
Prof Brian D Ripley
ripley@stats.ox.ac.uk
Fri, 2 Apr 1999 06:38:09 +0100 (BST)
On Fri, 2 Apr 1999, Ross Ihaka wrote:
> I have made some modifications to the X11 graphics driver so that it is
> more flexible about its use of colors. I have added a new parameter to
> the X11/x11 function which controls this. The parameter is currently
> called "colormodel" and works as follows:
>
> colormodel = 0 Monochrome graphics
> colormodel = 1 Grayscale (256 shades)
> colormodel = 2 Pseudocolor1
> colormodel = 3 Pseudocolor2
> colormodel = 4 Truecolor
>
> Pseudocolor1 allocates as big a color cube as possible and then
> approximates requested colors with colors from the cube.
>
> Pseudocolor2 allocates colors "on-demand" until it runs out of
> colors. You then get a "can't allocate colors" error message.
>
> More sophisticated devices will support the color models of less
> sophisticated devices. E.g. you can do grey-scale and pseudocolor
> on a truecolor device.
>
> So, one question is: How should this functionality be packaged?
>
> One possibility is to have multiple X11 device driver entry points
>
> X11.mono, X11.gray, X11.pseudo1, X11.pseudo2, X11.color
>
> This would be useful because people could use options() to set
> the appropriate default device.
>
> Another possibility would be to have use an additional argument to
> the driver and to make it rather more meaningful than 0, 1, 2, 3, 4.
I would prefer a single driver, with (effectively)
X11(display = "", width = 7, height = 7, pointsize = 12,
colortype=options()$X11colortype)
and choosing type from "mono", "gray", "pseudo.cube", "pseudo", "true"
as appropriate.
> A second question is what should the default behavior be on Pseudocolor
> devices; Pseudocolor1 or Pseudocolor2?
Pseudocolor2, please. I very rarely have a problem (but then I have
netscape and gs under control).
> Would anyone care to express an opinion. I'd like to get this commited
> for the 0.64 release.
Yes, please.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._