Announcement

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

  • Weighted Scatter Graph with Marker Labels

    I created a weighted scatter graph with markers of different sizes. When I add marker labels to my scatter graph all the markers were the same size.

    The example below is silly but you'll see what I mean.

    sysuse auto , clear

    scatter price mpg [w=displacement] , msymbol(circle_hollow) name(rightsizebutnolabels) // markers are different sizes depending on displacement

    scatter price mpg [w=displacement] , msymbol(circle_hollow) mlab(make) name(allmarkerssamesize) // markers are all the same size. This is NOT what I want for the graph I am trying to create



    Thanks for your help.

    Patrick Flaherty


  • #2
    From the twoway scatter help file (under weighted markers):
    Weights are ignored when the mlabel() option is specified.
    However, I think this works (hard to tell with the overlapping text):
    Code:
    scatter price mpg [w=displacement] , msymbol(circle_hollow) || scatter price mpg, msymbol(none) mlab(make)
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment

    Working...
    X