Chapters: 1: Introduction 2: Simple example 3: Invocation 4: Finer Control 5: X-Y Plots 6: Contour Plots 7: Image Plots 8: Examples 9: Gri Commands 10: Programming 11: Environment 12: Emacs Mode 13: History 14: Installation 15: Gri Bugs 16: Test Suite 17: Gri in Press 18: Acknowledgments 19: License Indices: Concepts Commands Variables |
4.9: Colour of ink in penThe darkness of the ``pen'' used in drawing commands (for either lines or for text) is set by `set graylevel .brightness. '. A brightness
value of 0 corresponds to black ink, and a brightness value of 1
corresponds to white ink. Values outside this range are clipped to the
nearer endpoint. Values inside this range choose a proportional
graylevel in between; for example, `set graylevel 0.5 ' gives a 50
percent gray tone.
The graylevel applies to text as well as lines. Often you'll want to draw a gray line and a black label beside it, or you'll want to set a graylevel temporarily. Here's how to do it:
The color of the "pen" may be set to any value you can describe with an RGB (red, green, blue) or HSB (hue, saturation, brightness) specification, or a color name. This pen color applies to everything, even text.
The ` Set the pen color to the indicated name. By default, only a handful of colors are known. You MUST give color names as written here, obeying the capitilization shown. The color mixes are identical to those used in X11. The following lists some of the colors Gri knows by default.
To get more colors than this, use the `
You should do a test case for your printer to see which colors you find
most to your liking. You'll want to pick colors that look different
from each other. In some cases you might want to avoid dithered colors,
since they look too broken on really thin lines. For example, on my
printer I like the following colors: `
The `
This command sets the color using the red-green-blue color model. If
you are familiar with how colors add (e.g. red plus green yields
yellow), then you might like this, but most people find it easier to use
the `
Set the individual color components as follows. The numbers
`
The `
In this color model, the color ("hue") is specified with a single
parameter. Many people find this easier than using the corresponding
`
Set the individual color components as follows. The numbers
` Hue, saturation, and brightness values are all clipped to the range 0 to 1. EXAMPLES:
|