This is a follow-up to my earlier question about the behaviour of graph export in the Mac version of Stata.
In an assignment for my intro biostats class, students are expected to export some graphs to png files. I was expecting them to use graph export, like this:
But some of them are using graph save instead, like this:
As noted in the previous thread, I use the Windows version of Stata, but many of my students use the Mac version. In a meeting with one of the Mac users today, I observed that when we used graph export with a file name that included two periods (A.Birthday_Problem.png), Stata treated everything after the first period as a file extension, and execution stopped. When I became aware of that, I advised Mac users to change the first period in the file name to an underscore (A_Birthday_Problem.png), and that seemed to fix things. I concluded that the Mac OS does not allow periods in file names apart from the final period before a file extension.
But then today, with graph save (and the same file name), everything was fine. So now I suspect some inconsistency between graph export and graph save.
Can any Mac users duplicate what I have described? Here's a silly little example you can try.
Thanks,
Bruce
In an assignment for my intro biostats class, students are expected to export some graphs to png files. I was expecting them to use graph export, like this:
Code:
graph export "$myfolder/Figures/A.Birthday_Problem.png", as(png) replace
Code:
graph save Graph "$myfolder/Figures/A.Birthday_Problem.png", replace
But then today, with graph save (and the same file name), everything was fine. So now I suspect some inconsistency between graph export and graph save.
Can any Mac users duplicate what I have described? Here's a silly little example you can try.
Code:
clear * sysuse auto histogram rep78, discrete graph export "auto.rep78.v1.png", replace as(png) graph save Graph "auto.rep78.v2.png", replace erase "auto.rep78.v1.png" erase "auto.rep78.v2.png"
Bruce
Comment