Statalist


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

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


From   Friedrich Huebler <[email protected]>
To   [email protected]
Subject   Re: st: eliminate blank marginal space with - graph, aspectratio(1) -
Date   Mon, 2 Feb 2009 16:41:13 -0500

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))

Friedrich

On Mon, Feb 2, 2009 at 4:01 PM, Scott Merryman <[email protected]> wrote:
> The aspect ratio changes plot region of graph but does not change the
> size of the graph.  See -help aspect_ratio- :
>
> "   The overall size of the graph is not changed by the aspectratio()
> option.  Thus constraining the
>    aspect ratio will generally leave some additional space around the
> plot region in either the
>    horizontal or vertical dimension."
>
> You can use the -graphregion(margin())- option to remove the margin
> between the inner and outer regions.
>
> Perhaps something like this:
>
>  sysuse auto,clear
>  scatter mpg price || lfit mpg price,  ///
>   graphregion(margin(zero )) xsize(4) ysize(4.5) aspect(1) scheme(s1mono)
>
>
> Scott
>
> On Mon, Feb 2, 2009 at 1:24 PM, Jacob Wegelin <[email protected]> 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.
*
*   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