Announcement

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

  • John Economou
    started a topic Marginsplot, addplot - adjustment

    Marginsplot, addplot - adjustment

    Hello,
    using the command: - marginsplot, addplot(hist...)-, I got this graph:
    Click image for larger version

Name:	49531848_531986407316479_6595549601636286464_n.png
Views:	1
Size:	27.3 KB
ID:	1476618


    I would like to move the histogram at the bottom of the graph (e.g. where y(vertical) axis equals to -0.2)…

    Thank you in advance!
    Have a nice and creative new year!!!

  • Scott Merryman
    replied
    You will need two y-axes since the density is not negative. You could try something like:

    Code:
    sysuse auto,clear
    reg disp mpg
    margins, at(mpg=(10(5)50))
    marginsplot,  xlabel(10(5)50)  /// 
     addplot(histogram mpg, width(5) yaxis(2) yscale(alt) fcolor(%25) lc(black%50) )
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	30.9 KB
ID:	1476678

    Leave a comment:

Working...
X