Announcement

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

  • Mac version: -graph export- command not echoed to Review window after Save-As png via menu

    Greetings list members. I currently use the Windows version of Stata 15.1 (IC), but many of my students are using the Mac version. In an assignment, they need to write some graph export commands. In an effort to make things easier for those who are not strong coders, I suggested that they do a manual Save-As (with type = png) via the Graph window menu, and then copy the graph export command from the Review window, paste it into their DO-file, and edit as needed. This works for me with the Windows version. But alas, some of the Mac users have told me that it does not work for them: They say that the graph export command does not appear in the Review window.

    I have two questions.
    1. Can any of you Mac users out there confirm that graph export does not get echoed to the Review window?
    2. If it does not get echoed, is there some way to fix the problem (some setting to change, for example)?
    Here's a quick and dirty example you can try.

    Code:
    clear *
    sysuse auto
    histogram mpg
    * Manually save graph as png via Save-As in the Graph window.
    * Then copy the -graph export- command from the Review window.
    graph export "C:\Temp\mpg_histogram.png", as(png) replace
    Thanks,
    Bruce
    --
    Bruce Weaver
    Email: [email protected]
    Version: Stata/MP 18.5 (Windows)

  • #2
    Stata is a bit inconsistent when it comes to exporting graphs among the different platforms. In this case, Stata for Mac currently does not output a command when exporting to PNG because it does it natively and immediately rather than rely on outputting a -graph export- command to do it (FYI: -graph export- to PNG format on Mac actually calls native Mac code rather than Stata code for exporting).

    There has been a request inside StataCorp that we make graph exporting be consistent across all platforms. There has been progress on this but I have no timeline for when this will be released.
    -Chinh Nguyen

    Comment


    • #3
      Thanks for that, Chinh. I'll let my Mac-using students know they've not done anything wrong! ;-)

      Bruce
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment

      Working...
      X