]> rtime.felk.cvut.cz Git - hubacji1/bcar.git/commitdiff
Parameterize what to plot
authorJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 28 Mar 2022 10:44:59 +0000 (12:44 +0200)
committerJiri Vlasak <jiri.vlasak.2@cvut.cz>
Mon, 30 May 2022 14:08:42 +0000 (16:08 +0200)
src/gen_for_gnuplot.cc

index f281912c6eb55d056ea008924309648c04564e58..ccc1cb760ae69b1825b1ba769194b4c7b694d169 100644 (file)
@@ -111,9 +111,13 @@ gen_pl_script(std::vector<M>& ms, std::string with_slot)
 }
 
 int
-main()
+main(int argc, char **argv)
 {
        using namespace std;
+       if (argc != 2) {
+               cerr << "Specify `what_plot` number." << endl;
+               exit(1);
+       }
        cout << fixed;
        cerr << fixed;
 
@@ -124,7 +128,7 @@ main()
        s.fe(bcar::BicycleCar());
        s.compute_entries();
 
-       int what_plot = 0;
+       int what_plot = atoi(argv[1]);
 
        // this is ep
        int len = s._ispaths.size();