- px = bbGetInputInX()[i];
- } else {
- px = i;
- }
- pGF->AddNewPoint( px, bbGetInputInY()[i] );
- }
- }// if pGF
+ // avoid 'taking address of temporary '
+ //pGraphicalFunction *pGF = mwxwidget->getFunctionForVectors( &(bbGetInputInX()), &(bbGetInputInY()) ); // taking address of temporary ! JPRx
+ std::vector<double> inX2;
+ if (bbGetInputInX().size()==0)
+ {
+ int i,size=bbGetInputInY2().size();
+ for(i=0;i<size;i++)
+ {
+ inX2.push_back((double)i);
+ } // for
+ } else {
+ inX2 = bbGetInputInX();
+ } // if bbGetInputInX
+ std::vector<double> inY2 = bbGetInputInY2();
+
+ bool ok2=false;
+ int i, size = inY2.size();
+ for ( i=0 ; i<size ; i++ )
+ {
+ if ((inY2[i]>-lim) && (inY2[i]<lim)) { inY2[i]=0; }
+ if ((inY2[i]<-lim) || (inY2[i]>lim)) {ok2=true;}
+ }// for
+ if (ok2==true)
+ {
+ pGF2 = mwxwidget->getFunctionForVectors( &inX2, &inY2 );
+ mwxwidget->addFunction(pGF2);
+ } else {
+ printf("EED Warnning!! PlotterView::Process function y2 with CEROS ????..... \n");
+ } // if ok2