overlay with different scales but common 0 axis?

For questions and discussion related to graphs, reports, and other output, including issues related to presenting or publishing results.
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

overlay with different scales but common 0 axis?

Unread post by tclark »

With charts that use two scales via overlay and related options, is there a way to have two scales but force the series to be plotted using the same aligned vertical axis at 0? If I just use overlay without same scale, the 0 axis for the ovcount series will normally differ from where the 0 axis is for the other series. Is there a way to have them use the same 0 but still have different scales apart from that? Thanks.
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: overlay with different scales but common 0 axis?

Unread post by TomDoan »

You should be able to tweak it with MAX, MIN, OMAX and OMIN options. (If you think about it, the only way to do that is to pad the range of one of the series on the positive side and pad the other on the negative side.)

Code: Select all

set big 1 100 = %ran(10.0)
set little 1 100 = %ran(1.0)
ext big
compute bigmax=%maximum,bigmin=%minimum
ext little
compute littlemax=%maximum,littlemin=%minimum
compute bigmax=%max(bigmax,-bigmax)
compute littlemax=%max(littlemax,-littlemin)
graph(overlay=dots,max=bigmax,min=-bigmax,omax=littlemax,omin=-littlemax) 2
# big
# little
tclark
Posts: 99
Joined: Wed Nov 08, 2006 3:20 pm

Re: overlay with different scales but common 0 axis?

Unread post by tclark »

Great -- thanks very much
Todd Clark
Economic Research Dept.
Federal Reserve Bank of Cleveland
Post Reply