Open goneau opened 3 weeks ago
Thx @goneau the error is fixed, but probably the position of the legend will be different. Instead of
legend.position = c(0.67,0.04)
, if you like the legend to be at the bottom right of the map, and still would like to have control over the margins, I would recommend
legend.position = tm_pos_in(0.95, 0.05, just.h = "right", just.v = "bottom")
Thank you, I tested and I have an image rendered now, but with different locations for the legend as you mentioned. As I said, it is not my code, but the one from the textbook. Your modification to the location does render as intended by the original author.
Also, I noticed that legend.format=c(text.align="right")
don’t have any effect.
What textbook is it @goneau ? Might be worthwhile for us to contact the author for future releases of the book.
It should be legend.format = list(text.align = "right")
also in v3, even though the syntax you mentioned might be working as well in v3.
Textbook code from a TÉLUQ class I am following:
Warning with development version (no image output):
With version 3.3-4: