Announcement

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

  • label size in graph hbar?

    I employ data from Morch et al. (2000, JFE),

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input str13 cn float r2
    "Australia" 6.4
    "Austria" 9.3
    "Belgium" 14.6
    "Brazil" 16.1
    "Canada" 6.2
    "Chile" 20.9
    "China" 45.3
    "Columbia" 20.9
    "Czech" 18.5
    "Denmark" 7.5
    "Finland" 14.2
    "France" 7.5
    "Germany" 11.4
    "Greece" 19.2
    "Holland" 10.3
    "Hong Kong" 15
    "India" 18.9
    "Indonesia" 14
    "Ireland" 5.8
    "Italy" 18.3
    "Japan" 23.4
    "Korea" 17.2
    "Malaysia" 42.9
    "Mexico" 29
    "New Zealand" 6.4
    "Norway" 11.9
    "Pakistan" 17.5
    "Peru" 28.8
    "Philippines" 16.4
    "Poland" 56.9
    "Portugal" 6.8
    "Singapore" 19.1
    "South Africa" 19.7
    "Spain" 19.2
    "Sweden" 14.2
    "Taiwan" 41.2
    "Thailand" 27.1
    "Turkey" 39.3
    "U.K." 6.2
    "United States" 2.1
    end
    and use command below
    HTML Code:
    graph hbar (asis) r2, over(cn, sort(r2) descending) legend(off)
    to draw the following graph
    Click image for larger version

Name:	myy00jfe-hbar-r2-test.png
Views:	1
Size:	91.2 KB
ID:	1369691



    As you can see, the label size of the country names (on the vertical axis) is too large. Any suggestion to make the size smaller (say, vsmall)?
    Ho-Chuan (River) Huang
    Stata 19.0, MP(4)

  • #2
    Code:
    graph hbar (asis) r2, over(cn, sort(r2) descending lab(labsize(tiny))) legend(off)
    Roman

    Comment


    • #3
      Originally posted by Roman Mostazir View Post
      Code:
      graph hbar (asis) r2, over(cn, sort(r2) descending lab(labsize(tiny))) legend(off)
      Dear Roman, It works, and many thanks.
      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment


      • #4
        River Huang you can also use the brewscheme package to create a custom scheme file that includes these settings. That way you don't need to remember the options in the future and can standardize your graphics output.

        Comment


        • #5
          Originally posted by wbuchanan View Post
          River Huang you can also use the brewscheme package to create a custom scheme file that includes these settings. That way you don't need to remember the options in the future and can standardize your graphics output.
          Thanks for the suggestion. I will give it a try.
          Ho-Chuan (River) Huang
          Stata 19.0, MP(4)

          Comment


          • #6
            Dear @wbuchanan, apologise if sounds irrelavant, but it relates to your suggested brewscheme package #4. Is it possible to use this scheme to combine graphs that are created in Stata and saved in *.png/jpg/jpeg/eps format? The reason I am asking for it is, I have three SEM models from graphical SEM model-builder with *.stsem extension which I need to combine into one. Stata does not allow to save *.stsem as *.gph to be used with 'graphcombine' command. I can at best save those *.stsem files as jpeg/jpg/eps/pdf and think about combining using some other software. Is this something possible with 'brewscheme' package? This will be great to know, thanks for your help.
            Roman

            Comment


            • #7
              Roman Mostazir the .stsem files serve a very different purpose and I assume have a drastically different structure from the .gph files. Why would you need to use graph combine with SEM diagrams? Are you just trying to put all of the model diagrams in a single image? If so, it would probably be better/easier to do that using some type of image editing software. If it is because you have results from multiple groups I'd suggest creating separate images for each group; I ended up using this approach in an article a few years ago and it worked out fairly well (until I just noticed one of the latent variables in the published version was mislabeled a few minutes ago).

              Comment


              • #8
                Thanks wbuchanan. I have three separate diagrams from three separate sem models. I would like to present all of those but almost over the limit of the juournal requirements and only one for figure can be acompanied in the main article, thus wondering of combining them. Is there any image editing softwar that you can suggest to combine them? (System: iMac late 2015, OS: Sierra).

                Originally posted by wbuchanan View Post
                Roman Mostazir I'd suggest creating separate images for each group; I ended up using this approach in an article a few years ago and it worked out fairly well.
                Did you mean you combined the separate images?
                Roman

                Comment


                • #9
                  Roman Mostazir I'd check out Inkscape. It has a lot of the same capabilities as Adobe Illustrator. Also if the three models are nested you could consider changing the line styles of the paths that get freed/constrained between the models. In that case you might be able to maximize the information in the diagram without having to take up too much real estate on the page.

                  Comment


                  • #10
                    Thanks wbuchanan. I will check it out Inkscape.
                    Roman

                    Comment

                    Working...
                    X