I have a bunch of diagrams for a set of route segments, stored as PNG, PDF or SVG with a regular name (topic-segment-id.(png|pdf|svg) for example), representing a certain aspect (like crossing rate or and angle for ships at a segment (..see graphics, polar density plots).

enter image description here

I'm able to generate the images of the diagrams (including a subsequent image processing chain) with a name carrying the segment-ID. I can also create a point layer for the placement of the diagrams, with attributes for the filename and/or the segment-ID, at the map (..see map points 1 to 17 corresponding to the diagrams above) along the route.

enter image description here

How can I load and place the segment related images (the generated diagrams for example) at the addressed points/segments for the corresponding map under QGIS wit the print composer/ map layout tool. I want to have something like that:

enter image description here

PS: I use the statistic language R to create diagrams and the point layer (package sf) and QGIS to generate the maps.

1 Answer 1


You can represent raster images or svg's in points. The main thing is to add an attribute with the complete path.

Here is the result (they are squared because I was hurry, but you can do it rounded for sure): enter image description here

Here is what I did:

  1. Put all the images in a folder. In this case, I extracted the images from yours using gimp and saving the circles in jpg.
  2. Add the path to the table of attributes.
  3. Go to simbology and within the point set it to show raster/svg and then, instead of selecting just an image, go to the right button and set it as parameter (in my example the attribute represented is 'IMAGE'). If it is correctly stablished, the button will be yellow now.
  4. If you want to keep points and images separated, you must duplicate the layer and show one of them as points. Then just represent the images with the desired displacement (depending on your representation).

Here you have a video of the process.

Here some screenshots: enter image description here enter image description here enter image description here enter image description here

  • Brillant, especially the video. I assume with an URL instead of a file, I can design a dynamic implementation via by a non QGIS/Python generated chart engine like R.
    – huckfinn
    Mar 9, 2021 at 10:12
  • Absolutely. QGIS + R is a win win. You can do more than everything. Mar 9, 2021 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.