I would like to improve the visual appeal of a geographical map I plotted with Mathematica. The code is:

GeoGraphics[{continents (geographic regions)},GeoBackground->GeoStyling["ReliefMap"],GeoProjection->"Equirectangular"]

and the output is:

enter image description here

There are 2 issues I would like to resolve:

  1. The structure on the sea floor is distracting from the landmasses. Is it possible to reduce the number of details/contours?
  2. I would like to change the color on the landmasses to be more saturated and green as well as white for snow/large elevations.

I found a good example on the internet done with "Generic Mapping Tools":

enter image description here

Apart from the different map projection, it is exactly what I am looking for (reduced level of sea floor details and landmass coloring). Is it possible to also do that in Mathematica?


1 Answer 1


The documentation for GeoStyling says:

GeoStyling["ReliefMap", opts] accepts the same options as ReliefPlot.

We should be able to get something roughly similar to what you want by combining ColorFunction, PlotRange, and ClippingStyle. The latter two would let me make everything below nominal see level a flat color. We might Overlay two plots to get a partial opacity.

Okay, now that I have time to do this a bit better here is my proposal.

  • I render two different plots to give me full control over below-sea-level and above-sea-level styling.

  • I use LightingAngle to give flat lighting for the sea layer to minimize its contrast.

  • I set the ClippingStyle in each plot to black and then use ImageAdd to combine the two layers.

  • I render each layer larger than my target size then downsample the final image to reduce artifacts.

I cannot match the colors of your example map as they are not correlated to elevation but I tried to pick something fairly similar.

gg[opts___] :=
 GeoGraphics[GeoRange -> "World", 
  GeoBackground -> 
   GeoStyling["ReliefMap", opts, ClippingStyle -> Black, ImageSize -> 2000], 
  GeoProjection -> "Equirectangular", ImageSize -> 2000]

  gg[ColorFunction -> (Blend[
       {RGBColor[{.5961, .6235, .4078}], 
        RGBColor[{.8157, .7059, .5843}], 
        RGBColor[{.9686, .9490, .7922}], 
        RGBColor[{.9608, .9686, .8902}]}, #] &), 
   PlotRange -> {Full, Full, {0, All}}],
  gg[ColorFunction -> "Aquamarine", LightingAngle -> None, 
    PlotRange -> {Full, Full, {All, 0}}]
] // ImageResize[#, 800] &

enter image description here

  • $\begingroup$ Using the color gradient function myGradient1 from this answer along with a properly chosen clipping color gives this. $\endgroup$ Jan 8, 2017 at 20:09
  • $\begingroup$ @J. M. : I really like your globe and the fit procedure over the poles! Also thanks for the color gradient function. It's great apart maybe from the apparent dramatic increase of fertility in the Sahara :) $\endgroup$
    – Oscillon
    Jan 8, 2017 at 20:20
  • $\begingroup$ @Oscillon, that's kinda the drawback of indiscriminately applying color gradient functions to heightmaps; it doesn't distinguish if sea level is savannah or desert. :) $\endgroup$ Jan 8, 2017 at 20:23
  • $\begingroup$ @ J.M. : What's actually the default colormap used in GeoStyling["ReliefMap"]? It's not "LightTerrain", is it? $\endgroup$
    – Oscillon
    Jan 8, 2017 at 21:50
  • 1
    $\begingroup$ @Oscillon, ColorData["HypsometricTints"] is the default coloring used. $\endgroup$ Jan 8, 2017 at 22:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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