|
3847 | 3847 |
|
3848 | 3848 | // if (hdim > 1) option.Scat = 1; // default was scatter plot |
3849 | 3849 |
|
3850 | | - if ((hdim===1) && (this.histo.fSumw2.length > 0)) option.Error = 2; |
| 3850 | + // use error plot only when any sumw2 bigger than 0 |
| 3851 | + if ((hdim===1) && (this.histo.fSumw2.length > 0)) |
| 3852 | + for (var n=0;n<this.histo.fSumw2.length;++n) |
| 3853 | + if (this.histo.fSumw2[n] > 0) { option.Error = 2; break; } |
| 3854 | + |
3851 | 3855 | if (this.histo.fFunctions !== null) option.Func = 1; |
3852 | 3856 |
|
3853 | 3857 | var i = chopt.indexOf('PAL'); |
|
8460 | 8464 | JSROOT.addDrawFunc({ name: "TLatex", icon:"img_text", func: JSROOT.Painter.drawText }); |
8461 | 8465 | JSROOT.addDrawFunc({ name: "TMathText", icon:"img_text", func: JSROOT.Painter.drawText }); |
8462 | 8466 | JSROOT.addDrawFunc({ name: "TText", icon:"img_text", func: JSROOT.Painter.drawText }); |
8463 | | - JSROOT.addDrawFunc({ name: /^TH1/, icon: "img_histo1d", func: JSROOT.Painter.drawHistogram1D, opt:";P;P0;E;E1;E2;same"}); |
| 8467 | + JSROOT.addDrawFunc({ name: /^TH1/, icon: "img_histo1d", func: JSROOT.Painter.drawHistogram1D, opt:";HIST;P;P0;E;E1;E2;same"}); |
8464 | 8468 | JSROOT.addDrawFunc({ name: "TProfile", icon: "img_profile", func: JSROOT.Painter.drawHistogram1D, opt:";E0;E1;E2;p;hist"}); |
8465 | 8469 | JSROOT.addDrawFunc({ name: /^TH2/, icon: "img_histo2d", prereq: "more2d", func: "JSROOT.Painter.drawHistogram2D", opt:";COL;COLZ;COL0Z;BOX;SCAT;TEXT;LEGO;same" }); |
8466 | 8470 | JSROOT.addDrawFunc({ name: /^TH3/, icon: 'img_histo3d', prereq: "3d", func: "JSROOT.Painter.drawHistogram3D" }); |
|
0 commit comments