Announcement

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

  • Problem with the Code grqreg

    Dear Stata User,
    After using grqreg code, i saved the graph in word file. Then, I converted word file to PDF file. After converting I am getting this type of image. I am not able to detect where is the problem.

    Code that i have used:
    webuse auto, clear
    qreg price mpg headroom
    grqreg, cons ci ols olsci title(Fig.1a Fig.1b Fig.1c)


    I got this graph in Stata, then, copied and paste in word file. Then I converted into PDF. In PDF, i am surprised with this graph. Word and PDF files are attached.
    Attached Files

  • #2
    Please note advice on attachments at FAQ Advice #12: please, no Word documents (many people here can't even read them) and graphs posted as .png.

    If the graphs look good in Stata and bad in Word, that indicates where the problem lies.

    Comment


    • #3
      Nick, The graph is good in Stata and in word. But, PDF version is not good. I understand the FAQ Advice #12. However, all my research writing is using word. I have done other graphs to examine whether this problem is arising or not, and all other Stata graphs are fine. But problem with the graph when producing using the grqreg. I am posting the graph in .png.
      Attached Files

      Comment


      • #4
        Sure, but you are converting to .pdf in Word as I understand it. That's where the problem lies.

        So, you need an explanation from Word experts, other than "Don't do that, then".

        Comment


        • #5
          I cannot reproduce your problem using Stata 15.1 for Mac, grqreg version 2.1, and Microsoft Word for Mac version 16.15, using "Save as" to create the PDF. Everything is fine for me both in Word and in the PDF.

          I agree with Nick, this is apparently a problem in the creation of the PDF: Word is displaying the graph correctly, but the PDF is not the same as the displayed graph. It's hard to see that as a fault of the Stata code, or even as something that could be controlled within Stata.

          One thing that might make a difference would be to avoid copying from Stata and pasting into Word and instead, in the Stata Graph window, save the graph as a PNG, and then in Word Insert Picture from file and then select the PNG file in the dialog box. The saved image might be enough different from from the copy-and-pasted image that it will work. If not, consider using a different image format than PNG - SVG is often considered to be a good choice.

          Comment


          • #6
            Thank you both of you, now the problem is solved.

            Comment

            Working...
            X