Malcolm,

Thanks for the suggestion -- r.colors and d.colors seem to work.  The 
confusion I was having related to p.colors, which requires that I use a
preview color number (0-125) to change colors.  As I can't print out a preview
color chart (using p.chart) these numbers were useless to me.  I do, however,
have a printer color chart (specifying the printer numbers and their red,
green, and blue values), so I won't need your palette script.  Thanks anyway
though.

Bill Green
wg1938@cnsunix.albany.edu


On Friday, July 7, 1995  Malcolm Williamson wrote:

> Ok, I'll try to avoid putting my foot in my mouth this time around. I 
> have obviously overlooked the setcolor command in ps.map, and I can't 
> comment on its functionality since I've never tried it. However, changing 
> raster values for a map in ps.map is quite easy; you've got to alter the 
> actual GRASS colortable for that raster layer. To do this, use either 
> d.colors or r.colors, or you may manually edit the appropriate file (if 
> the raster layer is in _your_ mapset, then the file would be 
> $LOCATION/colr/raster_layer_name; if it is in someone else's mapset, the 
> file would be $LOCATION/colr2/other_mapset_name/raster_layer_name. The 
> colr2 directory allows you to have custom colortables for raster layers 
> in other mapsets, without affecting the original.). I recommend 
> copying the original colortable to a temporary filename, in case you want 
> to revert to it. Because GRASS uses 24-bit color information, ps.map can 
> actually print in TrueColor on an output device that supports it (like a 
> dye-sublimation printer - we use an Apunix 24-bit printer, as well as an 
> HP650c and a RasterGraphics 424CX color electrostatic plotter). Although 
> the HP650c has to resort to dithering, it too can print much more than 
> 256 discernible colors.
> 
> We wrote a shell script to create a color "palette" in GRASS that has 729 
> (9^3) colored boxes for a color reference plot; this is handy when 
> choosing color values in GRASS for a particular printer. I would have to 
> dig some, but I could probably find the files if you or anyone else 
> would like them.
> 
> Lastly, the colortable command within ps.map is essentially a raster 
> "legend" command; it simply prints a legend based on the colors in the 
> raster layer. It will be affected by whatever changes you make to the 
> GRASS colortable for that raster layer.
> 
> Hope this helps. Regards,
> 	-Malcolm Williamson
> 
>  On Fri, 7 Jul 1995, GREEN WILLIAM G 
> wrote:
> 
> > Hi folks,
> > 
> > Sorry it took so long for me to respond, but I've been waiting for a message
> > from someone who helped me set up my HP650c.  Here is her response:
> > 
> > 
> > > Hi Bill,  The grass people themselves told me they did not write a device
> > > driver for your type of HP plotter, nor did we.  This is actually quite a 
> > > lot of work which is why you'd be so popular if you published one!  The 
> > > solution was to run ps.map and save the output to a file.  From there you 
> > > just print the file to the plotter with the lpr command.  The plotter 
> > > understands postscript, so things print.   The problem you're having
> > > (getting grass to specify different pen numbers) may relate to the
> > > fact that there is no device driver.   It doesn't surprise me that p.chart
> > > does not work since the Grass people told me the only print command that will
> > > work for you (since you have no device driver) is ps.map.  Perhaps there is
> > > a way you can get ps.map to do what you need?  I don't think any of the 
> > > other p.* programs will work either.  Sorry I can't be of more help.  Leslie
> > > 
> > 
> > Here is some other information that may help:
> > 
> > 1) To get the HP650c to work, make a subdirectory called ps.devices under the
> > paint directory.  Create a file in the paint subdirectory with the name of the
> > postscript painter and the following information:
> > 
> > level: 1 or 2 (it doesn't seem to matter)
> > page width: 36
> > page height: 54
> > top margin: 0.5 (or whatever)
> > bottom margin 0.5 (or whatever)
> > left margin: 0.25 (or whatever)
> > right margin: 0.25 (ditto)
> > resolution: 300
> > 
> > 2) The setcolor command in ps.map does not seem to work.  Also, I can't use
> > a user-defined colortable because I can't print out the 125 colors that
> > grass recognizes (that is the colortable command wants a value and I don't
> > know what colors the values relate to).
> > 
> > 3) Although the HP650c reference manual tells you to set the language to
> > "automatic," this won't work.  You have to set the language to Postscript
> > instead.
> > 
> > 4) The add.pagesize isn't working correctly with the HP650c.  The command
> > seems to work properly, but when I try to print the map out it disappears
> > into the plotter's black hole (that is it receives the information but never
> > prints anything out).  
> > 
> > 
> > I hope this helps, but could someone answer my original question:  How do
> > I control the raster color output since the setcolor command isn't working?
> > 
> > 
> > Bill Green
> > Archaeology Lab
> > SUNY-Albany
> > wg1938@cnsunix.albany.edu
> > 
> 


