[Thread Prev][Thread Next][Index]
[ferret_users] looping through viewports
Hi,
i'm trying to write a ferret script that can plot varying-length timeseries in sections, i.e., for 40 years of monthly data make 4 plots, for 100 years of monthly data make 10 plots, etc. I can do most of this in a repeat/range loop, but the one part I can't figure out is how to loop through viewports. I just want to loop through an array, arr[1], arr[2], arr[3] arr[4], arr[1], arr[2], etc etc - at least, that's how I'd do it in other languages. I was wanting 4 plots/page, ul (upper left) ur, ll, lr.
something like this:
let f = {"ul","ur","ll","lr"} !how do I address the elements of this list?
let c =1 !montlhly data counter
repeat/range=`startyear`:`endyear-10`:10:name=m (let g = `c+120`; !120 months = 10yrs ; set viewport ???? ; plot data[`c`:`g`] ; label/nouser 0,4,-1,0,.15 Title Year `m` to `m+10`; let c=`g`)
frame/file=plots.gif
I was also wondering if after 4+ iterations of this loop that the resulting gif file will have multiple pages, or will the last 4 plots overwrite any previous ones?
thanks for any help you can give,
jenny
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement