Announcement

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

  • Graph Scale and Text when using Graph Combine Command

    I want to combine graphs, but when I do, the formatting is almost always problematic.

    If I have three graphs I can put them on one page using combine with a hole(4) and that works in terms of keeping the general height/width of the x/y axis, but the problem I have is with the size of the text, the size of the legend, and similar text/formats - the legend doesn't shrink to scale as much, so the graph gets compressed. The text does not adjust in size so it needs to be shrunk in the original graph.

    Is there a way for Stata to treat the Graphs as 'fixed images' that it combines - maintaining the orientation/scale of the original graph?

    I have taken the StataCourse on graphs, I have searched through the list and see a lot of references to scales getting stretched/compressed, but not this question

    I would appreciate any help on this.

    Thanks!

  • #2
    Does the scale option of graph combine do what you want? For example,
    Code:
    . twoway function y=x, name(g1)
    
    . twoway function y=x^2, name(g2)
    
    . twoway function y=-x^3, name(g3)
    
    . graph combine g1 g2 g3, scale(1.25)
    If the above approach doesn't work, you can try using the graph editor, recording the edits, manipulating them in a text editor, and using the not-documented command gr_edit like the following example. But this approach can be difficult and tedious because you may have to adjust each element separately.
    Code:
    gr_edit .plotregion1.graph1.yaxis1.style.editstyle majorstyle(tickstyle(textstyle(size(*1.25))))
    David Radwin
    Senior Researcher, California Competes
    californiacompetes.org
    Pronouns: He/Him

    Comment


    • #3
      Thanks! I'll give this a try. It is a little frustrating, Stata does so many things so well. I know I can save the image in a graphics format and copy/paste them into a document or file, but it seems like there should be an option to 'combine graph' that would just adjust the size and keep the same proportions/ratios within the graph itself.... simple math, but maybe not when dealing the with the images.

      I'll let you know if it works.

      --- So tried it and it got worse... the legend covered half of the graph. So, I went in the other direction and tried scale .75 and then down to scale .70 and it is almost exactly what I need.

      Thanks for the help!

      Comment


      • #4
        I'd be interested, Greg, or anyone else, if you ever found a more direct solution for your query?

        Comment

        Working...
        X