Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: eliminate blank marginal space with - graph, aspectratio(1) -


From   Jacob Wegelin <jwegelin@vcu.edu>
To   statalist@hsphsun2.harvard.edu
Subject   st: eliminate blank marginal space with - graph, aspectratio(1) -
Date   Mon, 2 Feb 2009 14:24:16 -0500

Often I want to create a graph to export as a pdf or eps, for
inclusion in a manuscript. The problem is that, although a command
such as

twoway (scatter y x) (line myfit x), aspectratio(1)
graph export somegraph.pdf, replace

produces a pretty plot, it is surrounded by a lot of blank marginal
space to the left and right of the plot or above and below the plot.
Of course, one could doctor up the resulting image in Photoshop or
some image editing program. But doctoring in Photoshop has the
following disadvantages:

(1) it simply would be more elegant if one could produce, directly
from Stata, a "tight" graphic with no wasted marginal blank space.
Perhaps more important,

(2) an image doctored in Photoshop is merely a collection of pixels,
no longer a vector object.

I've tried messing around with the -xsize- and -ysize- options but
these do not seem to provide any unambiguous way to eliminate blank
space.

I'm working in Stata/MP 10.1 on a MacBook Pro 10.5.5 with 2GHz Intel
Core 2 Duo and 4GB 667 MHz DDR2 SDRAM.

Thanks for any suggestions

Jacob A. Wegelin
Assistant Professor
Department of Biostatistics
Virginia Commonwealth University
730 East Broad Street Room 3006
P. O. Box 980032
Richmond VA 23298-0032
U.S.A.

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   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