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

From |
René Geppert <geppert.rene@googlemail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: RE: Formatting a twoway graph with different scaled y axes |

Date |
Mon, 08 Dec 2008 21:03:27 +0100 |

Here you go. var1 var2 Quarter .485 28.37 1 .637 25.14 2 1.131 24.62 3 1.364 19.57 4 1.526 3.94 5 1.791 3.56 6 Nick Cox schrieb:

Please give a minimal example of a relevant dataset.Nickn.j.cox@durham.ac.ukRené Geppert I am using Stata/SE 10 for Windows. I generated a graph using the following (simplified) code:. twoway (bar var1 Quarter, yaxis(1) yscale(range(0))) (line var2Quarter, yaxis(2) )I do so in order to obtain two y-axes (left and right hand side) with adifferent scale. To format the graph properly I experienced two problems:a) Both axes start at their minimum values, which I can fix for the lefthand side y-axis using yscale(range(0)), which does not work for theright hand side y-axis for some reason. Why is that and how can Iachieve the same effect there?b) var 1 and var 2 have 6 observations (at each instance of Quarter).How can I get a label at each instance in the graph for the line and barplot, respectively? That is, show the observation values for exampleinside each bar and above the line. The blabel option which one canusually use in a bar graph does not work in the twoway bar version.* * 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**:**RE: st: RE: Formatting a twoway graph with different scaled y axes***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**References**:**st: Formatting a twoway graph with different scaled y axes***From:*René Geppert <geppert.rene@googlemail.com>

**st: RE: Formatting a twoway graph with different scaled y axes***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**Re: st: Re: Formatting a twoway graph with different scaled y axes** - Next by Date:
**Re: st: RE: lambda--p-value** - Previous by thread:
**st: RE: Formatting a twoway graph with different scaled y axes** - Next by thread:
**RE: st: RE: Formatting a twoway graph with different scaled y axes** - Index(es):

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