[GRASS-dev] [GRASS GIS] #3122: d.legend.vect: possibility to change text of displayed labels and select labels to show/not show

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------------------------------+-------------------------
Reporter: veroandreo | Owner: grass-dev@…
     Type: enhancement | Status: new
Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Keywords: d.legend.vect, gsoc2016, | CPU: Unspecified
  cartography |
Platform: Unspecified |
-------------------------------------------------+-------------------------
Hello,

I've been testing the new d.legend.vect and it is great :slight_smile:

However, I found that it would be even better if one could change the
label displayed. Not always the name of the vector map is the best option,
especially if one is displaying for example only one category of an
attribute. For instance, I have presence/absence points and only want to
display presence points. I'd like to be able to tweak the label to be
"presence" instead of the name of the vector map.

Also, sometimes one has boundaries of countries or coastlines that should
go on the map but doesn't need to have a label in the legend. If one
disables the display of the map, it disappears from the legend, that's
fine. But it would be great to be able to choose which items should have
label and which shouldn't (but still be displayed).

Thanks a lot!

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by annakrat):

Replying to [ticket:3122 veroandreo]:
> Hello,
>
> I've been testing the new d.legend.vect and it is great :slight_smile:
>
> However, I found that it would be even better if one could change the
label displayed. Not always the name of the vector map is the best option,
especially if one is displaying for example only one category of an
attribute. For instance, I have presence/absence points and only want to
display presence points. I'd like to be able to tweak the label to be
"presence" instead of the name of the vector map.

This is already possible using d.vect parameter legend_label.
>
> Also, sometimes one has boundaries of countries or coastlines that
should go on the map but doesn't need to have a label in the legend. If
one disables the display of the map, it disappears from the legend, that's
fine. But it would be great to be able to choose which items should have
label and which shouldn't (but still be displayed).

That makes sense, I still have to think what would be the best way to
implement it. Currently you can use d.legend.vect output parameter to
export the legend definition, remove the particular line, and use it as
input.
>
> Thanks a lot!
>

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:1&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

Replying to [comment:1 annakrat]:
> Replying to [ticket:3122 veroandreo]:
> > Hello,
> >
> > I've been testing the new d.legend.vect and it is great :slight_smile:
> >
> > However, I found that it would be even better if one could change the
label displayed. Not always the name of the vector map is the best option,
especially if one is displaying for example only one category of an
attribute. For instance, I have presence/absence points and only want to
display presence points. I'd like to be able to tweak the label to be
"presence" instead of the name of the vector map.
>
> This is already possible using d.vect parameter legend_label.

Yes, but this does not seem to like spaces. If I use a label such as
"Areas < 10e6" it only displays "Areas". Same with "Large Areas", I only
get "Large" in the display. It does not make any difference if I enclose
the text in quotes, or not.

> >
> > Also, sometimes one has boundaries of countries or coastlines that
should go on the map but doesn't need to have a label in the legend. If
one disables the display of the map, it disappears from the legend, that's
fine. But it would be great to be able to choose which items should have
label and which shouldn't (but still be displayed).
>
> That makes sense, I still have to think what would be the best way to
implement it. Currently you can use d.legend.vect output parameter to
export the legend definition, remove the particular line, and use it as
input.

I tried just using one whitespace as lable, but then I get an 'x' in the
display.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:2&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by veroandreo):

Replying to [comment:2 mlennert]:
> Replying to [comment:1 annakrat]:
> > Replying to [ticket:3122 veroandreo]:
> > > Hello,
> > >
> > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > >
> > > However, I found that it would be even better if one could change
the label displayed. Not always the name of the vector map is the best
option, especially if one is displaying for example only one category of
an attribute. For instance, I have presence/absence points and only want
to display presence points. I'd like to be able to tweak the label to be
"presence" instead of the name of the vector map.
> >
> > This is already possible using d.vect parameter legend_label.

Oh, I missed that one

> Yes, but this does not seem to like spaces. If I use a label such as
"Areas < 10e6" it only displays "Areas". Same with "Large Areas", I only
get "Large" in the display. It does not make any difference if I enclose
the text in quotes, or not.

Same here :frowning:

Don't know how difficult it might be, but maybe it would be easier (and
more visible, probably) from a user point of view, if that "legend_label"
parameter would be integrated in d.legend.vect, instead of having to set
the label in d.vect to then have it displayed with d.legend.vect

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:3&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

Replying to [comment:3 veroandreo]:
> Replying to [comment:2 mlennert]:
> > Replying to [comment:1 annakrat]:
> > > Replying to [ticket:3122 veroandreo]:
> > > > Hello,
> > > >
> > > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > > >
> > > > However, I found that it would be even better if one could change
the label displayed. Not always the name of the vector map is the best
option, especially if one is displaying for example only one category of
an attribute. For instance, I have presence/absence points and only want
to display presence points. I'd like to be able to tweak the label to be
"presence" instead of the name of the vector map.
> > >
> > > This is already possible using d.vect parameter legend_label.
>
> Oh, I missed that one
>
> > Yes, but this does not seem to like spaces. If I use a label such as
"Areas < 10e6" it only displays "Areas". Same with "Large Areas", I only
get "Large" in the display. It does not make any difference if I enclose
the text in quotes, or not.
>
> Same here :frowning:
>
> Don't know how difficult it might be, but maybe it would be easier (and
more visible, probably) from a user point of view, if that "legend_label"
parameter would be integrated in d.legend.vect, instead of having to set
the label in d.vect to then have it displayed with d.legend.vect

I prefer to have it in d.vect as that is where the layer is defined. In
d.legend.vect, this would be awkward as a d.legend.vect call could concern
anything from 1-X layers and so potentially you would need X text fields
to define labels and X is not defined beforehand. So, I would plead to
keep it as is, but just to improve the handling of special characters,
including spaces, in the text.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:4&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by veroandreo):

Replying to [comment:4 mlennert]:
> Replying to [comment:3 veroandreo]:
> > Replying to [comment:2 mlennert]:
> > > Replying to [comment:1 annakrat]:
> > > > Replying to [ticket:3122 veroandreo]:
> > > > > Hello,
> > > > >
> > > > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > > > >
> > > > > However, I found that it would be even better if one could
change the label displayed. Not always the name of the vector map is the
best option, especially if one is displaying for example only one category
of an attribute. For instance, I have presence/absence points and only
want to display presence points. I'd like to be able to tweak the label to
be "presence" instead of the name of the vector map.
> > > >
> > > > This is already possible using d.vect parameter legend_label.
> >
> > Oh, I missed that one
> >
> > > Yes, but this does not seem to like spaces. If I use a label such as
"Areas < 10e6" it only displays "Areas". Same with "Large Areas", I only
get "Large" in the display. It does not make any difference if I enclose
the text in quotes, or not.
> >
> > Same here :frowning:
> >
> > Don't know how difficult it might be, but maybe it would be easier
(and more visible, probably) from a user point of view, if that
"legend_label" parameter would be integrated in d.legend.vect, instead of
having to set the label in d.vect to then have it displayed with
d.legend.vect
>
> I prefer to have it in d.vect as that is where the layer is defined. In
d.legend.vect, this would be awkward as a d.legend.vect call could concern
anything from 1-X layers and so potentially you would need X text fields
to define labels and X is not defined beforehand. So, I would plead to
keep it as is, but just to improve the handling of special characters,
including spaces, in the text.

ok, I see... Shall we then open a different enhancement ticket for "better
handling of special characters and spaces in legend_label parameter of
d.vect" and keep this one for the possibility of choosing which vector
labels to show / not show in the vector legend??

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:5&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

