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
How to know the x value when two lines intersectHello, I got the following graph after running the following codes (a fixed-effects model, wg is a …
Condition on bysort and count across all observations by groupHello, input hid day_bought min_day str20 product str20 manufacturer hid day_bought min_day produc…
Margins command after mixed-effect tobit regressionI'm hoping to get advice on the difference between two predictive margins outputs at their observed …
Multivariate regression discontinuity designHi everyone I would really appreciate to have your opinion on this idea: My master thesis is about…
Sum of a variable over all observations except one (loop)Dear all, Let's suppose I have a variable displaying the amount of input in a given industry for ea…
Subscribe to:
Post Comments (Atom)
0 Response to Reverse the color of spmap
Post a Comment