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
Checking for model misspecification with panel dataHi Statalist, For some context: I'm attempting a fixed effects regression on panel data. When I per…
Hausman Taylor estimator R squaredHello. I'm posting this because I have a simple question. Why doesn't the Hausman Taylor estimator …
why can we use if in this way, what is the hlep documentation for this? Code: gen scores_i1=comp_scores<50&comp_scores>0&comp_scores!=. Why we can omit "if" …
Differences in differences with/without attritersHi all, I'm trying to implement DID (two periods two groups) with Lee bounds by dropping the top/bo…
how to create a new variable based on existing variablesDear All, I have six variables. Based on them I want t create a new variable which would be based o…
Subscribe to:
Post Comments (Atom)
0 Response to Different colors on ascending and descending connect lines in scatter plot
Post a Comment