Statalist


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

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


From   Svend Juul <[email protected]>
To   <[email protected]>
Subject   Re: st: eliminate blank marginal space with - graph, aspectratio(1) -
Date   Tue, 3 Feb 2009 19:59:13 +0100

 
 
Jacob wrote:
 
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.

Friedrich suggested:
 
The margins can be fine-tuned with the margin(# # # #) syntax. See
-help marginstyle-.
 
. scatter mpg price, graphregion(margin(2 2 2 2)) plotregion(margin(0 0 0 0))
 
========================================================
 
Jacob wants (a reasonable wish) to be able to define the plot
aspect ratio and at the same time eliminate blank marginal space.
Friedrich's suggestion did not include the aspectratio() issue, and
in the following command, the blank space is not eliminated:
 
   scatter mpg price, graphregion(margin(0 0 0 0)) aspectratio(1)
 
I don't think it can be done from syntax except by using the
trial-and-error method. It requires that the contents of a graph 
could affect its overall size, overriding any explicit or implicit
xsize() and ysize() options. I don't think it can be done.
 
This didn't help much
Svend
 
________________________________________________________ 
 
Svend Juul
Institut for Folkesundhed, Afdeling for Epidemiologi
(Institute of Public Health, Department of Epidemiology)
Bartholins Allé 2
DK-8000 Aarhus C,  Denmark 
Phone, work:   +45 8942 6090 
Phone, home:   +45 8693 7796 
Fax:           +45 8613 1580 
E-mail:        [email protected] 
_________________________________________________________ 

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index