#3015: Add legend title
--------------------------+---------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
Type: enhancement | Status: reopened
Priority: normal | Milestone: 7.2.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend, gsoc2016, cartography
CPU: Unspecified | Platform: All
--------------------------+---------------------------------------------
Changes (by neteler):
* status: closed => reopened
* resolution: fixed =>
Comment:
Specifying a title leads to a parse error:
{{{
GRASS 7.2.svn (latlong_wgs84):~/Downloads > d.legend raster="magnitude"
at=90.3,94.7,1.8,26.5 title="Wind magnitude [knots]"
Drawing horizontal legend as box width exceeds height
GRASS 7.2.svn (latlong_wgs84):~/Downloads > Traceback (most recent call
last):
File "/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode/wx/_misc.py",
line 1358, in Notify
self.notify()
File "/home/mneteler/software/grass72/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/main.py", line 578, in watcher
self.mapFrm.GetMap().GetLayersFromCmdFile()
File "/home/mneteler/software/grass72/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/main.py", line 201, in GetLayersFromCmdFile
self._giface.GetMapDisplay().AddLegendRast(cmd=cmd)
File "/home/mneteler/software/grass72/dist.x86_64-pc-linux-
gnu/gui/wxpython/mapdisp/frame.py", line 1245, in AddLegendRast
cmd, completed=(self.GetOptData, None, None))
File "/home/mneteler/software/grass72/dist.x86_64-pc-linux-
gnu/gui/wxpython/gui_core/forms.py", line 2833, in ParseCommand
_("Unable to parse command '%s'") % ' '.join(cmd))
core.gcmd.GException: Unable to parse command 'd.legend raster=magnitude
title=Wind raster=magnitude [knots] color=black labelnum=5 lines=0
bgcolor=white at=90.3,94.7,1.8,26.5 border_color=black thin=1'
}}}
Likewise with NC SPM:
{{{
GRASS 7.2.svn (nc_spm_08_grass7):~ > d.legend raster=elevation
title="Elevation [m]"
GRASS 7.2.svn (nc_spm_08_grass7):~ > ERROR: Failed to run command
'd.legend raster=[m] at=5,50,47,50
title=Elevation'. Details:
GRASS_INFO_ERROR(16739,1): Raster map <[m]> not found
GRASS_INFO_END(16739,1)
}}}
"Just" a quoting issue it seems.
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3015#comment:8>
GRASS GIS <https://grass.osgeo.org>