Announcement

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

  • Size of combined graphs

    Dear All,
    I have three graphs that I am trying to combine in 1 column with a common legend. I have used the user written grc1leg command instead of graph combine because of the need to have a common legend. I used the following:

    twoway (line y date if (KY==1)) (line y date if (KY==0), lpattern(dash)), ///
    xline (6) title("(a) Patients") legend(order(1 "Treated,KY" 2 "Control,IN")) legend(size(tiny)) text(100000 21 "Control, IN", place(n)) text(75000 21 "Treated,KY", place(n)) ///
    ytitle(Total patients (weekly)) xtitle("") ///
    xlabel(1 "Jan12" 3 "Mar12" 6 "Jun12" 9 "Sep12" 12 "Dec12" 15 "Mar13" 18 "Jun13" 21 "Sep13", angle(45)) name(a)

    twoway (line y date if (KY==1)) (line y date if (KY==0), lpattern(dash)), ///
    xline (6) title("(b) Total Scripts written") legend (off) text(3250 21 "Control, IN", place(n)) text(2100 21 "Treated,KY", place(n)) ///
    ytitle(Scripts written (weekly)) xtitle("") ///
    xlabel(1 "Jan12" 3 "Mar12" 6 "Jun12" 9 "Sep12" 12 "Dec12" 15 "Mar13" 18 "Jun13" 21 "Sep13" , angle(45)) name(b)

    twoway (line y date if (KY==1)) (line y date if (KY==0), lpattern(dash)), ///
    xline (6) title("(c) Total MME per day") legend (off) text(360 21 "Control, IN", place(n)) text(310 21 "Treated,KY", place(n)) ///
    ytitle(MME per day (weekly)) xtitle("") ///
    xlabel(1 "Jan12" 3 "Mar12" 6 "Jun12" 9 "Sep12" 12 "Dec12" 15 "Mar13" 18 "Jun13" 21 "Sep13", angle(45)) name(c)


    grc1leg a b c, legendfrom(a) col(1) iscale(.5) graphregion(margin(l=32 r=32)) ysize(11) xsize(8.5)

    For some reason the combined graph I am getting is only half a page big as opposed to a full letter size (8.5x11 inches). The small overall size makes it rather hard to read. Is there anyway I can specify the combined graph size to be a full page size please?

    Many thanks.
    Sumedha.

  • #2
    On the face of it this is just

    Code:
    twoway (line y date if (KY==1)) (line y date if (KY==0)
    three times over. Perhaps that is an illusion. Please explain.

    Comment


    • #3
      Sorry for the typo Prof. Cox. Its three graphs:
      twoway (line y1 date if (KY==1)) (line y1 date if (KY==0)
      twoway (line y2 date if (KY==1)) (line y2 date if (KY==0)
      twoway (line y3 date if (KY==1)) (line y3 date if (KY==0)

      Comment


      • #4
        OK. That's still six lines. There is no obvious need to combine different graphs. You need to reshape the data, however, and thus need to give us a real or realistic example if you want advice on how.

        Comment

        Working...
        X