Warning: package 'mapsf' was built under R version 4.2.3
Code
# Import the sample datasetmtq <-mf_get_mtq()# Plot the base mapmf_map(x = mtq)# Plot proportional symbolsmf_map(x = mtq, var ="POP", type ="prop", leg_pos ="topright")# Plot a map layoutmf_layout(title ="Population in Martinique",credits ="T. Giraud; Sources: INSEE & IGN, 2018")
Code
# Export a map with a theme and extra marginsmf_theme("green")mf_export(x = mtq, filename ="mtq.png",width =600, res =120,expandBB =c(0, 0, 0, .3))
Warning in grSoftVersion(): unable to load shared object '/Library/Frameworks/R.framework/Resources/modules//R_X11.so':
dlopen(/Library/Frameworks/R.framework/Resources/modules//R_X11.so, 0x0006): Library not loaded: /opt/X11/lib/libSM.6.dylib
Referenced from: <BBB44505-4BB3-30FA-9ED6-ABC69D534041> /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/modules/R_X11.so
Reason: tried: '/opt/X11/lib/libSM.6.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libSM.6.dylib' (no such file), '/opt/X11/lib/libSM.6.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libSM.6.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.0.1+12/Contents/Home/lib/server/libSM.6.dylib' (no such file)
Warning in cairoVersion(): unable to load shared object '/Library/Frameworks/R.framework/Resources/library/grDevices/libs//cairo.so':
dlopen(/Library/Frameworks/R.framework/Resources/library/grDevices/libs//cairo.so, 0x0006): Library not loaded: /opt/X11/lib/libXrender.1.dylib
Referenced from: <25AEF222-E381-3C27-AC91-0E12B2DF269A> /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/grDevices/libs/cairo.so
Reason: tried: '/opt/X11/lib/libXrender.1.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/X11/lib/libXrender.1.dylib' (no such file), '/opt/X11/lib/libXrender.1.dylib' (no such file), '/Library/Frameworks/R.framework/Resources/lib/libXrender.1.dylib' (no such file), '/Library/Java/JavaVirtualMachines/jdk-17.0.1+12/Contents/Home/lib/server/libXrender.1.dylib' (no such file)
Warning in png(filename, width = fd[1], height = fd[2], res = res, type =
"cairo-png", : failed to load cairo DLL
Code
# Plot a shadowmf_shadow(mtq, col ="grey10", add =TRUE)# Plot a choropleth mapmf_map(x = mtq, var ="MED", type ="choro",pal ="Dark Mint",breaks ="quantile",nbreaks =6,leg_title ="Median Income\n(euros)",leg_val_rnd =-2,add =TRUE)# Start an inset mapmf_inset_on(x ="worldmap", pos ="right")# Plot mtq position on a worldmapmf_worldmap(mtq, col ="#0E3F5C")# Close the insetmf_inset_off()# Plot a titlemf_title("Wealth in Martinique, 2015")# Plot creditsmf_credits("T. Giraud\nSources: INSEE & IGN, 2018")# Plot a scale barmf_scale(size =5)# Plot a north arrowmf_arrow("topleft")