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

From |
Philipp Rehm <philipp.rehm@gmx.de> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: graph -by- option |

Date |
Tue, 11 Aug 2009 09:07:18 +0100 |

. One possible workaround may be to add fake-observations to your dataset. Here is an example: sysuse auto, clear set obs `=_N+1' replace foreign = 0.5 in `=_N' twoway scatter rep78 mpg, by(foreign, cols(3)) HTH, Philipp Maarten buis wrote:

--- On Mon, 10/8/09, Jeph Herrin wrote:I am making a series of graphs, each of which includes of a -by- over a 3 valued variable Z. Three plots are produced in a single row. For some graphs, the second value of Z (Z=2) has no data, so there are only 2 plots. I would like -by- to produce a 1x3 layout, with -hole(2)-, but this doesn't seem to be doable. I have only been able to produce either 1) 2 plots, with no hole in the middle or 2) 3 plots, the center one with no data. Is there a way to trick -by- into leaving a hole in the middle position? I realize that -graph combine- might solve this problem, but it has a separate problem in that I cannot omit the axes between plots.I have no solution, just an example of what Iexpected to produce the graphs you want (two graphsin a row with a blank spot in the middle), butdidn't. Maybe this example code inspires someone.*------- begin example ----------- sysuse auto, clear twoway scatter rep78 mpg, /// by(foreign, cols(3) holes(2)) *--------- end example ----------- Hope this helps, Maarten ----------------------------------------- Maarten L. Buis Institut fuer Soziologie Universitaet Tuebingen Wilhelmstrasse 36 72074 Tuebingen Germany http://home.fsw.vu.nl/m.buis/ -----------------------------------------* * 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/

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

**Follow-Ups**:**AW: st: graph -by- option***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**References**:**Re: st: graph -by- option***From:*Maarten buis <maartenbuis@yahoo.co.uk>

- Prev by Date:
**st: -mi- & Factor Variables** - Next by Date:
**AW: st: graph -by- option** - Previous by thread:
**Re: st: graph -by- option** - Next by thread:
**AW: st: graph -by- option** - Index(es):

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