diff --git a/vignettes/web_only/img/mapsf_cheatsheet.pdf b/vignettes/web_only/img/mapsf_cheatsheet.pdf index 800d77e..579ce18 100644 Binary files a/vignettes/web_only/img/mapsf_cheatsheet.pdf and b/vignettes/web_only/img/mapsf_cheatsheet.pdf differ diff --git a/vignettes/web_only/img/mapsf_cheatsheet.png b/vignettes/web_only/img/mapsf_cheatsheet.png index 4d3102f..d33fbb4 100644 Binary files a/vignettes/web_only/img/mapsf_cheatsheet.png and b/vignettes/web_only/img/mapsf_cheatsheet.png differ diff --git a/vignettes/web_only/img/mapsf_cheatsheet.svg b/vignettes/web_only/img/mapsf_cheatsheet.svg new file mode 100644 index 0000000..b9ff099 --- /dev/null +++ b/vignettes/web_only/img/mapsf_cheatsheet.svg @@ -0,0 +1,12039 @@ + + + +ConnectorExit to or entry from another part of chart.Thematic maps with mapsf :: CHEAT SHEETBase mapMap layoutlibrary(mapsf)# import the sample datasetmtq <- mf_get_mtq()# display a base mapmf_map(mtq, col = "orange", border = "white")# display symbologymf_map(mtq, var = "POP", type = "prop", leg_title = "Population", add = TRUE)# map layoutmf_layout(title = "Martinique", credits = "Source:IGN, 2018")Colorsmf_get_pal(n = c(7, 2), pal = c("Burg", "Mint")mapsf can use color palettes from hcl.colors()mf_get_pal() is useful to create well-balanced asymetric diverging palettesSymbologyx should be an sf object of polygons, lines, or points.Customization of tha layout designChoropleth (ratios)mf_map(x = mtq, var = "var", type = "choro", breaks = "quantile")Typology (categories)mf_map(x = mtq, var = "var", type = "typo")Proportional Symbols (stocks)mf_map(x = mtq, var = "var", type = "prop", inches = .3, symbol = "circle")Graduated Symbols (stocks)mf_map(x = mtq, var = "var", type = "grad", pch = 24)Symbols (categories)mf_map(x = mtq, var = "var", type = "symb", pch = 21:23)Choropleth Proportional Symbols (stocks - ratios)mf_map(x = mtq, var = c("var1", "var2"), type = "prop_choro")Colorized Proportional Symbols (stocks - categ.)mf_map(x = mtq, var = c("var1", "var2"), type = "prop_typo")Choropleth Symbols (stocks - categ.)mf_map(x = mtq, var = c("var1", "var2"), type = "symb_choro")Raster (single/multi band, continuous, classes, intervals)mf_raster(x = raster, type = "continuous")mapsf - CRAN.R-project.org/package=mapsf - R. Ysebaert & T. Giraud - 2024/12LegendsDefault legends are plotted with each map.One can use mf_legend() or the maplegend package for more customization options. 21Set a map theme1mf_theme(bg = "#aad3df", mar = c(0, 0, 0, 0))Create a shadow effect2mf_shadow(...)4Display a title4mf_title(...)56More ?> How to use themes> How to export maps > How to create inset maps> How to create faceted maps> how to use a custom font family3Create a map inset3mf_inset_on(mtq)mf_map(mtq)mf_inset_off()Use mf_inset_on(x = "worldmap") and mf_worldmap() to display a globeVignettes on the website:89Display labels5mf_label(...)Display an annotation6mf_annotation(...)North arrow7mf_arrow(...)Scale bar8mf_scale(...)Credits9mf_credits(...)7 Class intervalsmf_get_breaks() uses classInt and additional methods (e.g., "Q6", "geom", "arith", "msd" or "ckmeans") to classify continuous variables. mf_distr() can help to selecta method for creating class intervalsmf_export(mtq, width = 3, filename = "map.svg")mf_map(mtq, add = TRUE)dev.off()Export mapsmf_export() exports mapsin PNG and SVG formats.The width/height ratio of theexported figure will match the one of a spatial object. width : 3 in.(inferred) height : 3.5 in.