Learn cartography and styling in QGIS through basketball visualization (Part 2): The Print Composer/Layout

01 Mar 2018 ᛫ 5 min read

SHARE:

In the previous post, we created shot charts using Rule-based symbology in QGIS. In this post, we’ll take a look at how we can turn those shot charts into printable maps like this:

UAAP University of the Philippines Fighting Maroons Shot Chart

At the heart of map-making in QGIS is the Print Composer. It’s a poweful tool that creates different map layouts and allows the user to fine-tweak each part of the map that being created – the map, titles, images, scales, legends, etc. In QGIS 3, Print composers were renamed to Print layouts.

Creating a New Print layout

To access the Print Composer, we first create a new Print layout/composer (if we haven’t already) via Project -> New Print layout (QGIS 3), Project -> New Print Composer (QGIS 2), or CTRL + P. Previously created layouts/composers can be accessed via Project -> Layouts (QGIS 3) or Project -> Print composers (QGIS 2).

Let’s create a new layout/composer and name it basketball.

Create a new print layout in QGIS

Creating or opening a print layout opens that Print Composer/Layout window.

The Print Composer window

The print layout window in QGIS

The Print Composer/Layout window is composed of a menu bar, toolbars, a canvas, and a side pane.

Menu bar

Print layout menu bar QGIS

The menu bar provides access to commands and functions of the Print composer such as adding and editing maps, texts, and images.

Toolbars

Print layout toolbars QGIS

Like the menu bar, the toolbars provide quick access to commands and functions of the Print composer.

Canvas

Print layout canvas QGIS

The canvas is where we see the actual layout of the map we are going to create. This is where we add images, texts, legends, etc.

Side pane

Print layout side pane QGIS

For me, the side pane is one of the most important areas in the Print composer window. The Layout, Item Properties, and Guides tabs allow the user to fine-tune elements of the map from the color of the font to the scale used, etc.

Creating a map with the Print Composer

Now let’s create an actual map that we can print using the Map composer.

Set the page setup of the Layout

The first thing we need to do is to setup the size of our map canvas via Layout -> Page Setup or CTRL + SHIFT + P. For this map, we’ll be printing it in A4 sized paper.

Editing the page setup of print layout in QGIS

With this, when we print our map or save it as an image, we know that its size will be A4.

Add a map to the Canvas

Now let’s add our map to the canvas via Add Item -> Add Map or by clicking the Add Map button on the left toolbar.

Add map to canvas QGIS print layout menu bar
Add map to canvas QGIS print layout toolbar
Add map to canvas QGIS print layout

After adding the map, we can place it anywhere on the canvas and change its size or zoom level by changing its scale property. Other aspects of the map can also be edited in the Item Properties tab.

Move or edit map in QGIS print layout

Add map title

Every map needs a title. Let’s add one to ours using Add Item -> Add Label or by clicking the Add Label button on the left toolbar. We can add a label for the title and another for the subtitle.

Add map title in QGIS print layout menu bar
Add map title in QGIS print layout toolbar
Add map title in QGIS print layout

The text, font style, color, and other properties can be changed in the Item Properties Tab.

Edit map title in QGIS print layout side pane

Add map legend

The next step is to add a legend so people can understand our map better. A Legend can be added using Add Item -> Add Legend or the Add Legend button on the left toolbar.

Add map legend in QGIS print layout menu bar
Add map legend in QGIS print layout toolbar
Add map legend in QGIS print layout

Like with other map elements, legends properties can be edited in the Item Properties tab. Let’s rename the FGA item in the legend and remove the CourtMap item.

Add and edit map legend in QGIS print layout side pane

Add texts

Let’s add another label that provides a little more information and explanation about our map.

Add text to map canvas in QGIS print layout

Add images (north arrow, logos, etc)

Images can also be added to our map via the Add Item -> Add Picture or the Add Picture button in the left toolbar.

Add picture to map canvas QGIS print layout menu bar
Add picture to map canvas QGIS print layout toolbar
Add picture to map canvas QGIS print layout

Once we are satisfied with the layout of our map, we can export it to an image, pdf, or svg file. The commands for this can be found under the Layout menu or on the toolbar. We can also Print the map directly.

Print and export map QGIS print layout menu bar
Print and export map QGIS print layout toolbar

Let's save our map as a .PNG file that we can print.

Print and export map QGIS print layout

Congratulations! You should now have a ready-to-print PNG file like the one below:

Sample basketball visualization made with QGIS print layout

Final thoughts

Those are just the basics of map-making in QGIS using the Map Composer. With a bit of practice, creativity, and familiarity, greater and more beautiful maps can be created in QGIS. For some inspiration, you can check out Map Examples from the QGIS site.

Stay tuned for the next part of this series where we’ll look at creating a Hot Zones map and adding Labels to Symbology. Cheers!

SHARE:
comments powered by Disqus

You may also like:

Towards a spatial analysis of shooting in Philippine basketball (FOSS4G2021)

01 Oct 2021 ᛫ 1 min read

The opposite of free/libre and open source isn't commercial, it's proprietary

27 May 2021 ᛫ 2 min read

Towards a Spatial Analysis of Philippine Basketball: Applications in the UAAP MBT (Season 81) [Part 1]

02 May 2021 ᛫ 4 min read

Win and let win: On being unconventional, openness, and building communities

30 Apr 2021 ᛫ 1 min read

QGIS Styles based on HLURB Land Use Categories and Color Coding (CLUP Guidebook Vol 3, 2014)

15 Dec 2020 ᛫ 2 min read

Support BNHR

If you find my website or any of the materials I share useful, you can consider donating to the cause below.

Donate and support BNHR

BNHR

[email protected]

Creative Commons License
Except when explicitly stated otherwise, this work and its contents by Ben Hur S. Pintor is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Other works (software, source code, etc.) referenced in this website are under their own respective licenses.
This site is powered by Jekyll and hosted on Github (view source)