Dear Forum,
I would like to box plot sCD163 over HIV status (positive vs. negative) (i) stratified by levels (tertiles) of cardiac function (tert_mv2) as (ii) well as overall, ie, just HIV positive vs HIV negative (total). Second - and for which I need some advice - I would like to color code the HIV status (positive = red; negative = blue).
I have the below copied box plot without colors written with the following command:
- graph box cd163, over(hiv) over(tert_mv2, total)
To add color, I have tried the following command which, unfortunately, then changes the plot as also copied below.
- graph box cd163, over(hiv) over(tert_mv2, total) nofill asyvars bar(1, color(blue)) bar(2, color(red))
I will very much appreciate any suggestions you may have on how to go about this.
Thanks in advance.
Itai
Array
Array
Related Posts with Assigning colors to box plot with stratification
Calculating difference between observations and sumDear experts, I'm wondering whether you can help me. I wanted to calculate the age similarity based…
het() option - Which variables do I have to include?Hello, I am dealing with an intreg model, which does not meet the assumption of homoskedasticity. I…
Extracting Parts of a Sting variable: Numerous Attempts failedHello, I've spent the last 3 hours trying to extract various parts of this string variable <mcas…
Interactive do File à la C++/PythonI have 2 datasets: A.dta, and B.dta. I want the same set of codes to run on A & B depending on t…
Warning strata using hotdeck commandHello, I am imputing data using hotdeck command. Just so you may know exactly how I am doing this, …
Subscribe to:
Post Comments (Atom)
0 Response to Assigning colors to box plot with stratification
Post a Comment