r_eda

ggplot2 map_data

Jiaxiang Li 2019-03-13

参考 github

library(maps)
suppressMessages(library(tidyverse))
ctr_selected <- read_lines('../../travel_notes/visa-free/ctr-eng')
ctr_chi <- read_lines('../../travel_notes/visa-free/ctr-chi')
source("../../r_eda/du-bois/theme_du_bois.R")
font_name <- ""
ctr_data_selected <- map_data("world",region = c(ctr_selected,"China"))
ggplot(ctr_data_selected,aes(x = long,y = lat,group = group)) +
    geom_polygon() +
    labs(
        title = '这是包含中国的免签国家展示'
    ) +
    theme_du_bois() +
    coord_fixed(1.3)

参考 github,控制面板长宽比。