[GRASSLIST:9801] Re: floating-point colorbar in ps.map

Hamish hamish_nospam at yahoo.com
Wed Jan 11 20:58:48 EST 2006


>  > I am trying to add a colorbar with a color gradient to my ps.map
>  > instructions.  My raster file is of type floating-point, and when I use
>  > the d.legend command I get a nice, smooth colorbar. How do I create the
>  > same type of colorbar in ps.map?  If I try to use the colortable command
>  > in my ps.map script, all I get is:
>  >
>  > GRASS_INFO_WARNING(8431,1): Your cats/ file is invalid. A cats/ file with
>  > categories and labels is required for 'colortable' when using CELL
>  > rasters. No colortable will be assigned to this output postscript file.
>  >
>  > My cats file for this raster is as follows:
>  >
>  > # 255 categories
>  >
>  >
>  >
>  >
>  >
>  > 0.00 0.00 0.00 0.00

You should only see that warning when using a CELL raster; FCELL and DCELL
rasters should trigger a floating point (smooth) legend. For category based
maps (CELL) only labeled categories will be displayed (r.support or edit that
cats file by hand/see spearfish soils), hence the warning if none are found.

There may be a bug here of course; but I have been using ps.map with both kinds
of maps without problems.

> raster masked_mx
>    colortable y
>    where 0.5 0.5
>    height 2
>    fontsize 10
>    end

I think you need a final "end" too?


I'm mostly away or busy with work until late Feb, so can't look into it much
before then. If you become convinced it is a bug, please file a bug report in
the GRASS bugtracker so it is lost in the noise & I'll look into it when I can.


note you can use a different raster for the colortable legend and what is
actually displayed with the "raster" instruction.
If omitted, it should use the map you specified with the previously called
"raster" instruction.


happy 2006,
Hamish




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the grass-user mailing list