Announcement

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

  • Creating a scatter plot between two variables and a weight using a third variable with colors to distinguish each marker

    Hello all,

    I have tried numerous times to pull this off with out any success. I am interested in creating an employment cluster graphic that plots the growth of an industry against its location quotient. I would like to have those markers weighted on the number of jobs for that industry and each to be colored in order to distinguish them. I have never been able to combine all of these attributes into one graph. So in short, I have three variables; x, y, and z. I want to plot x and y in a scatter plot. I want the markers to be weighted on variable z, and I want all of the markers to be colored differently (to distinguish them from each other). I've attached an image that shows what I'm getting at. Thanks all!
    Attached Files

  • #2
    Here is an example of what you are asking for :
    Code:
    sysuse lifeexp, clear
    keep if region ==2
    seperate lexp , by( country )
    tw scatter lexp1-lexp14 gnppc [fw= safewater ] || scatter lexp gnppc, m(none) mlabel(country)  mlabc(black)  xsca(range(35000))  legend(off)
    Last edited by Oded Mcdossi; 02 Sep 2017, 14:23.

    Comment


    • #3
      That did the the trick. Thank you for your help!

      Comment

      Working...
      X