Révision | 34cefd3fc5b21875813e65fa965a2ca508132ff7 (tree) |
---|---|
l'heure | 2020-09-21 20:51:55 |
Auteur | Lorenzo Isella <lorenzo.isella@gmai...> |
Commiter | Lorenzo Isella |
Minor improvements in the plots and removal of one level from the legend.
@@ -272,7 +272,7 @@ | ||
272 | 272 | |
273 | 273 | eu27_temp2 <- eu27_temp %>% |
274 | 274 | select(reporterlabel, year) %>% |
275 | - mutate(new_rank=-10) | |
275 | + mutate(new_rank=-20) | |
276 | 276 | |
277 | 277 | |
278 | 278 |
@@ -305,7 +305,8 @@ | ||
305 | 305 | mutate(new_rank2=case_when(new_rank==1~"EU27 is the first partner", |
306 | 306 | new_rank==2~"EU27 is the second partner", |
307 | 307 | new_rank==3~"EU27 is the third partner", |
308 | - new_rank==-10~"Other")) %>% | |
308 | + new_rank==-10~"Other", | |
309 | + new_rank==-20~"extra")) %>% | |
309 | 310 | |
310 | 311 | mutate(new_rank2=if_else(is.na(new_rank2), "Other", new_rank2)) |
311 | 312 |
@@ -322,7 +323,8 @@ | ||
322 | 323 | |
323 | 324 | my_pal <- viridis(4)[1:3] |
324 | 325 | |
325 | -my_pal <- c(my_pal,"#a9a9a9" ) | |
326 | +my_pal <- c(my_pal, "orange","#a9a9a9" ) | |
327 | + | |
326 | 328 | |
327 | 329 | |
328 | 330 | for (my_year in sel_years2) { |
@@ -368,7 +370,10 @@ | ||
368 | 370 | legend.title = element_text(vjust=1,lineheight=1, size=14, |
369 | 371 | face="bold" ), |
370 | 372 | plot.caption = element_text(size=14) )+ |
371 | - scale_fill_manual(NULL,values = my_pal, na.translate=F, drop=F)+ | |
373 | + scale_fill_manual(NULL,breaks=c("EU27 is the first partner", | |
374 | + "EU27 is the second partner", | |
375 | + "EU27 is the third partner", "Other") , | |
376 | + values = my_pal, na.translate=F, drop=F)+ | |
372 | 377 | theme(plot.title = element_text(hjust = 0.5))+ |
373 | 378 | coord_sf(crs = "+proj=eqearth +wktext") |
374 | 379 |