Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: Export to WMF/EMF


From   ariley@stata.com (Alan Riley)
To   statalist@hsphsun2.harvard.edu
Subject   st: Re: Export to WMF/EMF
Date   Mon, 23 Feb 2004 18:47:55 -0600

Friedrich Huebler (huebler@rocketmail.com) experienced problems
exporting a graph containing a very large amount of data to
emf or wmf format (you can read his full email after my
signature below).

After experimenting here and reproducing Friedrich's problem,
I sent him a test executable which may solve the issues he was
experiencing.  After he has had a chance to confirm that, we'll
report back to Statalist on the issue.


--Alan
ariley@stata.com)

> When a graph contains a large amount of data, Stata has problems
> exporting the graph to WMF and EMF format as the following commands
> demonstrate. I initially observed this behavior with -tabplot- but
> was able to reproduce it with -scatter-.
>
> set mem 5m
> set scheme s2color
> sysuse auto
> expand 1000
> bysort mpg: gen freq = _N
> scatter mpg weight, mlabel(freq)
> graph export graph1.wmf
> graph export graph2.wmf
> graph export graph3.wmf
> 
> The first exported WMF graph (graph1.wmf) looks almost identical to
> the one drawn by Stata but most frequency labels have shifted to a
> different position. The other two graphs (graph2.wmf and graph3.wmf)
> are entirely blue. In the case of -tabplot-, the labels were also
> misaligned and the second and third exported graphs had the wrong
> colors (blue plot region that should be white, blue bars that should
> be red).
> 
> set mem 5m
> set scheme s2color
> sysuse auto
> expand 1000
> bysort mpg: gen freq = _N
> scatter mpg weight, mlabel(freq)
> graph export graph1.emf
> graph export graph2.emf
> graph export graph3.emf
> 
> When these commands are executed, Stata reports that the graphs are
> exported ("file C:\...\graph1.emf written in Enhanced Metafile
> format") but no EMF files are created.
> 
> Can others reproduce this behavior? Is this due to a limitation of
> Stata or Windows? I use Stata 8.2 with the latest updates and Windows
> XP Professional SP 1.
> 
> Friedrich Huebler
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index