Announcement

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

  • grc1leg2 - keys in legend too big

    Hey,
    I am combining different graphs with the same legend using the grc1leg2 package.
    Everything works out fine. Except I have one problem.
    They keys in the legend stay the same size when I am resizing the legend

    Thats the part of the code I am using to combine the 4 graphs and I attached a screenshot of the graph.

    grc1leg2 "$figures/fig6_samples_emp_on_ic_us_unemp.gph" ///
    "$figures/fig6_samples_rincwage_ln_on_ic_us_unemp.gph" ///
    "$figures/fig6_samples_rincwageph_ln_on_ic_us_unemp.gph" ///
    "$figures/fig6_samples_swoccscoresybph_ln_on_ic_us_unemp.gph ", ///
    legendfrom($figures/fig6_samples_rincwage_ln_on_ic_us_unemp.gph) ///
    legscale(*0.6) lmsize(medium) symxsize(3) symysize(0.01) ring(2) ///
    xtob1title xtsize(vsmall) ///
    iscale(0.45) imargin(medium) xsize(20) ysize(16)

    I hope you can help me with this.

    Thank you!

    Julia
    Attached Files

  • #2
    grc1leg2 is from http://digital.cgdev.org/doc/stata/MO/Misc (FAQ Advice #12). For your future posts, provide a reproducible example as recommended in the aforementioned FAQ Advice.

    They keys in the legend stay the same size when I am resizing the legend
    Not sure what you mean. From the documentation:

    lmsize(markersizestyle) Size of the marker keys in the legend (overrides default resizing or user-specified legscale())+
    This indeed works for me.

    Code:
    sysuse auto, clear
    set scheme s1mono
    gen weight2= weight*1.05
    tw scatter (mpg weight) (mpg disp), msy(oh sh) saving(gr1, replace)
    tw scatter (mpg weight) (mpg disp), msy(th +) saving(gr2, replace)
    grc1leg2 gr1.gph gr2.gph, lmsize(20)
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	33.9 KB
ID:	1720100



    If you cannot replicate my example, update your installation:

    Code:
    cap ado uninstall grc1leg2
    net install grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
    Last edited by Andrew Musau; 11 Jul 2023, 14:15.

    Comment

    Working...
    X