Categorical Symbols for Vector Features

This tutorial walks through the steps of assigning symbols based on qualitative attributes or categories in a vector dataset’s attribute table.

Included in this tutorial:

  • Accessing Categorized symbology options, with points example

  • Employing categorized symbols based on one or more fields

  • Formatting categorized symbols

  • Additional examples with polylines and polygons

Software version in examples: QGIS-LTR 3.40.5-Bratislava

Tutorial Data: The tutorial includes demonstration with sample data available here.

Credits: Sally Kaye and L. Meisterlin (2025)

Related tutorials: 

 

Accessing the Categorized symbology options (example: points)

Using the sample tutorial data, we will symbolize the point features in the Point1_Table1_join layer based on the values in the field called “categ” (which is short for “category”). This is a text (string) field with five different unique values.

the attribute field we will symbolize in this example

As demonstrated in the Single Symbols for Vectors tutorial, QGIS uses a single symbol to symbolize features in vector layers by default. You can change this setting within a data layer’s symbology properties. First, access the layer’s properties by right-clicking on the dataset’s name in the Browser panel, then navigate to the Options under the Properties’ Symbology tab. (See Accessing Symbology Options.)

To change the primary symbology approach, click the dropdown menu of symbology methods at the top of the options window. (If a different method has not been chosen, the dropdown features the default “Single Symbol.”)

There, select Categorized. This refers to unique, qualitative values within the field(s) of the layer’s attribute table; each value will receive a different symbol.

Once you’ve chosen “Categorized” as the symbology method, the options within the window will update.

First, specify the field (from the layer’s attribute table) with the values you want to symbolize via the Value dropdown menu. This dropdown includes a list of all fields within the layer’s attribute table (recall that numeric fields can also represent categories or qualitative variables). In our example, we choose the “categ” field.

Click Classify to generate symbols for layer features. Each of the unique values within the specified attribute field are listed, with default colors applied to each value. 

accessing the Categorized symbology options


Formatting Symbols

There are two ways to change the symbols’ format.

  • You can choose a preset color scheme from the Color ramp dropdown. Size, opacity, and rotation for all symbols can then be changed simultaneously; click the example swatch next to “Symbol” to open the Symbol Settings menu.

  • You can access the Symbol Selector menu per symbol by double-clicking on each swatch in the symbol list. This will summon the same options available for single-symbol formatting, covered in Single Symbols for Vectors.

The demonstration below shows accessing both of these formatting options.

When you’re happy with the Categorized Symbol formatting, click Apply to apply symbology and OK to close the Symbology window. 

accessing and changing symbol format options

Additional options

  • Checkboxes next to each value in the Symbology window and under the layer name in the Layers Panel allow you to change which features are visible based on their value.

  • Use the Add and Delete buttons to include or remove particular values from the layer’s symbology. This is useful when you want to display only certain features (based on their attribute values). Clicking Delete All will remove all symbols from the symbol list (to allow you to “start over” and add only specific values), and Classify will restore symbols.

  • The Legend column of the symbol list is editable: You can change the way values are labeled within your legend, for example. (In the demonstration below, we capitalize the labels per value). Notice that the layer names in the Layers Panel update with each change. This would also update values in a legend within a Layout.

  • You can also change the listing order of the symbols by dragging and dropping rows within the symbol list. (In the demonstration below, we reorder the categories by moving the Gamma values from the bottom of the list to third).

additional options: changing value visibility, editing legend, reordering symbols


Review & More (example: polylines and polygons)

In the demonstration below, we apply a categorized symbology to the subway lines (in the “subways” layer based on the colors commonly used to represent the routes) and to the Tracts_wTable polygon layer based on the “Type_AB” field.

For the subway lines:

  • Choose individual color symbols per value in the rt_symbol field. (This attribute field is made for this purpose.)

  • Change the thickness of each line feature by selecting all symbols and opening the Symbol Settings menu.

For the tract polygons:

  • Assign symbol colors based on a preset color scheme.

  • Change the line/stroke color for all polygons by selecting all symbols and opening the Symbol Settings menu.

review with lines and polygons

 
Previous
Previous

Querying based on Spatial Relationships

Next
Next

Creating a New Layer from Selected Features