ggplot-图例不是从0开始

时间:2019-02-18 09:07:11

标签: r ggplot2

我有以下代码:

ggplot() +
  geom_polygon(data =Map_plot, 
               aes(x = long.x, y = lat.x, group = group, fill = RD), 
               color = "#636668") + 
  scale_fill_gradient(low='#FFFFFF', high='#008275') +
  coord_fixed(1.0)+
  labs(x = NULL, y = NULL, fill = NULL,
       title="",
       subtitle = "")+
  theme(axis.text.x = element_blank(),
        axis.text.y = element_blank(),
        axis.ticks = element_blank(),
        rect = element_blank()) +
  theme_void()
  theme(text = element_text(family = "Gill Sans MT", size = 8),
        plot.title = element_text(size = 12, face = "bold"),
        legend.text = element_text(size = 7),
        legend.position = c(-0.25, 0.55))

哪个会生成以下地图:

enter image description here

正如您在图例上看到的那样,编号从2开始,大约是数字的三分之一,图例的顶部没有任何内容。难道我做错了什么?还是有办法让它从0开始编号?我尝试删除图例主题部分,但是它仍然相同,因此必须是其他内容。

谢谢

0 个答案:

没有答案