Legends Editor

.

.

One of QGIS’s most important features is its ability to edit layer styles and generate a wide variety of maps. However, the sheer number of options available can be overwhelming.

To simplify matters, QGISRed has introduced a new option in the Project menu for editing legends, offering a more limited yet practical set of options, backed by powerful algorithms. In any case, styles edited using the QGISRed Legend Editor are compatible with those edited in QGIS, and vice versa.

The QGISRed Legend Editor opens a dialogue box where you can essentially modify the classification ranges of the variables and the number of classes, the colour assigned to each class, and the size of the symbol used for each one.

Firstly, you must select the layer whose legend you wish to edit. To facilitate this choice, layers are displayed grouped according to existing layer groups and subgroups. The editor covers all layers managed by QGISRed, housed in the Inputs, Queries, Issues and Results groups, although not all of them offer the same options.

Once the layer has been selected, its units are specified and the system determines whether the classification variable is numerical or text-based. In the first case, classification is by value ranges and in the second case by enumerated values, although in some instances this second option can be used for numerical values, as is the case with diameters. A distinction is also made between layers containing linear elements and those containing point elements, displaying in this case the symbol used to represent them.

In all cases, the number of classes to be considered is variable and can be increased or decreased. The colour, size, range of values and legend for each class can be modified manually by clicking on the corresponding box, although with certain restrictions, such as that all numerical ranges must be consecutive. Furthermore, the legend is updated automatically by default and can be edited afterwards.

For numerical variables, there is a wizard to classify the ranges automatically. Taking into account the number of classes set, ranges can be calculated by equal intervals, equal percentiles, natural breaks, common breaks or based on the standard deviation. It is also possible to set the range interval, in which case the number of classes is automatically recalculated.

If the variable is enumerated, the number of classes is set to the default value, though it is always possible to reset the number of classes to match the number of unique values. A class has been provided for non-enumerated cases. The order in which the classes are displayed can also be modified.

Regarding the size of the symbols, it can be the same for all classes, or it can increase from a minimum to a maximum gradually, quadratically or exponentially to highlight certain classes more prominently. For numerical variables, there is also the option to make the symbol size proportional to the value of the variable being represented.

As for colours, the wizard allows you to assign the same colour to all classes (in which case they would differ only in size), generate the colour for each class randomly, interpolate it between the colours of a gradient with several transition points, or choose it from the colours of a predefined palette. In this case, if there are more classes than colours in the palette, the colour for the remaining classes is interpolated. Gradient maps and palettes can be selected from a QGISRed repository.

For layers in the Inputs group, only one class is available; you can only modify the colour and size. The styles for these layers are highly customised and therefore do not allow for many changes.

Once the legend has been edited, it can be displayed on the map or saved for use either in the current project only or in all new projects from now on. Once the legend has been saved, it can be retrieved to reapply it or to re-edit it. You can also retrieve the default legend created for each layer, but this cannot be modified.

You may also be interested...