Announcement

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

  • Labels in the yaxis in PDF files are missing for unknown reasons

    Hi, listers

    I created a picture:

    sysuse sp500, clear
    scatter open close, msize(*.25) mcolor(*.6) ||
    function y=x, range(close) yvarlab("y=x") clwidth(*1.5)

    and saved Stata graph file as .gph, .emf, and wmf. Then pasted these pictures into a Ms Word, then the word file was saved as a PDF file. I found the labels in the yaxis of the pictures in PDF file are missing. if I saved the pictures as .tiff, .ps, .eps, format, everything is ok.
    Is it a bug?

  • #2
    I've been bitten by it too, both Word 2010 and 2013. I think that it's the y-titles that are stripped off, not the labels.

    I can't remember why now, but for some reason I always believed that the problem lies with Word, and so never bothered to mention it to technical support.

    How do you read a .ps or .eps file into Word?

    Comment


    • #3
      Yes, it is really a problem. You can simply directly copy and paste .ps and .eps format figures into the Word. I tried exporting .emf .wmf format from other packages such as Mathematica and Matlab, there is no such problem. So I suspect it is a bug of Stata.

      Comment


      • #4
        Do the other packages orient the y-axis title vertically? It seems to be a problem only with vertically oriented text. See the attachments. (A do-file that creates the two graphs, one with vertically and one with horizontially oriented y-axis titles; the two .emf graph export files;* the Microsoft Word 2010 file into which the two .emf files were inserted using Insert|Picture; and the Adobe PDF file created from the Word file with File|Save As.)

        If it's a problem with Stata, then it's some sort of subtle bug involving missing tags for vertically oriented text, tags that Word needs to save the image as a PDF file, but doesn't need to display the image correctly, because there's no problem in the display of the Stata-generated graph in the Word document, itself. The problem arises only in saving the Word document as a PDF file.

        If the other software packages that you mention have no trouble with vertically oriented y-axis titles, then it seems to be a problem peculiar to Stata's rendition of graphs to vector image formats. It will be worth opening a ticket with StataCorp's technical support if that's the case.

        *Here we go again. I get the "Invalid file" error with the .emf files when I try to attach them. So these are zipped and the zip file's file extension is changed to .png. Just rename it after downloading in order to unzip the two .emf files. Or you can create them de novo from the do-file.
        Attached Files

        Comment


        • #5
          I tried and you are right, it may be a problem only with vertically oriented text. Other software packages I tried always orient y-axis titles horizontally.

          Comment


          • #6
            Can you get Mathematica or Matlab to orient their y-axis titles vertically? It would be good to pin this down to either a problem with Stata or (as I had always believed) Word. If the former, then I'll take it upon myself to contact StataCorp's technical support with the details. If the latter, well, then I suppose we're all S.O.L. (Microsoft ain't StataCorp when it comes to bug fixes.)

            Comment


            • #7
              I tried plotting y-axis vertically in Matlab. It can work. see attached. you can replicate the results using yticklabel function downlaod from here: ftp://ftp.inf.fu-berlin.de/pub/bkell...label_rotate.m

              Attached Files

              Comment


              • #8
                Hello,

                Thought I'd get in on this as I have had similar problems in the past. A colleague recently had a chart where, after it was saved to a pdf using Word, the lines representing the confidence interval for a fitted line had been extended past the y-axis. So this might be a different problem to that described in other posts.

                I have also discovered that even if I can't save as a pdf using Word, I have no problem creating a pdf from the Word document using Adobe Acrobat 8 Standard. I don't know if this indicates that it is a problem with how Word is creating the pdf rather than the Stata chart itself.

                Gillian

                Comment


                • #9
                  I had this problem in the past too.
                  I found that right clicking on the .gph graph pasted into Word and then choosing something like "Edit the picture" option (which converts the picture into the MS Offfice object) was doing the job - the label in the pdf produced by Word was exactly as in the .gph file.

                  Hope that helps,
                  Michal

                  Comment


                  • #10
                    Hit by the problem of missing ytitles when trying to import EMF (Enhanced Metafile) files produced by Stata18 in LibreOffice 7.6
                    Solved loading them in Irfanview and saving them back (sic!) in the same format

                    Comment

                    Working...
                    X