/* Kompilacja. 1) najpierw tworzymy zmienna systemowa CPATH: . ./setmplenv.sh 2) nastepnie: g++ mpl_test.C -lpython3.8 */ #include #include #include "matplotlibcpp.h" using namespace std; namespace plt = matplotlibcpp; int main() { cout << "\nRysowanie w matplotlib.\n" << "\nW Console wysun z prawej gory okno graficzne.\n" << "Jesli jest okno, ale puste - przeresetuj strone.\n" << "\nWyjscie: z prawej gornej strony okna kliknik [X].\n" << " Jesli nie widac [X], wcisnij [CTRL C]. \n\n"; vector x = {1, 2, 3, 4} , y = {1, 3, 2, 4} ; plt::plot (x, y); // plt::hist (x); // plt::save ("minimalplot.png"); plt::show (); return 0; }