Page 1 of 1
overlay with different scales but common 0 axis?
Posted: Fri Aug 21, 2020 3:09 pm
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.
Re: overlay with different scales but common 0 axis?
Posted: Sat Aug 22, 2020 5:47 pm
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
Re: overlay with different scales but common 0 axis?
Posted: Sat Aug 22, 2020 7:04 pm
by tclark
Great -- thanks very much