代码之家  ›  专栏  ›  技术社区  ›  Rosie Lomas

在ggplot中设置数字刻度

  •  0
  • Rosie Lomas  · 技术社区  · 1 年前

    我试图将2022年发生的极端洪水事件与2月份的历史平均降雨量进行比较。 This is my current map of Historical data This is the flood event

    如图所示,将比例设置为数据, 但我想做一个并排的比较,看看2022年2月的事件有多极端。因此,我需要为这两张地图指定一个比例。

    它应该是: 281以上是极端的 195年中期 而低则低于140。

    不过我不知道该怎么设置。

    这是我当前的图形代码:

    历史手段:

    library(ggplot2)
    library(sf)
    library(tidyverse)
    ggplot()+
    ggtitle("Map Of The Northern River's Local Goverment Areas (LGA's)")+
    geom_sf(aes(geometry = combined_data2$geometry, fill= combined_data2$Historical_means.Historical_means_agg), lwd = 0) +              
     theme_void() +                    
    labs(fill = "Historical Feburary Rainfall Mean")
    
    
    

    2022年2月是指:

    library(ggplot2)
    library(sf)
    library(tidyverse)
    ggplot()+
    ggtitle("Map Of The Northern River's Local Goverment Areas (LGA's)")+
    geom_sf(aes(geometry = combined_data1$geometry, fill= combined_data1$Rainfall_2022.Rainfall_2022), lwd = 0) +              
     theme_void() +                    
    labs(fill = "Rainfall Mean Feburary 2022")
    

    谢谢你的帮助!

    设置ggplot的比例

    0 回复  |  直到 1 年前