I've been working on a by-group time series plot and have rescaled the yaxis given the different value ranges within the group. However, I don't seem to be able to include a zero in the axis range.
For example
gives the plot including the zeros in the range of the y-axis.
I want to rescale the y axes because the data I have is quite different by value in the by panel.
For example, let's put Sam on a diet and rescale the y axis in the resulting plot
After having done this, I can't seem to control the range to include zero. The -range(0) seems to have no effect and placing it in the by statement gives an error.
Do I have any options to control the range of the rescaled axis to include zero (there are no valid zeros in the data I'm using).
Thanks for any help. I could recreate this panel graph by graphing independently and combining the graphs, but it would be handy not to do that.
-cam
For example
Code:
sysuse xtline1 tsset person day tsline calories if day>=td(22oct2002) & day<=td(31dec2002),by(person, col(1)) ylab(#4, angle(0)) ysc(range(0))
I want to rescale the y axes because the data I have is quite different by value in the by panel.
For example, let's put Sam on a diet and rescale the y axis in the resulting plot
Code:
replace calories=calories/3 if person==2 tsline calories if day>=td(22oct2002) & day<=td(31dec2002),by(person, col(1) yrescale) ylab(#4, angle(0)) ysc(range(0))
Do I have any options to control the range of the rescaled axis to include zero (there are no valid zeros in the data I'm using).
Thanks for any help. I could recreate this panel graph by graphing independently and combining the graphs, but it would be handy not to do that.
-cam
Comment