The Symbol Library

The Style Manager

The Symbol Library is the place where users can manage and create generic symbols to be used in several QGIS projects. You can open it with the Settings ‣ Style Manager or from the Style tab in the vector layer’s Properties. It allows users to:

  • create, edit and remove symbols
  • organize symbols in custom groups
  • export and import symbols.

Figure Symbol 1:


The Style Manager

Groups and smart groups

You can organize symbols into different categories. These categories, listed in the panel at the left, can be static (called Group) or dynamic (named Smart Group). A group is smart when its symbols are dynamically fetched according to conditions set. See figure_symbol_2:

To create a group, right click on an existing group or on the main Groups directory in the left of the dialog. You can also select a group and click the signPlus Add Group button. The new group will be a sub-group of the selected one.

Create Smart Group is similar to creating group, but instead select Smart Groups. The dialog box allows user to choose the expression to select symbols in order to appear in the smart group (contains some tags, member of a group, have a string in its name, etc.). Any symbol that satisfies the entered condition(s) is automatically added to the smart group.

Figure Symbol 2:


Creating a Smart Group

To remove a group or a smart group, right click on the group and select Remove Group or select it and push signMinus Remove Group button.

Unlike the smart groups that automatically fetch their belonged symbols, simple groups are filled by the user. To add a symbol into a group, you can either right click on a symbol, choose Apply Group and then the group name. There is a second way to add several symbols into a group: just select the group, click changeLabelProperties and choose Group Symbols. All symbols display a checkbox that allows you to add the symbol into the selected groups. When selection is finished, you can click the same button, and choose Finish Grouping.

All the symbols that are not placed under a custom group belong to a default group named Ungrouped.

Add, Edit, Remove Symbol

Selecting a group returns in the right panel, if applicable, the list of symbols of the group (including its subgroups). These symbols are organized in four different tabs:

  • Marker for point symbols
  • Line for linear symbols
  • Fill for surface symbols
  • and Color Ramp

To delete a symbol you no longer need, just select it and click signMinus Remove item (also available through right-click). The symbol will be deleted from the local symbols database.

The symbol list can be modified by adding new symbols with signPlus Add item button or modifying existing ones with symbologyEdit Edit item. See The Symbol Selector for further information.

Share symbols

The sharing Share item tool, at the right bottom of the Style Library dialog, offers options to easily share symbols with others: users can indeed export their symbols and import symbols to their library.

Exporting symbols

You can export the selected symbols to PNG, SVG or XML file formats. Exporting to PNG or SVG (both not available for color ramp symbols) creates a file for each selected symbol, and the SVG folder can be added to SVG Paths in Settings ‣ Options to e.g. share these symbols on a network. The XML format generates a single file containing all the selected symbols. This file can then be imported in another user’s style library.

Importing symbols

You can extend your symbols library by importing new symbols. Just select sharing Import from the drop-down list at the right bottom of the dialog. In the new dialog, you’ll need to :

  • indicate the source of the symbols (it can be a .xml file on the disk or an url),
  • give the name of the group under which the symbols will be put
  • select the symbols you want to add to your library
  • and press Import.

Note that import and export options are also available through right-click.

Figure Symbol 3:


Importing symbols

Color Ramp

The Color ramp tab in the Style Manager presents different types of color ramps you can use to style layers.

To create a custom color ramp, activate the Color ramp tab and click the signPlus Add item button. The button reveals a drop-down list to choose the ramp type: Gradient, Random, colorBrewer, or cpt-city.

The first three have options for number of steps and/or multiple stops in the color ramp. You can use the checkbox Invert option while classifying the data with a color ramp. See figure_symbol_4 for an example of custom color ramp and figure_symbol_4a for the cpt-city dialog.

Figure Symbol 4:


Example of custom gradient color ramp with multiple stops

The cpt-city option opens a new dialog with hundreds of themes included ‘out of the box’.

Figure Symbol 4a:


cpt-city dialog with hundreds of color ramps

The symbol Selector

The Symbol selector is the main dialog to design a symbol. You can create or edit Marker, Line or Fill Symbols.

Figure Symbol 5:


Designing a Marker symbol

