I have a question on custom legends with tmap: the code below places
small charts which have been previously stored as png files (file names
in named character vector fns) on a map. The colors in these charts
(stored in the vector farben) need a legend. Adding the legend with
"tm_add_legend" works in the plot mode, but not in the view mode. The
only way I found to get a legend in the view mode is to create a png
with the legend included and place it on the legend with tm_markers
(this is ignored in plot mode).
Is this indeed the only/best way, or (how) could I do this with less effort?