Statalist


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

st: RE: AW: RE: axis(1) and axis(2) scales in graphs


From   "Nick Cox" <[email protected]>
To   <[email protected]>
Subject   st: RE: AW: RE: axis(1) and axis(2) scales in graphs
Date   Tue, 26 Jan 2010 17:09:05 -0000

I certainly understood that Leandro wants zeros on two axes to be
aligned. 

What I didn't (don't) understand why that is problematic in Stata when
there are solutions of (1) just plot data as they come (2) divide one
series by a constant so it's comparable with the other. I wouldn't even
touch the range sub-option.

Nick 
[email protected] 

Martin Weiss

" I am not completely clear what the problem is"

Actually, I found the problem exceptionally clear in this case:

*************
clear*
set seed 123456
set obs 100
gen time=_n
gen serieA=rnormal()
gen serieB=rnormal(1,2)
tw (line serieA time, yaxis(1) yli(0)) (line serieB time, yaxis(2)) 
*************

I just did not know how to align the zero point on the left and right
axis,
to be honest...

Nick Cox

I am not completely clear what the problem is, but it seems that just
dividing one series by some constant might be simpler for you. 

Is either series ever negative? 

Nick 
[email protected] 

Leandro Brufman

I am doing a -graph twoway line- with depicting two series over time
with different axis
- graph twoway (line serieA time, yaxis(1)) (line serieB time, yaxis(2))
-

I would like to have both axis(1) and axis(2) with the same "zero
level".  That is, I would like both axis to be zero at the exact same
point in the graph.
I am repeating this graph for many samples, so fiddling with -range
suboptions- is not very helpful.


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

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



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