Skip to content
Advertisement

Overlay/Fill country boundaries with image in

Is there a way to fill a country with an image similar to R solution using custom library here:

I have a solution where the face colour is filled for instance the below where Italy is blue. However, I would like to add the Italian flag. Is there a way in Python (I have not found much after searching) or is something like QGIS needed:

JavaScript

Any help, much appreciated!

Advertisement

Answer

Here is a demo code that does what you need. As a matter of fact, cartopy logo uses this technique to create.

JavaScript

The sample plot (varies with the flag in use):

italy_wflag

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement