Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: xlabels and graph with 2 y-axis

From   "Grote, Veit Dr." <>
To   <>
Subject   st: xlabels and graph with 2 y-axis
Date   Thu, 21 Aug 2003 15:44:55 +0200

I have a simple graph that does not come out as I want to (Stata 8.1).
I have a labeled categorical variable which I would like to use as my x-axis, and two numerical variables of different scales (2 y-axis). One should be expressed in bars and one as a line/connected line (as in the frequency polygon example in Statalist just recently).

1. First problem: Why is the scale of the bars cut (in my data at 30, so that the lower range 0-30 is not displayed) whereas the scale of the 2nd y-axis is for the whole range of the data? OK, I fixed that with options scale/range.
2. Second problem: I am unable to display the labels of the x-axis? What is the trick? One desperate try was:

twoway bar y1 x || connected y2 x, xlabel(#7, valuelabels) yaxis(2)

Thanks for your help
Veit Grote

Dr. Veit Grote, MSc
Klinikum der Universität München
Dr. v. Haunersches Kinderspital
Lindwurmstr. 4
D-80337 München
Tel.: +49 (89) 5160-7798
Fax: +49 (89) 5160-2951

*   For searches and help try:

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