HI ferreters,i got one more doubt while plotting the swath of 1 standard deviation about the mean. i used such commands for doing this but i am not sure whether ferret doing it in a right way or not. A little help is needed for to understand this.
use all_anm.nc
let ohcg_g1=ohcg1_anm_all[d=1,x=@ave,y=@ave]/10^21 !! mean of variable in the basin
let ohcg_g1_std=((ohcg1_anm_all[d=1,x=@ave,y=@ave,l=@var])^0.5) !! standard deviation
plot/thick/axes/set/nolab/nokey/vlimits=-1.5:1.5:0.3 ohcg1
go plot_swath poly/ov/pal=grey_light/nolab/nokey ohcg1-ohcg_g1_std, ohcg1+ohcg_g1_std
plot/thick/col=black/noaxes/nolab/nokey/ov ohcg1 please suggest is it the correct way to plot +/- 1 standard deviation limit around the mean for uncertainty ? is ferret plotting in the correct way what i meant to plot ?i hope i did right but i need simple assurance.regards, saurabh
On Thu, Dec 22, 2016 at 11:12 AM, saurabh rathore <rohitsrb2020@xxxxxxxxx> wrote:Thank a lot Ansley,its working superbly i can manipulate the crowding now.thank you once againregards, saurabhOn Thu, Dec 22, 2016 at 10:51 AM, Ansley C. Manke <ansley.b.manke@xxxxxxxx> wrote:Hi,
The error-bars script is just doing the plotting step, given the time steps, and the length of the bars. So you're sending the script these arguments:
! Usage: $1 $2 $3 $4 $5
! yes? GO error_bars plot_command base errors [err_down] ["transpose"]
! $1 - the plot command with qualifiers (eg PLOT/VS/OVER/LINE=2)
! $2 - underlying points to be marked with error bars
! $3 - error values associated with points (or error limit above)
! $4 - [optional] error limit below (if different that $4)
Argument 2 is a function defining points along the line where there will be a bar drawn.
Argument 3 is a function defining the plus-and-minus values for the bars at each of the points (or argument 3 is the error above and argument 4 is the error limit below)
So argument 3 might be something that varies along the line you're plotting, or in your case it's just a single value, so the bars represent the value plus and minus the standard deviation at each place where you draw it.
Plot the entire time series at its original time resolution
let gm = sla_new[x=@ave,y=@ave,d=1] !! mean of variable in basin
plot gm !! time series
Then for instance, at every 10th point, the error bars, plus or minus the value gst.
let gst=(sla_new[x=@ave,y=@ave,l=@var,d=1])^0.5 !! one standard deviation of the time series let nt = `gm,return=Lsize`
let gm_10 = gm[L=1:`nt`:10] !! The function plotted above, at every 10th point
let gm_10_with_std = 0*gm_10 + `gst` !! The standard-deviation value repeated at every 10th time point
go error_bars polygon/col=black/nolab/nokey/ov gm_10 `gst`+0*gm_10 !! error bars of 1 standard deviation
-Ansley
On 12/21/2016 2:26 PM, saurabh rathore wrote:
Hi Ansley,
sorry to say but this time i couldn't understand the logic to plot error bars. As i want to plot 1 standard deviation error bars but with some separation between two consecutive error bars, just to avoid the crowding of error bars. i didn't understand the use of sst_erb, errup, errdn, as how they will incorporate the 1 standard deviation.
kindly help me in detail. these are the steps i followed till now for plotting the time series and the respective error bars of this time series.
use sla_new11.nc!! input file
let gm=sla_new[x=@ave,y=@ave,d=1]!! mean of variable in basin
let gst=(sla_new[x=@ave,y=@ave,l=@var,d=1])^0.5 !! one standard deviation of the time series
set viewport a11
plot/thick/axes/set/nolab/nokey/vlimits=0:.1:.01 sla_new[x=@ave,y=@ave,l=@spz:1 1,d=1] !! time series
go error_bars polygon/col=black/nolab/nokey/ov gm gst !! error bars of 1 standard deviation
regards, saurabh
On Thu, Dec 22, 2016 at 7:36 AM, Ansley C. Manke <ansley.b.manke@xxxxxxxx> wrote:
Hi,
You can define the arguments to the script so that they are on a subset of the axis locations. For instance, looking at the example at the start of the script,
yes? go/help error_barsto plot half as many error bars, define the arguments to error_bars with a subset of the L index:
Full path name: /home/users/tmap/ferret/rhel6-x86_64-linux/go/error_bars.jnl
\cancel mode verify
! error_bars.jnl
! 6/99 *sh*
! 7/01 *acm* update /xlimits to /hlimits
! Description: Overlay error bars on a plot
...
! examples
...
! 2) Use a data set, but create some dummy error numbers
!
! Note that if using transformations to create a 1-dimensional variable
! from a multi-dimensional variable, the limits must be made explicitly.
! sst[x=@ave,y=@ave] would cause this script to fail where it uses the
! `var,return=shape` syntax.
! yes? use coads_climatology
! yes? let sst_ave = sst[x=0:360@ave,y=-60:60@ave]
! yes? let errup = 0.1 + 0*sst_ave
! yes? let errdn = 0.2 + 0*sst_ave
!
! yes? plot sst_ave
! yes? GO error_bars poly/line=2 sst_ave, errup, errdn
yes? use coads_climatology
yes? let sst_ave = sst[x=0:360@ave,y=-60:60@ave]
yes? plot sst_ave
yes? let sst_erb = sst[x=0:360@ave,y=-60:60@ave,L=1:12:2]
yes? let errup = 0.1 + 0*sst_erb
yes? let errdn = 0.2 + 0*sst_erb
yes? GO error_bars poly/line=2 sst_erb, errup, errdn
On 12/20/2016 5:20 PM, saurabh rathore wrote:
Dear Ferret users,
i am struggling with the number of error bars in the plot, to many error bars making the plot to congested. i want to plot few error bars so that i looks nice. i am attaching my figure. please suggest me how to manipulate the number of error bars and their positions.
let gm=sla_new[x=@ave,y=@ave,d=1]
let gst=(sla_new[x=@ave,y=@ave,l=@var,d=1])^0.5
go error_bars polygon/col=black/nolab/nokey gm gst
regards, saurabh
--
REGARDS
Saurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
--
REGARDS
Saurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434
--REGARDSSaurabh RathoreResearch Scholar (PhD.)Centre For Oceans, Rivers, Atmosphere & Land Science TechnologyIndian Institute Of Technology, Kharagpurcontact :- 91- 8345984434