s-news
[Top] [All Lists]

RE Color spec. Postscript graphic device

To: s-news@lists.biostat.wustl.edu
Subject: RE Color spec. Postscript graphic device
From: gerald.jean@dgag.ca
Date: Wed, 24 Sep 2008 13:29:33 -0400
In-reply-to: <98BC938D4C400844A6AC00C6952BD5230EE35F@Pegasus.germany.evotecoai.com>
Here is how I do it:

ps.options(colors = ps.colors.rgb[c("black", "red", "DarkGreen", "blue",
             "magenta1", "DarkOrange1", "MidnightBlue", "firebrick1",
             "yellow", "maroon", "cornsilk", "BlueViolet"),],
           background = ps.colors.rgb[c("gray85"),])
ps.options(tempfile = "somefile", '##.EPS', sep = ''), setfont =
ps.setfont.latin1, font = 1)
postscript(onefile = F, print.it = F, append = F, horizontal = T, color.p =
T)

Then I do my plotting.  Hope this helps.

Gérald Jean
Conseiller senior en statistiques,
VP Planification et Développement des Marchés,
Desjardins Groupe d'Assurances Générales
télephone            : (418) 835-4900 poste (7639)
télecopieur          : (418) 835-6657
courrier électronique: gerald.jean@dgag.ca

"In God we trust, all others must bring data"  W. Edwards Deming
s-news-owner@lists.biostat.wustl.edu a écrit sur 2008/09/24 05:25:10 :

> Dear all,
> I’m migrating  to Splus 8. The old scripts work very well except
> the creation of .eps files. To produce colored eps graphics, I had to add

> the option color.p = T (as suggested in the help). Fine.
> Nevertheless my own color specification (for example setting “red”
> at position 2, “green” at position 3 , “MediumBlue” at position 4, …..)
> doesn’t work, as indirectly demonstrated by the following very simple
example.
> (I’m intrinsically not a fan of very long e-mails. There was no
> other way to describe the problem.)
>
> Under Splus 6.1.2
> S-PLUS : Copyright (c) 1988, 2002 Insightful Corp.
> S : Copyright Lucent Technologies, Inc.
> Version 6.1.2 Release 2 for Linux 2.2.12 : 2002
> Working data will be in .Data
> ps.options()$colors:
>  [1] 0.0 0.6 0.3 0.9 0.4 0.7 0.1 0.5 0.8 0.2
> color.vec <- rep("MediumBlue", 10)
> postscript("test_S6.1.2.eps", horizontal = TRUE, colors = ps.colors.
> rgb[color.vec,])
> plot(1:10, 1:10, type = "n")
> for(i in 1:10) points(i, i, col = i, cex = 3, pch = 16)
> dev.off()
> My comment: all 10 points are blue (as expected).
>
> Under Splus 8
> S-PLUS : Copyright (c) 1988, 2007 Insightful Corp.
> S : Copyright Insightful Corp.
> Version 8.0.4  for Linux 2.4.21-37.EL, 64-bit : 2007
> Working data will be in .Data
> ps.options()$colors:
>  [1] 0.0 0.6 0.3 0.9 0.4 0.7 0.1 0.5 0.8 0.2
> color.vec <- rep("Mediumblue", 10)
> postscript("test_S8.eps", horizontal = TRUE, colors = ps.colors.
> rgb[color.vec,])
> plot(1:10, 1:10, type = "n")
> for(i in 1:10) points(i,  i, col = i, cex = 3, pch = 16)
> dev.off()
> My comment: 10 different colors are used for the 10 points, starting from

> “black” (position 1).
> Question: How can I force my own color specification to work similar to
> Splus 6.1.2?
> Regards.
> Dr. Pierre Ilouga
> Screening Operations/Discovery Informatics
> EVOTEC AG
> Schnackenburgallee 114
> 22525 Hamburg
> Germany
> pierre.ilouga@evotec.com
> www.evotec.com
> Evotec AG Hamburg. Amtsgericht Hamburg HRB 68223
> Vorstand: Joern Aldag (Vorsitzender), Dr. Klaus Maleck und Dr. Mario
Polywka
> Aufsichtsratsvorsitzender: Dr. Flemming Ornskov


Le message ci-dessus, ainsi que les documents l'accompagnant, sont destinés
uniquement aux personnes identifiées et peuvent contenir des informations
privilégiées, confidentielles ou ne pouvant être divulguées. Si vous avez
reçu ce message par erreur, veuillez le détruire.

This communication ( and/or the attachments ) is intended for named
recipients only and may contain privileged or confidential information
which is not to be disclosed. If you received this communication by mistake
please destroy all copies.
<Prev in Thread] Current Thread [Next in Thread>