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
Multiple imputation + ttestHi, I am struggling to find the right code that allows me to do a ttest on imputed data. mi estimate…
Marginal effects command doesn't work. Don't understand error: factor variables may not contain noninteger valuesHi! I'm doing a binary logistic regression in Stata 15.0, but my supervisor told me you cannot inte…
Estimating an hourly ATE in the DID frameworkDear Statalist, I am trying to estimate the average treatment effect for each hour of the day(0-23…
How to count number of IDs with more than one conditionAn extract of my data is displayed below. In the data, 0=Condition is absent, and 1=Condition is pre…
How to count number of countries when you have individual-level data of many countriesHi, I need to fill in my descriptive statistic analysis sample, and thus I need to count the number…
Subscribe to:
Post Comments (Atom)
0 Response to Assigning colors to box plot with stratification
Post a Comment