diff --git a/pub/lib/plot.cpp b/pub/lib/plot.cpp index 9ab62b877fa5e4bed796d23e08d605c9ffdd80c4..e8f0658582b3b01d77d92dff64e080a82490395b 100644 --- a/pub/lib/plot.cpp +++ b/pub/lib/plot.cpp @@ -278,6 +278,7 @@ public: int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle) { + printf( "\nDEBUG REFINE\n" ); auto x2p = [&](const vector<double>& x) -> vector<CPt> { vector<double> y = PCAST<const CObjVecDbl>(fc->eval_curve(x, k, j, false))->v; vector<int> inRange = fc->eval_prange(x, k, j)->v; @@ -306,9 +307,8 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle) vector<CPt> pp; for (int iref=0; iref<13 && pp.size() < plot->maxpoints; ++iref) { vector<CPt> pn = x2p(xn); - printf( "DEBUG %2i %6zu %6zu\n", iref, pp.size(), pn.size() ); - vector<CPt> pp = triv::merge_sorted(pp, pn, pt_order); - printf( "DEBUG -> %6zu\n", pp.size() ); + printf( "DEBUG %2i #pp=%6zu #pn=%6zu\n", iref, pp.size(), pn.size() ); + pp = triv::merge_sorted(pp, pn, pt_order); xn.clear(); // detect jumps: @@ -332,8 +332,8 @@ int plot_curve_refine(CPlot* plot, const COlc* fc, int k, int j, int cstyle) } po.push_back( *b ); } - pp.clear(); - copy(po.begin(), po.end(), back_inserter(pp)); + printf( "DEBUG -> #pp=%6zu #po=%6zu #xn=%6zu\n", pp.size(), po.size(), xn.size() ); + pp = po; if (!xn.size()) break; }