Announcement

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

  • Marginsplot is hidden behind the scatter plot

    Hi!

    I am trying to create a marginsplot on top of a scatter plot. The problem I have is with the layering of the two plots. The marginsplot is hidden behind the scatter plot. Ideally I would like the marginsplot to be the top layer.

    I am using the following code:
    xtreg swl0_20 c.inntekt100k##c.inntekt100k age i.sf12t01 i.intervjurunde, vce (cluster ref_nr) fe
    margins, at(inntekt100k=(-3.5(1)109.6))
    marginsplot, recast(line) recastci(rarea) addplot(scatter swl0_20 inntekt100k, mcolor(%20) jitter(5))
    graph export "Eksamen/figurer/Curve_FE_margins.png", replace

    The output is as follows:
    Click image for larger version

Name:	Curve_FE_margins.png
Views:	1
Size:	1.04 MB
ID:	1538955

  • #2
    -addplot()- has the option -below-.

    Comment


    • #3
      Thank you! That solved it =)

      Comment

      Working...
      X