Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I am coloring several countries in the manner of the following:

myc[name_] := If[name == "UnitedStates", Red, Lighter[Gray]] 
Graphics[{myc[#], CountryData[#, {"FullPolygon", "WinkelTripel"}]} & /@ CountryData[]] 

How can I add country borders and longitude-latitude grid, as we could do with WorldPlot?

share|improve this question

1 Answer 1

Specifying EdgeForm resolves the country borders. Latitude and longitude...well here is a clumsy way. Depending on your desired grid you may have to clean up conversion.

myc[name_] := If[name == "UnitedStates", Red, Lighter[Gray]]
lat = Quiet[
   Line /@ Table[
     Table[GeoGridPosition[GeoPosition[{j, k, 0}], 
        "WinkelTripel"][[1, {1, 2}]], {j, -90, 90, 5}], {k, -170, 170,
       15}]];
long = Quiet[
   Line /@ Table[
     Table[GeoGridPosition[GeoPosition[{k, j, 0}], 
        "WinkelTripel"][[1, {1, 2}]], {j, -170, 170, 15}], {k, -90, 
      90, 10}]];
Graphics[{Gray, lat, long, myc[#], EdgeForm[Black], 
    CountryData[#, {"FullPolygon", "WinkelTripel"}]} & /@ 
  CountryData[]]

enter image description here

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.