For each kind of symbols, you will find always the same dialog structure:

  • at the top left side a dynamic symbol representation, updated as soon as symbol properties evolve

  • under the symbol representation, the symbol tree shows symbol layers that are combined afterwards to shape a new global symbol. A symbol can consist of several Symbol layers. Settings will be shown later in this chapter.

  • at the right you can setup some parameters that apply to the global symbol:

    • unit: it can be millimeter, pixel or map unit
    • transparency
    • color: when this parameter is changed by the user, its value is echoed to all unlocked sub-symbols color
    • size and rotation for marker symbol
    • width for line symbol

    Note that the Data-defined override button beside the last layer-related parameters is inactive until the symbol is applied to a layer. Once the symbol is connected to a layer, this button offers access to the size assistant dialog which helps to create proportional or multivariate analysis rendering.

  • under these parameters are displayed items of the symbols library you can choose from. This list of symbols can be filtered by selecting a group in the drop-down list just above.

According to the level selected in the symbol tree, you’ll get enabled different tools at the bottom of the dialog to :

  • signPlus add new symbol layer: you can imbricate as many symbols as you want
  • signMinus remove the selected symbol layer
  • lock colors of symbol layer: a locked locked color stays unchanged when user changes the color at the global (or upper) symbol level
  • duplicateLayer duplicate a (group of) symbol layer(s)
  • move up or down the symbol layer
  • apply special effects to the symbol layer
  • save the designed symbol into your symbol library
  • or choose in the Advanced selectString drop-down list, to clip features to canvas extent.


Note that once you have set the size in the lower levels of the Symbol layers dialog, the size of the whole symbol can be changed with the Size (for marker symbol) or the Width (for line symbol) menu in the first level again. The size of the lower levels changes accordingly, while the size ratio is maintained.

More detailed settings can be made when clicking on the lower level in the Symbol tree. You can change each Symbol layers properties and according to the symbol type, you get different settings.

Marker Symbols

Marker symbols have several symbol layer types:

  • Ellipse marker
  • Font marker
  • Simple marker (default)
  • SVG marker
  • Vector Field marker

For each marker symbol, you can set the following properties:

  • Symbol layer type: You have the option to use Ellipse markers, Font markers, Simple markers, SVG markers and Vector Field markers.
  • colors
  • Size
  • Outline style
  • Outline width
  • Angle
  • Offset X,Y: You can shift the symbol in the x- or y-direction.
  • Anchor point
  • Data defined properties ...

Line Symbols

Line marker symbols have only two symbol layer types:

  • Marker line
  • Simple line (default)

The default symbol layer type draws a simple line whereas the other display a marker point regularly on the line. You can choose different location: vertex, last and first vertex, interval, central point or on every curve point. Marker line can have offset along the line or offset line. Finally, rotation allows you to change the orientation of the symbol.

The following settings are available:

  • colour
  • Pen width
  • Offset
  • Pen style
  • Join style
  • Cap style
  • checkbox Use custom dash pattern
  • Dash pattern unit
  • Data defined properties ...

Polygon Symbols

Polygon marker symbols have also several symbol layer types:

  • Centroid fill
  • Gradient fill
  • Line pattern fill
  • Point pattern fill
  • Raster image fill
  • SVG fill
  • Shapeburst fill
  • Simple fill (default)
  • Outline: Marker line (same as line marker)
  • Outline: simple line (same as line marker)

The following settings are available:

  • Colors for the border and the fill.
  • Fill style
  • Border style
  • Border width
  • Offset X,Y
  • Data defined properties ...

Using the color combo box, you can drag and drop color for one color button to another button, copy-paste color, pick color from somewhere, choose a color from the palette or from recent or standard color. The combo box allows you to fill in the feature with transparency. You can also just click the button to open the palette dialog. Note that you can import color from some external software like GIMP.

With the ‘Raster image fill’ you can fill polygons with a tiled raster image. Options include (data defined) file name, opacity, image size (in pixels, mm or map units), coordinate mode (feature or view) and rotation.

‘Gradient Fill’ Symbol layer type allows you to select between a radioButtonOn Two color and radioButtonOff Color ramp setting. You can use the checkbox Feature centroid as Referencepoint. All fills ‘Gradient Fill` Symbol layer type is also available through the Symbol menu of the Categorized and Graduated Renderer and through the Rule properties menu of the Rule-based renderer.

Other possibility is to choose a ‘shapeburst fill’ which is a buffered gradient fill, where a gradient is drawn from the boundary of a polygon towards the polygon’s centre. Configurable parameters include distance from the boundary to shade, use of color ramps or simple two color gradients, optional blurring of the fill and offsets.

It is possible to only draw polygon borders inside the polygon. Using ‘Outline: Simple line’ select checkbox Draw line only inside polygon.

Note: When geometry type is polygon, you can choose to disable the automatic clipping of lines/polygons to the canvas extent. In some cases this clipping results in unfavourable symbology (eg centroid fills where the centroid must always be the actual feature’s centroid).