Announcement

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

  • New Stata package "resize" to change the graph size but keep the font size unchanged

    Dear all,


    What bothered me in Stata: you change the size of a figure or combine figures -> the font size is rescaled in a strange way.
    With RESIZE you can make figures smaller or bigger and keep the absolute font size unchanged.

    RESIZE is based on GRAPH DISPLAY.
    In addition, there are:
    RESIZECOMBINE based on GRAPH COMBINE, and
    RESIZEC1LEG based on GRC1LEG.

    If you change the size of a figure using graph display or similar commands, Stata automatically rescales the font size in proportion to the minimum out of the figure's height and width. However, this is not desired in many situations.

    When we increase the size of a figure, we often do so to fit more content into the figure. Stata's default rescaling counters that. The new commands keep the absolute font size constant -> we can increase (decrease) the figure's size to show more (less) information.

    Books, articles etc. usually have coherent font sizes. But that’s often not the case for figures. Even in the top Soc Sci journals, there are figures with very different font sizes, even in the same article
    -> some figures are difficult to decipher, other have too large font.

    In Science, Nature etc., font sizes are coherent within and between articles, which improves the reading experience. My new ado makes it easier to control font sizes & make them coherent.

    The ado is really small and simple, but I’m sure there are a couple of bugs in it anyways. If you find some, please let me know; feedback is appreciated!

    the package is on SSC:
    ssc install resize


  • #2
    Dear Ansgar,

    Very interesting and useful addition to the toolbox.
    But, after installation, when I run your help file - Example - 4 code, last line, I get the error:
    Code:
    command grc1leg is unrecognized
    r(199);
    After using findit, I learned that this is another user community contributed package by StataCorp's Vince Wiggins.
    grc1leg is not available from the ssc server but can be installed by using the link that is available after using findit or search (net describe grc1leg, from(http://www.stata.com/users/vwiggins).

    But, grc1leg is from 2010 and has been updated by Vince to a new package, with an ancillary file, grc1leg2 (Version 2.20 21Jun2022).
    However, also grc1leg2 is not available from the ssc server but can be installed by using the link that is available after using findit or search (net describe grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc).

    Probably there will be good reasons for using grc1leg2 in your ado file instead of grc1leg.

    You might want to mention grc1leg or grc1leg2 in your help file as a required package.
    Likewise, also Ben Jann's package grstyle is required.
    Last edited by ericmelse; 26 Jul 2022, 05:48. Reason: correct location of grc1leg and grc1leg2 was added
    http://publicationslist.org/eric.melse

    Comment


    • #3
      Also note that, beginning with the current version, -grc1leg2- includes many resizing options. For example, you can -resize- the entire combined legend or only its markers or labels. Another set of options resizes the text titles in the component graphs. To see the full list of -grc1leg2-'s enhancements, from inside Stata type:

      Code:
      help grc1leg2##description
      Thanks to Marc Kaulisch for suggesting the need for resizing the elements of the combined legend, especially the markers.

      Comment


      • #4
        Mead Over I am using StataNow/SE 18.5 and am unable to download -grc1leg2-. I get an error saying:
        http://digital.cgdev.org/doc/stata/MO/Misc/ either
        1) is not a valid URL, or
        2) could not be contacted, or
        3) is not a Stata download site (has no stata.toc file).

        r(679)

        Has something changed on your website? Or is this an issue with StataNow not being able to talk nicely with your website? I'm really needing your package so that I can adjust the size of my plots easily.

        Comment


        • #5
          amandacpac Sorry not to get back to you sooner. Indeed our website was not compliant with the Stata web crawler for a few days. It is again compliant and you should now be able to search for CGD programs like -grc1leg2- without problem. Please let me know if -grc1leg2- helps with the re-sizing issue you faced.

          TL/DR details:

          Beginning around July 20, when our IT guys enhanced our site's security with CloudFare, Stata's web crawler was no longer able to find CGD's -stata.toc- files. Finding, downloading and updating -grc1leg2- (and other CGD programs), still worked, with the following commands, which do not depend on the visibility of our site to Stata's web crawler.

          Code:
          net describe grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
          Code:
          net install grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
          Code:
          ado update grc1leg2, update
          However the command:
          Code:
          search grc1leg2
          would fail, producing the error message that you have copy/pasted in #4.

          For those interested, CloudFare's web site suggests that web crawler's like that used by Stata should register with CloudFare.

          While Stata is considering registering with CloudFare, our IT guys have implemented Stata's suggestion that we at CGD create a CloudFare access rule for the IP address of Stata's crawler. That tweak to our site seems to have allowed Stata's search engine to find us again. Stata helpfully lists the DIY user sites currently visible to and searched by its web crawler. You can see these sites by issuing the Stata command:
          Code:
          net from http://www.stata.com/users/
          .

          Comment


          • #6
            Mead Over I just tried the net install command that you provided, and that produced the same error. Same thing happens with net describe or when I click the link after the search grc1leg2 command. I tried restarting Stata, as well, and got the same error.

            Comment


            • #7
              I can confirm to have the same issues.
              http://publicationslist.org/eric.melse

              Comment


              • #8
                Thanks to amandacpac and to ericmelse for confirming. Hmmm. I will try to sort out what's going on.
                Last edited by Mead Over; 08 Aug 2024, 09:41.

                Comment


                • #9
                  The issues with our site should now be resolved. Thanks again to amandacpac to ericmelse for flagging our probem and to technical support from Derek Wagner Derek Wagner (StataCorp) and from CGD's Michael Brown for sorting it out, All of the following commands should now succeed in finding -grc1leg2-.

                  Code:
                  net describe grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
                  net install grc1leg2, from(http://digital.cgdev.org/doc/stata/MO/Misc)
                  ado update grc1leg2, update
                  search grc1leg2
                  Thanks to KitBaum , the command -search grc1leg2- should soon list two download sites, ours at CGD and also SSC.

                  If anyone attempting to download from our site again has problems, I would be grateful for a heads-up.

                  Mead
                  Last edited by Mead Over; 12 Aug 2024, 09:40.

                  Comment


                  • #10
                    Dear Mead,
                    This note just to confirm that I now am able to net install just fine.
                    Thanks to you all for taking care.
                    http://publicationslist.org/eric.melse

                    Comment

                    Working...
                    X