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. Perhaps there are better ideas also. A second question is what should the default behavior be on Pseudocolor devices; Pseudocolor1 or Pseudocolor2? Would anyone care to express an opinion. I'd like to get this commited for the 0.64 release. Ross -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
>>>>> On Fri, 2 Apr 1999 16:35:30 +1200 (NZST), >>>>> Ross Ihaka (RI) wrote:RI> I have made some modifications to the X11 graphics driver so that it is RI> more flexible about its use of colors. I have added a new parameter to RI> the X11/x11 function which controls this. The parameter is currently RI> called "colormodel" and works as follows: RI> colormodel = 0 Monochrome graphics RI> colormodel = 1 Grayscale (256 shades) RI> colormodel = 2 Pseudocolor1 RI> colormodel = 3 Pseudocolor2 RI> colormodel = 4 Truecolor RI> Pseudocolor1 allocates as big a color cube as possible and then RI> approximates requested colors with colors from the cube. don't know if that's possible, but how hard would it be to optionally limit the size of the cube? I have something in mind like only allowing 64 colors or whatever to be able to start other applications (and leaving them some room in the colormap) after R has started. Netscape.maxImageColors worked always fine for me ... .f -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 2 Apr 1999, Ross Ihaka wrote:> > 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'd prefer this one> Perhaps there are better ideas also. > > A second question is what should the default behavior be on Pseudocolor > devices; Pseudocolor1 or Pseudocolor2?I would go for allocating colors on demand, especially if we can print out a message suggesting the color cube driver when colors run out. -thomas -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._