Hello Stata-Experts,

I generated a wonderful heat map with the spmap package. Now I am wondering if there's any possibility to reverse the color coding. I want higher values to be shown in lighter colors and the other way around.

The code of the map looks like:

colorpalette plasma, n(18) nograph reverse
local colors `r(p)'
spmap age_mean using nuts3_shp, ///
id(_ID) cln(10) fcolor("`colors'") ///
ocolor(gs6 ..) osize(0.03 ..) ///
ndfcolor(gs14) ndocolor(gs6 ..) ndsize(0.03 ..) ndlabel("No Data") ///
polygon(data("nuts1_shp") ocolor(black) osize(0.08) legenda(on) legl("NUTS3")) ///
legend(pos(11) size(1.5) symx(2.5) symy(1.5)) legtitle("Age") legstyle(2) ///
title("{fontface Arial Bold:Dependency Ratio in Europe by NUTS 3 regions}", size(medsmall)) ///
note("Data source: Eurostat table: demo_r_pjanind3. NUTS 2016 layers from Eurostat GISCO.", size(1.5))


I already tried the -colrspace- package, but I keep getting white maps as result. Here is the code:

ssc install colrspace, replace
colorpalette plasma, select( 1 2 3 4 5 6 7 8 10 12 14 16 18 20) nograph reverse

I appreciate any kind of help!

Thank you!