
How to Style Lines in QGIS: Color to Arrows
What you'll learn
- How to change the appearance of line data
- Ways to represent line data that you can choose in QGIS
Recommended for
- Anyone who wants to change the appearance of line data
- Anyone who wants to learn the different ways to represent line data
- Anyone who wants to make easy-to-read maps
Introduction
When you load data into QGIS, it displays the data in a color the system picks automatically. Depending on the basemap and the other layers, that automatic color can make the data hard to see.
This article explains the basic ways to change the style (appearance) of lines in QGIS. It goes step by step, from choosing one of the default styles, to adjusting color and width, to advanced settings such as arrows and filled lines.
This article focuses on line data. For styling point and polygon data, see the related articles below.
Change the style of lines
When you add data to QGIS, it assigns one random color to all the features in the layer.
But when you combine a layer with a basemap or other layers, a randomly chosen color is often not the best choice for visibility.
In the image below, for example, the lines are hard to see against the basemap.

This article introduces three approaches: choosing one of the styles QGIS provides by default, adjusting a style yourself, and choosing a more advanced style.
Use a default style
First, choose one of the styles QGIS provides by default.
To change how lines look, open the layer properties.

In the layer properties, open the Symbology tab.
As an example, select dash black and click OK at the bottom right of the window.

QGIS applies the dash black style (a black dashed line) to the lines.

Customize a style
In the Symbology tab of the layer properties, you can also set the line color, opacity, width, and more. These settings are simple, so they are handy when you want to make lines easier to see quickly.

For finer changes, click Simple Line in the symbol layer tree at the top of the window to open the detailed settings.

Here you can set color, opacity, and width (Stroke width), as well as the following items.
- Offset: Sets how far the line sits from its original position.
- Stroke style: Sets the line type, such as solid or dashed. To fine-tune the ratio of gaps to line segments in a dashed line, click the Use custom dash pattern checkbox and adjust the pattern.
- Join style: Sets the shape of the line's corners, such as square or round.
- Cap style: Sets the shape of the line's ends, such as square or round.

Advanced style customization
The customizations so far changed the basic look of a line: its color, width, and whether it is solid or dashed. This section introduces advanced style settings that change the shape of the line itself into arrows, filled lines, and more.
To change the line shape, open the Symbology tab of the layer properties and choose a line type from Symbol layer type.

Here are examples of the main line shapes you can choose from Symbol layer type.
Here Arrow is selected, and the lines contain arrows. With Arrow, you can also set the position, type, and size of the arrows. It is useful for visualizing data that has a direction, for example.

Here Filled Line is selected. The outline of the line and its inner fill use different colors. Use it when you want to color the edge of a line and its fill differently.

Here Hashed Line is selected, and short lines cross the line at right angles. Use it to draw something like the map symbol for “non-JR lines (single track).”

This example uses Raster Line with a logo image (minimal black) from the official QGIS website. The QGIS logo is tiled along the line in place of a solid line. This style repeats an image along the line.

This example uses Marker Line with a red circle marker. Red circles are placed at regular intervals in place of a line. This style represents a line by placing points at equal intervals.

This article does not cover them in detail, but symbol layer types such as Geometry Generator, Linear Referencing, and Interpolated Line enable more advanced styling that uses attribute data. For details, see the official documentation.
Conclusion
This article introduced three ways to change how lines look in QGIS. By combining these features, you can create line styles that suit your purpose.
This article did not cover it, but you can also classify features by attribute value and style each class differently. For example, the emergency transportation road data used here includes road classification information, so you can change the color or shape of the lines for each class.
Try the line style settings with your own data, to suit the purpose of the map you want to make.


QGIS LAB is a comprehensive information hub for QGIS, the open-source GIS software. Under the concept of “Geospatial for Greater Good,” we share the knowledge and skills to open up the world through location data.


