Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Graph Combine and Aspect Ratios


From   "Allan Reese (Cefas)" <allan.reese@cefas.co.uk>
To   <statalist@hsphsun2.harvard.edu>
Subject   Re: st: Graph Combine and Aspect Ratios
Date   Wed, 11 Jul 2007 10:20:32 +0100

I was stunned to see this topic on Statalist as only yesterday I reported a bug to Tech Desk with the same title.  In my case each single graph looked fine, but, when combined, the axis titles overwrote the axis labels.  The workround was to add "nodraw" and "name" to each sub-graph.  Then the combined plot had each graph the same size with correctly positioned labels.  It seems related to windowing.  Try adding nodraw to your first two commands.

On the way, I found that "xsize(5) ysize(5)" did not give equal-length axes when printed.  A small discrepancy but measurable.  I guess it's related to fitting in the titles, but it appears you need aspectratio(1) to apply to the plotting area.

Happy statting
Allan 

- --- Thomas Speidel <thomas@tmbx.com> wrote:

> I have generated two graphs, one of the form:
> 
> graph twoway tsline somevar,
> xsize(15) ysize(5.5);
> 
> and the other of the form:
> 
> graph twoway bar someothervar date,
> xsize(15) ysize(3);
> 
> to be combined using graph combine:
> 
> graph combine tslinegraph.gph bargraph.gph,
> imargin(small)
> rows(2)
> xsize(11)
> ysize(8.5)
> ;
> 
> I would like to have the bar graph at the bottom so that is roughly
> half 
> the height of the time series graph on top.  Even though I played
> around 
> with the individual and the combined graphs' aspect ratios, I don't
> seem 
> to be able to achieve this.
> 
> Thomas
> *
> *   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/
> 


***********************************************************************************
This email and any attachments are intended for the named recipient only.  Its unauthorised use, distribution, disclosure, storage or copying is not permitted.  If you have received it in error, please destroy all copies and notify the sender.  In messages of a non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect those of the organisation from which it is sent.  All emails may be subject to monitoring.
***********************************************************************************


*
*   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/



© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index