Announcement

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

  • Margins and aspect ratio

    When using aspectratio(0.4), even zeroing margins inside the graphregion() command doesn't remove the extra top and bottom margins.

    If you are dealing with a .eps figure, this is especially annoying because you require some fancy software to manually remove margins.

    Does anyone know how to solve this problem? I know that aspectratio doesn't change the graph size, but isn't there any user-written command that may adjust this?

    Example code to generate an empty graph with top-bottom margins:

    Code:
    gen z =0
    gen y=0
    twoway (line y z, aspectratio(0.4)), graphregion(margin(0 0 0 0))

  • #2
    No solution for this?

    I'm resorting to CorelDraw to remove whitespaces right now... There must be a way to remove this whitespace in Stata...

    Comment


    • #3
      You gave up quickly. Remember that there are different time zones. You asked the question at 20:13 my time (I was bringing my kids to bed) and gave up on 22:41 (I was putting away the weekly groceries I just bought). So I would not give up for at least 24 hours, so people from all time zones could have chance to see your question.

      This is quite a specific question that touches on the inner workings of Stata. It is possible that someone on this list knows the answer (I don't), but Stata's techsupport is more likely to be able to help you: https://www.stata.com/support/faqs/t...-tech-support/
      ---------------------------------
      Maarten L. Buis
      University of Konstanz
      Department of history and sociology
      box 40
      78457 Konstanz
      Germany
      http://www.maartenbuis.nl
      ---------------------------------

      Comment


      • #4
        Try this
        Code:
        twoway (line y z, aspectratio(0.4)), plotregion(margin(zero))

        Comment


        • #5
          Originally posted by Maarten Buis View Post
          You gave up quickly. Remember that there are different time zones. You asked the question at 20:13 my time (I was bringing my kids to bed) and gave up on 22:41 (I was putting away the weekly groceries I just bought). So I would not give up for at least 24 hours, so people from all time zones could have chance to see your question.

          This is quite a specific question that touches on the inner workings of Stata. It is possible that someone on this list knows the answer (I don't), but Stata's techsupport is more likely to be able to help you: https://www.stata.com/support/faqs/t...-tech-support/
          Hi Maarten, thanks so much for your suggestion. I'll contact the technical support.

          Do note though that my original posting was on Sep. 18, so I actually waited 2 weeks before bumping the post.

          Comment


          • #6
            Hello Statalist community,

            Did you ever figured out how to delete that space /reduce the margin between the categories and the plot region after changing the aspect ratio?
            I've been playing around with the different plot region and graph region options and with the graph editor, but I can't find a way to solve it.

            Thank you,
            Ana

            Comment


            • #7
              Re: #6 Did you try the option
              Code:
              plotregion(margin(zero))
              It worked for me with the example given in #1.

              Comment

              Working...
              X