Replying to [comment:5 veroandreo]:
> Replying to [comment:4 mlennert]:
> > Replying to [comment:3 veroandreo]:
> > > Replying to [comment:2 mlennert]:
> > > > Replying to [comment:1 annakrat]:
> > > > > Replying to [ticket:3122 veroandreo]:
> > > > > > Hello,
> > > > > >
> > > > > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > > > > >
> > > > > > However, I found that it would be even better if one could
change the label displayed. Not always the name of the vector map is the
best option, especially if one is displaying for example only one category
of an attribute. For instance, I have presence/absence points and only
want to display presence points. I'd like to be able to tweak the label to
be "presence" instead of the name of the vector map.
> > > > >
> > > > > This is already possible using d.vect parameter legend_label.
> > >
> > > Oh, I missed that one
> > >
> > > > Yes, but this does not seem to like spaces. If I use a label such
as "Areas < 10e6" it only displays "Areas". Same with "Large Areas", I
only get "Large" in the display. It does not make any difference if I
enclose the text in quotes, or not.
> > >
> > > Same here :frowning:
> > >
> > > Don't know how difficult it might be, but maybe it would be easier
(and more visible, probably) from a user point of view, if that
"legend_label" parameter would be integrated in d.legend.vect, instead of
having to set the label in d.vect to then have it displayed with
d.legend.vect
> >
> > I prefer to have it in d.vect as that is where the layer is defined.
In d.legend.vect, this would be awkward as a d.legend.vect call could
concern anything from 1-X layers and so potentially you would need X text
fields to define labels and X is not defined beforehand. So, I would plead
to keep it as is, but just to improve the handling of special characters,
including spaces, in the text.
>
> ok, I see... Shall we then open a different enhancement ticket for
"better handling of special characters and spaces in legend_label
parameter of d.vect" and keep this one for the possibility of choosing
which vector labels to show / not show in the vector legend??

Special characters (e.g. accents) are handled without problems. The only
issue seems to be spaces.

For labels, a white space in the d.vect legend_label parameter might be an
easy solution for not displaying labels.

When you say in your original ticket:

>Also, sometimes one has boundaries of countries or coastlines that should
go on the
>map but doesn't need to have a label in the legend.

are you really speaking about the labels, or about the fact that you would
like to not have boundaries or coastlines in the legend at all ? If the
former, maybe the white space option (or writing 'None' or something like
that as the label) would be the easiest. If the latter, I guess the best
solution would probably be adding an 'no legend label' flag to d.vect.

But you're right, I'll file a different ticket for the handling of spaces.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:6&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by veroandreo):

Replying to [comment:6 mlennert]:
> Replying to [comment:5 veroandreo]:
> > Replying to [comment:4 mlennert]:
> > > Replying to [comment:3 veroandreo]:
> > > > Replying to [comment:2 mlennert]:
> > > > > Replying to [comment:1 annakrat]:
> > > > > > Replying to [ticket:3122 veroandreo]:
> > > > > > > Hello,
> > > > > > >
> > > > > > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > > > > > >
> > > > > > > However, I found that it would be even better if one could
change the label displayed. Not always the name of the vector map is the
best option, especially if one is displaying for example only one category
of an attribute. For instance, I have presence/absence points and only
want to display presence points. I'd like to be able to tweak the label to
be "presence" instead of the name of the vector map.
> > > > > >
> > > > > > This is already possible using d.vect parameter legend_label.
> > > >
> > > > Oh, I missed that one
> > > >
> > > > > Yes, but this does not seem to like spaces. If I use a label
such as "Areas < 10e6" it only displays "Areas". Same with "Large Areas",
I only get "Large" in the display. It does not make any difference if I
enclose the text in quotes, or not.
> > > >
> > > > Same here :frowning:
> > > >
> > > > Don't know how difficult it might be, but maybe it would be easier
(and more visible, probably) from a user point of view, if that
"legend_label" parameter would be integrated in d.legend.vect, instead of
having to set the label in d.vect to then have it displayed with
d.legend.vect
> > >
> > > I prefer to have it in d.vect as that is where the layer is defined.
In d.legend.vect, this would be awkward as a d.legend.vect call could
concern anything from 1-X layers and so potentially you would need X text
fields to define labels and X is not defined beforehand. So, I would plead
to keep it as is, but just to improve the handling of special characters,
including spaces, in the text.
> >
> > ok, I see... Shall we then open a different enhancement ticket for
"better handling of special characters and spaces in legend_label
parameter of d.vect" and keep this one for the possibility of choosing
which vector labels to show / not show in the vector legend??
>
> Special characters (e.g. accents) are handled without problems. The only
issue seems to be spaces.
>
> For labels, a white space in the d.vect legend_label parameter might be
an easy solution for not displaying labels.
>
> When you say in your original ticket:
>
> >Also, sometimes one has boundaries of countries or coastlines that
should go on the
> >map but doesn't need to have a label in the legend.
>
> are you really speaking about the labels, or about the fact that you
would like to not have boundaries or coastlines in the legend at all ? If
the former, maybe the white space option (or writing 'None' or something
like that as the label) would be the easiest. If the latter, I guess the
best solution would probably be adding an 'no legend label' flag to
d.vect.

