Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/65.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 如何从tmap图例输出中删除逗号?_R_Tmap - Fatal编程技术网

R 如何从tmap图例输出中删除逗号?

R 如何从tmap图例输出中删除逗号?,r,tmap,R,Tmap,我有以下代码: tm_shape(usa, bbox = bbox, projection = map.crs)+ tm_borders(col = "grey", lwd = 1) + tm_fill(palette = "grey") + tm_grid(x = c(-77,-75,-73,-71), y = c(39,37,35), labels.inside.frame = F, labels.size = 1.1, col = "

我有以下代码:

tm_shape(usa, bbox = bbox, projection = map.crs)+
  tm_borders(col = "grey", lwd = 1) +
  tm_fill(palette = "grey") +
tm_grid(x = c(-77,-75,-73,-71),
      y = c(39,37,35),
      labels.inside.frame = F,
      labels.size = 1.1,
      col = "white") +
 tm_layout(outer.margins = c(.1,.03,.05,.05),
        outer.bg.color = "white")+
 tm_shape(sk.dat1,axes = T) +
 tm_dots("DATELAND", palette = colo,
      auto.palette.mapping=FALSE,
      size = .5,
      breaks = seq(2010,2017,
                   length.out =8),legend.show = T, alpha=.7) + 
 tm_layout(title = "Southern Kingfish Occurrence",
        legend.show = T,
        legend.position = c("right","bottom"),
        legend.bg.color = "grey70",
        legend.height = 2)

它输出这个。如何将tmap输入更改为仅包含不带逗号的一年

这看起来是一个数字格式问题;您的代码不是完全可复制的,因此我不能100%确定,但从外观上看,我相当确定

要解决此问题,请尝试将其包括在tm_布局调用中:

顺便说一句,几个月前我在tmap legend上写了一篇短文,我的问题是货币和百分比符号


这看起来是一个数字格式问题;您的代码不是完全可复制的,因此我不能100%确定,但从外观上看,我相当确定

要解决此问题,请尝试将其包括在tm_布局调用中:

顺便说一句,几个月前我在tmap legend上写了一篇短文,我的问题是货币和百分比符号

legend.format=list(fun=function(x) formatC(x, digits=0, format="d"))