I would like to export graphs to PNG format with a specific size, for
example 500 by 375 pixels. Apparently the only way to get this size
is through trial and error by repeatedly resizing the graph window,
exporting the graph, and checking its size in an image viewer.
The xsize(#) and ysize(#) options don't have an effect, at least when
the ratio x/y doesn't change. David Harrison mentioned this in a post
to Statalist last month
(http://www.stata.com/statalist/archive/2005-02/msg00309.html). You
can try this yourself:
. sysuse auto
. scatter mpg weight, xsize(5) ysize(4)
. scatter mpg weight, xsize(2.5) ysize(2)
. scatter mpg weight, xsize(2.5) ysize(1)
. scatter mpg weight, xsize(5) ysize(2)
The first two -scatter- commands draw graphs of exactly the same
size, as do the last two -scatter- commands. The graph changes from
the second to the third -scatter- command because the ratio x/y is
different.
Has anyone found a way to create PNG graphs of a specific size that
doesn't require manual resizing of the graph window? Does Statacorp
plan to add an option to specify graph size in pixels?
Thank you,
Friedrich Huebler
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
*
* 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/