Dear All,
Is it possible to color connecting lines in a scatter plot in different colors ?
I plottet 566 sets of pre and post biomarker concentrations and connected sample sets with connect(l). I wish to color ascending lines red and descending lines black.
Code:
rename PreTBI_biomark01a sample1
rename PreTBI_biomark02a sample2
reshape long sample,i(cpr) j(time)
sort cpr time
set scheme s1mono
scatter sample time, yscale(log) /
msy(O) ///
aspect(1) ///
connect(l) ///
xscale(range(0.8 2.2)) ///
xlabel(1 "Prehospital" 2 "Inhospital") ///
ytitle("S100B concentration, log scale") ///
xtitle("") /* Legend for x-axis (none here) */
I use STATA15. Thank you.
Kind regards,
Sophie Seidenfaden
Related Posts with Different colors on ascending and descending connect lines in scatter plot
Collapse variables by country, category, yearHi! I have the following data (dataex below) and I just want to confirm if I am doing the right app…
Questions about pseudo-strata/psu in complex survey designHi: This is not a stata related question, so please forgive me if this is not allowed. I am dealin…
Criteria to apply xtpcseHello everyone. I have a dataset with N = 178 and T =14 . Is it right to go for panel corrected stan…
Storing the value of a variable from one observation in a local macro or scalarDear Statalist, I'm using Stata 16.0 trying to store a variable value from one observation in a loc…
How would you export ANOVA tablesforeach var in Subclass { anova ATF4Targetgenes `var' export ?????????? } Hello everyone, I have c…
Subscribe to:
Post Comments (Atom)
0 Response to Different colors on ascending and descending connect lines in scatter plot
Post a Comment