Commit 8b699c67 authored by Matthieu Boileau's avatar Matthieu Boileau

Update solveur_temps.cpp

use keywords
parent 80b0524f
Pipeline #3998 passed with stages
in 2 minutes and 9 seconds
......@@ -75,15 +75,17 @@ void SolveurTemps::plotSolution(const int inoeud, const string& city) {
}
}
plt::plot(t, s); // 1er plot sans nom sinon on provoque un segfault
plt::named_plot("S", t, s);
plt::named_plot("I", t, i);
plt::named_plot("R", t, r);
std::map<string, string> keywords;
keywords["label"] = "S";
plt::plot(t, s, keywords);
keywords["label"] = "I";
plt::plot(t, i, keywords);
keywords["label"] = "R";
plt::plot(t, r, keywords);
plt::legend();
plt::title(city);
plt::xlabel("t");
//plt::show();
//
const string& filename = city + ".png";
plt::save(filename);
cout << "Tracé sauvé dans " << filename << endl;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment