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!
Related Posts with Reverse the color of spmap
Commands for sleep and retry if a file being accessed at the momentI have multiple instances of Stata accessing the same excel file to record some information. Every o…
Bar chart with intervalsI'm plotting the following bar chart where "date" contains around 100 observations thus I would like…
Standard errors and 95% Confidence Intervals for Proportions - Differences between different Stata versionsDear community: I am having doubts about how Stata calculates standard errors and 95% confidence in…
sqom subcost matrix problem?Hi, I am trying to run the latest version of sqom on Stata16 using subcost(meanprobdistance) and am…
Identifying common observations between two groupsDear Statalist, I have a dataset with firms and owners. This is a minimum working example: Code: *…
Subscribe to:
Post Comments (Atom)
0 Response to Reverse the color of spmap
Post a Comment