Announcement

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

  • Display of overlapping outer lines using twoway scatter with weighted markers

    Hi all

    I’m trying to create a twoway scatter plot with weighted markers and am finding it difficult to display the markers as I'd like with a fill colour and a white outside line. I made a version of the graph in Microsoft Excel (see attached) and what I like about this version is you can see all the individual bubbles (n=57) with the overlapping/intersecting sections visible. When I create the same graph in stata, you don’t get a clear idea of the number of bubbles as many of them are obscured. Below is the code I have written using Stata/IC 12.1, is there a way I can make the outer white lines overlap for all markers like the graph made in Excel?

    twoway (scatter y x [fweight = z], msymbol(circle) mfcolor(gray) mlcolor(white))

    Many thanks in advance
    Catherine
    Bubble chart made in Microsoft Excel Twoway scatter with marker weights made in Stata 12.1
    Last edited by Catherine Tisch; 15 Dec 2014, 08:01.

  • #2
    Plot white hollow circles on top of the gray markers:

    Code:
    sysuse auto , clear
    twoway (scatter mpg weight [fweight=mpg], msymbol(O) mcolor(gray) msize(*3)) ///
    (scatter mpg weight [fweight=mpg], msymbol(Oh) mlcolor(white) msize(*3))

    Comment


    • #3
      Great, thanks so much for your help!

      Comment

      Working...
      X