Book Image

QGIS Python Programming Cookbook

Book Image

QGIS Python Programming Cookbook

Overview of this book

Table of Contents (16 chapters)
QGIS Python Programming Cookbook
About the Author
About the Reviewers

Adding a logo to the map

An important part of customizing a map is to add your logo or other graphics to the composition. In this recipe, we'll add a simple logo to the map.

Getting ready

You will need to download the following zipped shapefile and extract it to your qgis_data directory, to a subdirectory named ms:

You will also need a logo image, which you can download from

Place the image in your qgis_data/rasters directory.

If you haven't already done so in the previous recipe, download the MapComposer library from, to simplify the creation of the map composition.

Place the file in the .qgis2/python directory within your home directory.

How to do it...

In this recipe, we will create the map composition, add the logo image, and save the map as an image. To do this, we need to perform the following steps:

  1. First, we need...