Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Twoway scatter- different colors for different observations

    Hi
    Hope somebody can help me with this question. I have collected data on a numerical variable (blood test result) on a large group of patients (agespan 0-84 yrs). I can easily make a scatter plot of this by using the, i.e. ". twoway (scatter bloodresult age)"


    However out half of the patients died and the other half survived, this is defined in a another variable called outcome. Now I would like to apply the a different colour to each dot on my scatterplot according to outcome, i.e. black=dead and red=survived. How can I do this?
    Cheers
    Mads

  • #2
    See e.g. http://www.statalist.org/forums/foru...lable-from-ssc and references to sepscatter in the forum

    http://www.stata-journal.com/sjpdf.h...iclenum=gr0023 and references to gr0023 in the forum

    Comment

    Working...
    X