Sorry if I was not clear enough. What I mean is, I want boundaries or
coastlines displayed in the map, but I don't want any legend or label for
them. I was just imaging something like a tick box where you can select
from the maps displayed which one you want legend for. For example, you
have country boundaries, rivers and bridges and you want boundaries to be
displayed in the final map, but you don't want a legend item for them, you
only want legend items/labels for rivers and bridges. The problem is that
currently, every map displayed have a line in the legend, unless you
disable the map. But then, you don't get the boundaries displayed.

Hope it's clearer now :slight_smile:

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:7&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by lazaa):

Replying to [comment:7 veroandreo]:
> Replying to [comment:6 mlennert]:
> > Replying to [comment:5 veroandreo]:
> > > Replying to [comment:4 mlennert]:
> > > > Replying to [comment:3 veroandreo]:
> > > > > Replying to [comment:2 mlennert]:
> > > > > > Replying to [comment:1 annakrat]:
> > > > > > > Replying to [ticket:3122 veroandreo]:
> > > > > > > > Hello,
> > > > > > > >
> > > > > > > > I've been testing the new d.legend.vect and it is great :slight_smile:
> > > > > > > >
> > > > > > > > However, I found that it would be even better if one could
change the label displayed. Not always the name of the vector map is the
best option, especially if one is displaying for example only one category
of an attribute. For instance, I have presence/absence points and only
want to display presence points. I'd like to be able to tweak the label to
be "presence" instead of the name of the vector map.
> > > > > > >
> > > > > > > This is already possible using d.vect parameter
legend_label.
> > > > >
> > > > > Oh, I missed that one
> > > > >
> > > > > > Yes, but this does not seem to like spaces. If I use a label
such as "Areas < 10e6" it only displays "Areas". Same with "Large Areas",
I only get "Large" in the display. It does not make any difference if I
enclose the text in quotes, or not.
> > > > >
> > > > > Same here :frowning:
> > > > >
> > > > > Don't know how difficult it might be, but maybe it would be
easier (and more visible, probably) from a user point of view, if that
"legend_label" parameter would be integrated in d.legend.vect, instead of
having to set the label in d.vect to then have it displayed with
d.legend.vect
> > > >
> > > > I prefer to have it in d.vect as that is where the layer is
defined. In d.legend.vect, this would be awkward as a d.legend.vect call
could concern anything from 1-X layers and so potentially you would need X
text fields to define labels and X is not defined beforehand. So, I would
plead to keep it as is, but just to improve the handling of special
characters, including spaces, in the text.
> > >
> > > ok, I see... Shall we then open a different enhancement ticket for
"better handling of special characters and spaces in legend_label
parameter of d.vect" and keep this one for the possibility of choosing
which vector labels to show / not show in the vector legend??
> >
> > Special characters (e.g. accents) are handled without problems. The
only issue seems to be spaces.
> >
> > For labels, a white space in the d.vect legend_label parameter might
be an easy solution for not displaying labels.
> >
> > When you say in your original ticket:
> >
> > >Also, sometimes one has boundaries of countries or coastlines that
should go on the
> > >map but doesn't need to have a label in the legend.
> >
> > are you really speaking about the labels, or about the fact that you
would like to not have boundaries or coastlines in the legend at all ? If
the former, maybe the white space option (or writing 'None' or something
like that as the label) would be the easiest. If the latter, I guess the
best solution would probably be adding an 'no legend label' flag to
d.vect.
>
> Sorry if I was not clear enough. What I mean is, I want boundaries or
coastlines displayed in the map, but I don't want any legend or label for
them. I was just imaging something like a tick box where you can select
from the maps displayed which one you want legend for. For example, you
have country boundaries, rivers and bridges and you want boundaries to be
displayed in the final map, but you don't want a legend item for them, you
only want legend items/labels for rivers and bridges. The problem is that
currently, every map displayed have a line in the legend, unless you
disable the map. But then, you don't get the boundaries displayed.
>
> Hope it's clearer now :slight_smile:
>

