tmap
tmap copied to clipboard
Wrong v3 code translation
tmap_mode("view")
m <- tm_shape(NLD_muni) +
tm_fill(col="population", convert2density=TRUE,
style="kmeans",
title=expression("Population (per " * km^2 * ")")) +
tm_borders("black", alpha=.5) +
tm_shape(NLD_prov) +
tm_borders("grey25", lwd=2) +
tm_style("classic") +
tm_format("NLD", inner.margins = c(.02, .15, .06, .15)) +
tm_scale_bar(position = c("left", "bottom")) +
tm_compass(position=c("right", "bottom"))
V4: Nice addition of the compass in "view" mode
- ~legend title not passed correctly.~
- ~style = "k-means" not passed correctly or maybe
convert2density.~ - popups not treated the same?
- ~In plot mode, the compass looked better in v3?~
V4 patched!
V3
- the basemap control doesn't work in v3 anyway
Nice catch. Several issues here. Also col should be redirected to fill visual variable.
thank you for your work I know it is a lot of small details.
Wish I could help more with the barebones
example works in plot mode. Note that the style "classic_v3" is required rather than "classic". I could automatically switch to a _v3 style in case v3 code is detected in another tmap element.
To do for view mode:
- popups
- sepia colors for layer selection box and zoom buttons, and background in general.
I could automatically switch to a
_v3style in case v3 code is detected in another tmap element.
I think it is not necessary.. Maybe others will have different opinions, my main concern is more about getting the data right, rather than exact color or styling!
Looks fantastic with your most recent fix!
Code translation improved. Please check
Hi @mtennekes , thanks for working on this!
Seems like there are still issues on main as of this commit 8fc35ffacab8b02847b4f09f26ea5aa1847040b2
The example I provided in the initial comment errored
Error is
Erreur dans FUN(X[[i]], ...) : objet 'km' not found
Also, the title and breaks are not passed correctly. (it worked in a previous dev version)
The first example is working again!
Not sure though if it does not break other examples... In order to make the expression title work I had to replace list to alist (e.g. in https://github.com/r-tmap/tmap/blob/93554e8aab332a9b607e367283e4fbd0e62d8750/R/tm_layers_polygons.R#L238)
Thanks! The build is not working currently (Unknown exports tm_donut() and opt_tm_donut(). Maybe check_man() should be run again
Thanks! The build is not working currently (Unknown exports
tm_donut()andopt_tm_donut(). Maybecheck_man()should be run again
See #869 , should be fixed
Looking good, thanks!
I think we can close this one
View
Plot