Template:Team:UC Davis/MutantWidget
From 2011.igem.org
(Difference between revisions)
Line 418: | Line 418: | ||
{ | { | ||
thisdatax[i] = parseFloat(thisdatax[i]); | thisdatax[i] = parseFloat(thisdatax[i]); | ||
- | data[index].data.push([thisdatax[i], thisdatay[i]]) | + | data[index].data.push([thisdatax[i], thisdatay[i]]); |
- | + | ||
- | + | ||
- | + | ||
} | } | ||
+ | var errbarwidth = Math.max.apply(null,thisdatax)/150; | ||
+ | for(i=0; i < thisdatax.length; ++i) | ||
+ | { | ||
+ | errbars_2d[index].data.push([thisdatax[i], thisdatay[i]+thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([thisdatax[i], thisdatay[i]-thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([null, null]); | ||
+ | errbars_2d[index].data.push([thisdatax[i]-errbarwidth, thisdatay[i]+thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([thisdatax[i]+errbarwidth, thisdatay[i]+thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([null, null]); | ||
+ | errbars_2d[index].data.push([thisdatax[i]-errbarwidth, thisdatay[i]-thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([thisdatax[i]+errbarwidth, thisdatay[i]-thisdataerr[i]]); | ||
+ | errbars_2d[index].data.push([null, null]); | ||
+ | } | ||
} | } |
Revision as of 03:15, 28 September 2011