If there are more categories than there are vertical pixels to display
them in, d.legend automatically changes into smooth gradient mode; it
issues you a warning telling you that it did it in that case.
the various thin=, lines=, and use= options can be used to reduce the
number of categories to something that will fit on the screen. Also you
should check that the map being used is a CELL map, not a FCELL or DCELL.
beyond that, I'd need more information to go on about your raster.
(r.info, screenshots, exact CLI commands to reproduce, xmon or wxGUI, ...)
#2029: raster legend on discrete maps not graduated
-------------------------+--------------------------------------------------
Reporter: timmie | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: d.legend | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by timmie):
Replying to [comment:1 hamish]:
> How many categories in the final image?
5-15 categories.
> If there are more categories than there are vertical pixels to display
them in, d.legend automatically changes into smooth gradient mode; it
issues you a warning telling you that it did it in that case.
I did not see this.
Just a gradient legend with the category breaks as legend labels.
> the various thin=, lines=, and use= options can be used to reduce the
number of categories to something that will fit on the screen. Also you
should check that the map being used is a CELL map, not a FCELL or DCELL.
It's DCELL.
> beyond that, I'd need more information to go on about your raster.
(r.info, screenshots, exact CLI commands to reproduce, xmon or wxGUI, ...)
r.info map=landcover_zones@land
+----------------------------------------------------------------------------+
| Layer: landcover_zon Date: Fri Apr 05 11:45:37 2013 |
| Mapset: land Login of Creator: timmie
|
| Location: 6.4_merc |
| DataBase: /home/timmie/gis/grassdata
|
| Title: Reclass of landcover |
| Timestamp: none
|
|----------------------------------------------------------------------------|
|
|
| Type of Map: reclass Number of Categories: 0
|
| Data Type: CELL
|
| Rows: 12076
|
| Columns: 16879
|
| Total Cells: 203830804
|
| Projection: Mercator
|
| N: 6698600 S: 6491000 Res: 100
|
| E: 2205800 W: 0517900 Res: 100
|
| Range of data: min = 2099 max = 3000
|
|
|
| Data Source:
|
| Reclassified map based on:
|
| Map [landcover_base@land] in mapse |
|
|
| Data Description:
|
|
|
|
|
| Comments:
|
|
|
| generated by r.reclass
|
| r.reclass ... |
|
|
+----------------------------------------------------------------------------+
#2029: raster legend on discrete maps not graduated
-------------------------+--------------------------------------------------
Reporter: timmie | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 6.4.4
Component: Raster | Version: unspecified
Keywords: d.legend | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by hamish):
DCELL will always create a gradient legend, since it's a real number.
(unless you use the use= option)
A reclass of a floating point map should be a virtual CELL map, which is
what your r.info shows for the Data type.
note reclasses of floating point maps are not as well supported as
reclasses of cell maps. in fact the man page says it won't work at all,
but it "sort of" does. So I'm not very surprised things don't work 100%
with that.