[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Q] xgraph color setting



On Tue, 9 Nov 1999, Lee Jiwoong wrote:

> I hope set the color of data at my own will.
> 
> According to xgraph manual, 
> 
> ----
>        Some options can only be specified in the X defaults  file
>        or in the data files.  These options are described below:
> 
>        <digit>.Color
>               Specifies the color for a data set.  Eight indepen-
>               dent colors can be  specified.   Thus,   the  digit
>               should  be  between '0' and '7'.  If there are more
>               than eight data sets,  the colors will  repeat  but
>               with a new line style (see below).


So your xgraph data file needs to start off something like:

TitleText: end-to-end packet delay variation over 23.99-hour period
YUnitText: packet transit time in s (Y) vs packet start time from 0 to 86371s
XUnitText: s
0.Color: PapayaWhip
1.Color: red
2.Color: SpringGreen
3.Color: blue
4.Color: yellow
5.Color: purple
6.Color: orange
7.Color: hotpink
1 0.119300
31 0.120300

etc., and there's a core set of colours defined in ~xgraph/init.c.

0.Color: is the colour of the line drawn for the current dataset, so
you'd set that differently in every file.

Unfortunately, I've been unable to get xgraph to actually _obey_ these
colour changes on the 256-colour video I'm stuck with; I simply get
messages of the form:

Parameter 2.Color: can't translate `SpringGreen' into a color
(defaulting to `black')

which is a bit odd, seeing how SpringGreen is in init.c as well as
being a standard X11 colour like PapayaWhip, and X11's list is
in the usual place of /lib/X11/rgb.txt (okay, so it's symlinked from
/usr/openwin/lib/X11/rgb.txt and we're compensating for Solaris
default deficiencies here), and how everything else seems to cope
with 256 colours with varying[*] degrees of success.

So, you will probably need 24-bit video to see the differences -
things are rather better on our Ultra30s, where I can see PapayaWhip
in all its glory.

More importantly, I haven't been able to generate colour postscript
from xgraph for our colour printers either. Anyone?

thanks,

L.

[*] try surfing the web from a 256-colour Sparc20.
    See the difference between gif transparency and 'matching'
    the background colours. Admire a whole new range of 'fleshtones'.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>