It's possible using {{{input}}}/{{{output}}} parameter. After adding all
layers (boundary, rivers, bridges) you call d.legend.vect module with
parameter output
{{{d.legend.vect -b at=10,40 output=legend_out}}}.

You get file you can edit:
{{{
boundary|legend/area|5|139:105:20|227:227:186|3|area|8
rivers|legend/line|5|232:146:34|200:200:200|2|line|10837
bridges|basic/cross2|10|red|white|0|point|160
}}}

After deleting first line and saving file as e.g. ''legend_in'' you run
d.legend.vect once again with {{{input}}} parameter
{{{d.legend.vect -b at=10,40 input=legend_in}}} and you get legend with
only two layers altough three layers are displayed in map window.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:8&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by veroandreo):

Replying to [comment:8 lazaa]:
>
[all the rest deleted]
>
> It's possible using {{{input}}}/{{{output}}} parameter. After adding all
layers (boundary, rivers, bridges) you call d.legend.vect module with
parameter output
> {{{d.legend.vect -b at=10,40 output=legend_out}}}.
>
> You get file you can edit:
> {{{
> boundary|legend/area|5|139:105:20|227:227:186|3|area|8
> rivers|legend/line|5|232:146:34|200:200:200|2|line|10837
> bridges|basic/cross2|10|red|white|0|point|160
> }}}
>
> After deleting first line and saving file as e.g. ''legend_in'' you run
d.legend.vect once again with {{{input}}} parameter
> {{{d.legend.vect -b at=10,40 input=legend_in}}} and you get legend with
only two layers altough three layers are displayed in map window.

Yes, Anna said before that that was the way to do it currently and this is
probably useful for scripts, but maybe not very straightforward,
especially for new users or those only using GUI.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:9&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

Replying to [comment:9 veroandreo]:
> Replying to [comment:8 lazaa]:
> >
> [all the rest deleted]
> >
> > It's possible using {{{input}}}/{{{output}}} parameter. After adding
all layers (boundary, rivers, bridges) you call d.legend.vect module with
parameter output
> > {{{d.legend.vect -b at=10,40 output=legend_out}}}.
> >
> > You get file you can edit:
> > {{{
> > boundary|legend/area|5|139:105:20|227:227:186|3|area|8
> > rivers|legend/line|5|232:146:34|200:200:200|2|line|10837
> > bridges|basic/cross2|10|red|white|0|point|160
> > }}}
> >
> > After deleting first line and saving file as e.g. ''legend_in'' you
run d.legend.vect once again with {{{input}}} parameter
> > {{{d.legend.vect -b at=10,40 input=legend_in}}} and you get legend
with only two layers altough three layers are displayed in map window.
>
> Yes, Anna said before that that was the way to do it currently and this
is probably useful for scripts, but maybe not very straightforward,
especially for new users or those only using GUI.

Yes, that's why I would suggest an additional flag to d.vect which if set
would mean that this vector layer should not be part of the legend. This
would then graphically translate into a checkbox in the 'legend' tab of
the d.vect GUI.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3122#comment:10&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by mlennert):

I'm adding a patch proposal.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122#comment:11&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by mlennert):

* Attachment "d.vect.legendflag.diff" added.

patch to add flag to not add layer to legend

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3122&gt;
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: new
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------

Comment (by annakrat):

In [changeset:"69115" 69115]:
{{{
#!CommitTicketReference repository="" revision="69115"
d.vect: add flag to not put the layer in legend, see #3122
}}}

--
Ticket URL: </ticket/3122#comment:12>
GRASS GIS <https://grass.osgeo.org>

#3122: d.legend.vect: possibility to change text of displayed labels and select
labels to show/not show
-------------------------+-------------------------------------------------
  Reporter: veroandreo | Owner: grass-dev@…
      Type: | Status: closed
  enhancement |
  Priority: normal | Milestone: 7.3.0
Component: Display | Version: unspecified
Resolution: fixed | Keywords: d.legend.vect, gsoc2016,
       CPU: | cartography
  Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by annakrat):

* status: new => closed
* resolution: => fixed

Comment:

Thanks, I was considering this solution too.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/3122#comment:13&gt;
GRASS GIS <https://grass.osgeo.org>