Skip to content
Prev 359960 / 398502 Next

Adding Two-Headed Arrow in map legend

Dear David,

Thank you for your answer. Sorry for the embarrassing mistake. However,
even with when I generate a map for the whole world using:

 eps <- mapCountryData(n, nameColumnToPlot="eps_score", mapTitle="EPS
Score",colourPalette=colourPalette,
                      catMethod="fixedWidth", missingCountryCol = "white",
addLegend=FALSE)

And then use:

do.call(addMapLegend, c(eps, legendLabels="none",
arrows(-100,-140,100,-140,code=3)))

Only a legend with the colours is generated, no arrows. My session info is
below. Thanks again!

R version 3.2.4 (2016-03-10)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base

other attached packages:
[1] countrycode_0.18   ggplot2_2.1.0      RColorBrewer_1.1-2 foreign_0.8-66
    maptools_0.8-39    rworldmap_1.3-6
[7] sp_1.2-0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.4      lattice_0.20-33  grid_3.2.4       plyr_1.8.3
gtable_0.2.0     spam_1.3-0
 [7] scales_0.4.0     tools_3.2.4      munsell_0.4.3    maps_3.1.0
fields_8.3-6     colorspace_1.2-6

On Sat, Apr 9, 2016 at 7:34 PM, David Winsemius <dwinsemius at comcast.net>
wrote: