Opened 8 years ago

Last modified 5 years ago

#3125 new enhancement

d.legend.vect: take into account size_column/width_column in legend

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Default Version: unspecified
Keywords: d.legend.vect, gsoc2016, symbol size Cc:
CPU: Unspecified Platform: Unspecified

Description

I don't know if this is foreseen, but it would be marvelous if d.legend.vect could take into account the size_column*size (+ the -r flag) and the width_column*width_scale info when drawing the symbols in the legend.

I know this is much more complicated, and maybe this would warrant a separate module, but being able to show the sizes of symbols in the legend is a basic necessity when using these features.

A possible solution could be to find the min, mean and max values and to create three symbols at their respective size that represent these values (including writing the value into the legend so that one can understand what each sized-symbol represents).

I imagine this would be way too much for the current GSoC, but I'm creating this ticket so we do not forget.

Attachments (1)

d.legend.vect_symbol_size.diff (3.8 KB ) - added by mlennert 8 years ago.
Patch to add flag to use symbol_size also for point symbols

Download all attachments as: .zip

Change History (14)

comment:1 by mlennert, 8 years ago

One related issue that should be dealt with ASAP: when doing proportionate symbols with size_column, the size parameter for symbols represents a scaling factor, not a size. However, d.legend.vect uses it as a size indicator meaning that when you set your scaling factor to a small value (values can easily close to zero, such as 0.001) the symbol in the legend also becomes very small.

Probably the best solution would be to allow the use d.legend.vect's symbol_size also for symbols, maybe through a flag to d.legend.vect ("Use symbol_size also for point symbols").

by mlennert, 8 years ago

Patch to add flag to use symbol_size also for point symbols

in reply to:  1 comment:2 by mlennert, 8 years ago

Replying to mlennert:

One related issue that should be dealt with ASAP: when doing proportionate symbols with size_column, the size parameter for symbols represents a scaling factor, not a size. However, d.legend.vect uses it as a size indicator meaning that when you set your scaling factor to a small value (values can easily close to zero, such as 0.001) the symbol in the legend also becomes very small.

Probably the best solution would be to allow the use d.legend.vect's symbol_size also for symbols, maybe through a flag to d.legend.vect ("Use symbol_size also for point symbols").

I've added a patch to show what I mean, but I'm acting a bit blindly, here, for lack of thorough understanding of d.legend.vect, so this definitely needs to be checked.

comment:3 by annakrat, 8 years ago

This was definitely planned, maybe not for this GSoC, but this is partially the reason the legend information is exported from d.vect - to allow for more complex legends. The temporary solution now could be to write -1 instead of size and then d.legend.vect interprets it to use symbol_size for vector point, we avoid another flag.

in reply to:  3 comment:4 by mlennert, 8 years ago

Replying to annakrat:

This was definitely planned, maybe not for this GSoC, but this is partially the reason the legend information is exported from d.vect - to allow for more complex legends. The temporary solution now could be to write -1 instead of size and then d.legend.vect interprets it to use symbol_size for vector point, we avoid another flag.

I'm not sure I understand: where do you suggest to write -1 ? Into the legend file ? But then only if size_column is set ?

comment:5 by annakrat, 8 years ago

In 69133:

d.vect: if size_column is used, write -1 to legend; symbol_size will be then used for point legend, see #3125

in reply to:  5 comment:6 by mlennert, 8 years ago

Replying to annakrat:

In 69133:

d.vect: if size_column is used, write -1 to legend; symbol_size will be then used for point legend, see #3125

Thanks, Anna. This solves the "side issue" of this bug. The enhancement wish is still valid, obviously.

comment:7 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:8 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:9 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:10 by neteler, 6 years ago

Milestone: 7.4.17.4.2

comment:11 by martinl, 6 years ago

Milestone: 7.4.27.6.0

All enhancement tickets should be assigned to 7.6 milestone.

comment:12 by martinl, 5 years ago

Milestone: 7.6.07.6.1

Ticket retargeted after milestone closed

comment:13 by martinl, 5 years ago

Milestone: 7.6.17.6.2

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.