Is it possible to suppress the legend and keep the histogram? I have tried a number of arguments to both tm_legend and tm_smymbols without success. Using tmap 2.0.
No, unfortunately not.
Actually, I haven't paid any attention to the histogram in tmap 2.0.
I'm thinking about replacing the histogram by an empty viewport in which the user can create custom charts with tmap data, e.g. with ggplot2. The advantage is that the tmap histograms does not have to be maintained anymore, and ggplot2 is obviously much more flexible.
The user interface could be something like:
myCustomChart <- function(data) {
# data is a data.frame with the columns id and col
require(ggplot2
ggplot(data) + ...
}
tm_shape(mySF) +
tm_polygons(col = "var1", id = "name", chart = myCustomChart)
Shucks--I really like the histogram. Having the histogram is really important when the color/data mappings deviates from a simple linear relationship.
Any updates on this thread? Having troubling adding a legend histogram in "view" mode. Is legend.hist not supported in tmap_mode("view")?
Most helpful comment
Shucks--I really like the histogram. Having the histogram is really important when the color/data mappings deviates from a simple linear relationship.