Skip to content
Snippets Groups Projects
Commit 3f5ab60a authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

try to keep out-of-range points away from dualplot

parent cd7665e1
No related branches found
No related tags found
No related merge requests found
......@@ -398,11 +398,9 @@ void CPlot::plotScan( const bool as_line, const int style_no,
uint nout = 0;
for (uint i=0; i<np; i++){
if( xp[i]<X.inf || xp[i]>X.sup )
continue;
// throw "Plot::Line: x["+strg(i)+"]="+strg(xp[i])+" out of range";
throw "Plot::Line: x["+strg(i)+"]="+strg(xp[i])+" out of range";
if( yp[i]<Y.inf || yp[i]>Y.sup )
continue;
// throw "Plot::Line: y["+strg(i)+"]="+strg(yp[i])+" out of range";
throw "Plot::Line: y["+strg(i)+"]="+strg(yp[i])+" out of range";
fprintf(gp_fd, "%16.8g %16.8g\n", xp[i], yp[i]);
nout++;
}
......@@ -434,14 +432,11 @@ void CPlot::plotScan( const bool as_line, const int style_no,
else
snprintf( outlin, CPLOT_LINSIZ, "%2d pstyle", style_no+1 );
ps_accu.push_back( outlin );
snprintf( outlin, CPLOT_LINSIZ-2, " %% (%s -> %s)", xco.c_str(), yco.c_str() );
snprintf( outlin, CPLOT_LINSIZ-2, " %% (%s -> %s)",
xco.c_str(), yco.c_str() );
strncat( outlin, "\n", CPLOT_LINSIZ );
ps_accu.push_back( outlin );
for (uint i=0; i<np; i++) {
if( xp[i]<X.inf || xp[i]>X.sup )
continue;
if( yp[i]<Y.inf || yp[i]>Y.sup )
continue;
snprintf( outlin, CPLOT_LINSIZ,
"%7.3f%7.3f%7.3f t%c %% %14.7g wx %14.7g wy\n",
X.pc(xp[i]), Y.pc(yp[i]), 0.0,
......
......@@ -1147,6 +1147,7 @@ void NEdif::Plot( CPlot *plot, bool add )
e->P()->xco.str(), e->P()->yco.str(),
"data file "+strg(k)+" scan "+strg(j) );
}
/*
} else if ( fc && false ) {
// keep old vectorial version;
// might be useful for accelerated plotting
......@@ -1158,6 +1159,7 @@ void NEdif::Plot( CPlot *plot, bool add )
plot->plotScan( true, cstyle++, xp, yp, e->Z(j),
e->P()->xco.str(), e->P()->yco.str(),
"curve file "+strg(k)+" scan "+strg(j) );
*/
} else if ( fc && fc->kconv!=-1 ) {
// plot only at x points of convolutand
uint kconv = fc->kconv;
......@@ -1172,6 +1174,18 @@ void NEdif::Plot( CPlot *plot, bool add )
xp.push_back( x );
}
fc->T->tree_curve_val_vec( &yp, xp, k, j );
vector<double> xo, yo;
for( size_t i=0; i<xp.size(); ++i ){
if( plot->X.contained( xp[i] ) &&
plot->Y.contained( yp[i] ) )
continue;
xo.push_back( xp[i] );
yo.push_back( yp[i] );
}
if( xp.size()==0 ){
cout << "curve k="<<strg(k)<<", j="<<strg(j)<<" is empty\n";
return;
}
plot->plotScan( true, cstyle++, xp, yp, e->Z(j),
e->P()->xco.str(), e->P()->yco.str(),
"curve file "+strg(k)+" scan "+strg(j) );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment