Announcement

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

  • wmf's coming up blank

    I am trying to export a graph as a Windows Metafile, but the resultant image is blank. Specifically, all I get when I open the file in MS Paint (or MS Publisher) is the default Stata blue colour. I can produce a wmf fine using MS Publisher, so it must be a Stata issue. I am using the 64-bit Stata 15 for Windows. When colleagues run the same file they don't get any problems.

  • #2
    wmf is an very old Microsoft WindowsMetafile format. It does not supports color transparency. As Stata 15, we moved the graphics engine to use Direct 2D and GDI+, which don't support wmf any more.

    You have two choices, one is using emf, which is Microsoft Enchanced Metafile format. You should be able to use emf in Microsoft office instead of wmf.

    Another way is to set the Stata 15's graph render on Windows back to old GDI, then you should be able to export wmf again. Note, color transparency does not work using GDI render.

    Code:
    set graph_render gdi
    sysuse auto
    sc mpg price
    graph export test.wmf
    You may set graph render back by

    Code:
    set graph_render default

    Comment


    • #3
      We will correct the problem with exporting to WMF as you should not have to change the graph renderer when doing so. There are still some issues exporting to WMF even after switching the graph renderer to GDI which we will correct in a future update. Setting the graph renderer is not something any user should ever have to do and the export to WMF problem is just a bug.

      As mentioned by Hua, you should stop using WMF and switch to EMF anyway.
      -Chinh Nguyen

      Comment


      • #4
        Hi -- sorry for the delay replying. Thanks, this is really helpful.

        Comment


        • #5
          Bonjour,

          With Stata 15, exporting in either EMF and WMF format is currently failing for us. PNG works. Looking forward an update to fix this issue.

          Thank you

          Arnaud Atoch

          Comment


          • #6
            Originally posted by arnaud atoch View Post
            With Stata 15, exporting in either EMF and WMF format is currently failing for us. PNG works. Looking forward an update to fix this issue.
            They both work for me.

            At the command line in Stata, type
            Code:
            update all
            and report back.

            Comment

            Working...
            X