Announcement

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

  • Font size and background color

    H,

    I have a some graphs and I use stata 13. I want to change graph fonts (smaller) and background (white). ı read some topics but I could'nt apply. I added attachment about graps. Can you help me?
    Attached Files
    Last edited by didem okmen; 29 Aug 2018, 10:07.

  • #2
    Please read the FAQ. It has information about posting graphics (please do attach the gph files--most people are wary about downloading files from unknown sources) and providing commands used to produce the graphs (in code delimiters).
    Stata/MP 14.1 (64-bit x86-64)
    Revision 19 May 2016
    Win 8.1

    Comment


    • #3
      Thank you Carole. I added it .png.
      Attached Files

      Comment


      • #4
        Please provide the command you used (inside code delimiters). Background color can be changed with the scheme option (and there are other ways). Which fonts do you want to change? The labels on the y-axis? These are generally changed with the graph option : ylabel( , labsize(tiny)) , Where tiny can be replaced by any size given to you after the command:

        Code:
        graph query textsizestyle
        Stata/MP 14.1 (64-bit x86-64)
        Revision 19 May 2016
        Win 8.1

        Comment


        • #5
          Hi,

          I used this command for graph:

          Code:
           metaninf loghr loglci loguci, random eform label(namevar=author)
          I want to change background color from black to white and change size(small)
          Last edited by didem okmen; 31 Aug 2018, 02:46.

          Comment


          • #6
            The user contributed program (metaninf, available via SSC) does not appear to allow graph options. Nor does it produce a "live" graph that allows editing. Therefore, it looks like you cannot change any aspect of the graph. I suggest you contact the author of the program, or find a different program. Sorry!
            Stata/MP 14.1 (64-bit x86-64)
            Revision 19 May 2016
            Win 8.1

            Comment


            • #7
              The graphics for metainf correspond to a different era (Stata 6). However, you should be able to easily replicate the graph using twoway. I assume that you have all the inputs available, similar to below:


              Code:
              * Example generated by -dataex-. To install: ssc install dataex
              clear
              input float(v b ll ul)
              1 -186.84166   -462.748 157.93533
              2 -120.72642  -421.9534 139.50053
              3 -154.55293  -416.3923 148.49815
              4 -200.32475 -479.65015 159.00066
              5   -227.893   -436.817     140.6
              end
              label values v v
              label def v 1 "Author A", modify
              label def v 2 "Author B", modify
              label def v 3 "Author C", modify
              label def v 4 "Author D", modify
              label def v 5 "Author E", modify
              The only points that you will need are the means which you can obtain as follows:

              Code:
              . sum b ll ul
              
                  Variable |        Obs        Mean    Std. Dev.       Min        Max
              -------------+---------------------------------------------------------
                         b |          5   -178.0678    41.52074   -227.893  -120.7264
                        ll |          5   -443.5122    27.02344  -479.6501  -416.3923
                        ul |          5    149.1069    9.231031   139.5005   159.0007

              Thereafter it's just a matter of combining a dot plot and two scatter plots. You use the option -xline()- at the relevant means to identify the location of the estimates and confidence intervals, and the -text()- option to add text. Standard twoway options apply if you need to change y-axis labels.

              Code:
              set scheme s1color
              twoway (dot b v, horiz sort ylab(, val angle(0)) xline(-178, lwidth(vthin))) /// 
              (scatter v ll , msymbol(pipe) msize(large) mcolor(black) xline(-416, lwidth(vthin))) /// 
              (scatter v ul ,  msymbol(pipe) msize(large) mcolor(black) xline(159, lwidth(vthin)) /// 
              leg(off) ), text(5.1 -443 "Lower CI limit", size(small)) /// 
              text(5.1 -178 "Estimate", size(small)) text(5.1 149 "Upper CI limit", size(small)) /// 
              title("Meta-analysis estimates, given named study is omitted", size(small)) ///
              xlab(-600 -416 -176 159 220)

              Click image for larger version

Name:	metagr.png
Views:	1
Size:	48.2 KB
ID:	1460472

              Comment

              Working...
              X