Announcement

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

  • Reduce margins in combined plot

    I am trying to combine two plots using the following code. I have attached the generated plot, is it possible to reduce/eliminate the margins at the top and bottom of the plots?

    I have tried imargin and graphregion(margin(zero)) but haven't managed to reduce the margins. Thank you!

    Code:
    gr combine tmean_world_2000.gph pmean_world_2000.gph, imargin(b=0 t=0) graphregion(color(white)) iscale(0.75) l1(Impact on Economic Activity (%), size(small)) ///
        title(Figure 1: Impact: 2000, size(small) margin(t+5))
    Attached Files
    Last edited by Shouro Dasgupta; 28 Dec 2016, 07:47.

  • #2
    Maybe something like this, where you use negative numbers for the top and bottom values of the plotregion option?
    Code:
    twoway function y=x^2, name(a, replace)
    
    twoway function y=1/x, name(b, replace)
    
    graph combine a b, imargin(b=0 t=0) graphregion(color(white)) iscale(0.75) l1(Impact on Economic Activity (%), size(small)) ///
        title(Figure 1: Impact: 2000, size(small) margin(t+5)) plotregion(margin(0 0 -5 -5))
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment


    • #3
      Shouro Dasgupta you can also use the brewscheme package to define a custom scheme file with these properties so you don't need to remember the specific graph options in the future.

      Comment

      Working...
      X