[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Size of PNG graphs: xsize, ysize don't work
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
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
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?
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
* For searches and help try: