inline void show_splot_surface(Domain& d, st idx) { std::list<Gnuplot_actor> slga; Gnuplot_actor sga; GnuplotActor_LeafNodesSurface(sga, d.grid(), idx); //GnuplotActor_NodesSurface(sga, pn, 0); slga.push_back(sga); GnuplotActor_GhostNodesSurface(sga, d.ghost(), idx); slga.push_back(sga); //sga.show_data(); Gnuplot sgp; //sgp.set_equal_ratio(); sgp.set_view(45, 10, 1, 1); sgp.set_palette_blue_red(); sgp.set("ticslevel 0"); //sgp.set_xrange(1.4, 2.0); //sgp.set_yrange(1.4, 2.0); sgp.splot(slga); }
// ---------------------------------------------------------------------- bool ShowPopulation(Gnuplot &gplot, const CPopulation &pop, const std::string &legend) { if (!SaveToFile(legend, pop, ios_base::out)) return false; size_t n = 0; #ifdef OUTPUT_DECISION_VECTOR n = pop[0].vars().size(); #endif if (pop[0].objs().size() == 2) { gplot.plot(legend, n+1, n+2); return true; } else if (pop[0].objs().size() == 3) { gplot.splot(legend, n+1, n+2, n+3); return true; } else // only plot 2-D or 3-D figures return false; }