Announcement

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

  • help with addplot

    Click image for larger version

Name:	Screen Shot 2021-12-20 at 6.06.56 PM.png
Views:	1
Size:	343.4 KB
ID:	1641756 Hello,

    I am trying to overlay a twoway plot (after predict y) and a marginsplot. I use addplot to achieve this goal. However, the twoway plot and the maginsplot do not share the same X-axis. As you can see from the picture, twoway plot starts earlier. So how can I fix it? Many thanks



  • #2
    Dear Qian,

    A similar question was asked here before.
    What you possibly need to do is to set a second x-axis to be used by addplot.
    I suggest you should look for a solution with the option:
    Code:
    xaxis(2) xscale(axis(2)
    Possibly, you should post some example data and code if you need some more explanation, as is advised on the FAQ page of this forum, under topic 12. What should I say about the commands and data I use?
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Hi Eric, thanks for the direction. Very helpful!

      Comment

      Working...
      X