Announcement

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

  • Editing bar charts

    Hey there,
    I'm still using Stata 14.2 and have a question on graphics, especially bar charts. How do I extend the space between the x-values? In "axis label properties (Major)", I have already change the angle to 90° and the size of the values to "v. small", but the "text gap" only changes the space to the axis itself .

    And another question: Is it possible to type the 3 adressed commands, so I dont have to "manually" change it over the "drag and drop" method in "axis label properties (Major)" -- for 12 charts?

    Many Thanks
    Gerrit Frye

  • #2
    Welcome to the Statalist/Stata Forum


    Please read the FAQ, particularly on how to post a question. You may wish to share data - or mock example - under CODE delimiters or by installing the SSSC dataex.
    I have a question on graphics, especially bar charts. How do I extend the space between the x-values?
    You may wish to try something like:
    Code:
    sysuse auto
    graph bar (mean) mpg, over(rep78)
    graph bar (mean) mpg, over(rep78, gap(10))
    graph bar (mean) mpg, over(rep78, gap(200))
    Hopefully that helps.

    Best regards,

    Marcos

    Comment


    • #3
      Unfortenutaley, it was not the Point, so I tried to upload the Chart, which I want to edit. In this Chart, the spaces between the Country names on the x axis shall widen, because they a bad to read. As I see, the command (gap(1)) only widens the space between the bars.

      Thanks for helping
      Attached Files
      Last edited by Gerrit Frye; 12 Jun 2017, 05:21.

      Comment


      • #4
        Please do read the FAQ. There, you may find how to share graphics as well. This is surely the best way to entice helpful replies.
        Best regards,

        Marcos

        Comment


        • #5
          I have uploaded the graph as .png-file as its recommended in the FAQ. The Code was
          Code:
          graph bar (asis) max_Erdbeben max_Überflutungen max_Flächenbrände max_Unwetter, over(Country) over(medium) nofill
          So in this Chart, the spaces between the Country names on the x axis shall widen, because they are bad to read. As I see, the command
          Code:
          ..., gap(10)
          only widens the space between the bars.
          Attached Files

          Comment


          • #6
            Originally posted by Gerrit Frye View Post
            So in this Chart, the spaces between the Country names on the x axis shall widen, because they are bad to read.
            You want more space between the labels but where should this space come from? Your options include (a) using a smaller font or (b) increasing the width of the graph. For more concrete advice please provide a reproducible example, as recommended by Marcos.

            Comment


            • #7
              I'd rotate to horizontal. Readability is already perilously low.

              This question https://www.statalist.org/forums/for...bles-on-x-axis has several similarities.

              Alphabetical ordering of countries is good for dictionaries and gazetteers, but is it needed or helpful here?

              Comment

              Working...
              X