Skip to content

Commit f994996

Browse files
author
Benno Evers
committed
Update minimal example to show a non-straight line.
1 parent c3e4a82 commit f994996

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Complete minimal example:
1313
#include "matplotlibcpp.h"
1414
namespace plt = matplotlibcpp;
1515
int main() {
16-
plt::plot({1,2,3,4});
16+
plt::plot({1,3,2,4});
1717
plt::show();
1818
}
1919
```

examples/basic.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#define _USE_MATH_DEFINES
2+
#include <iostream>
23
#include <cmath>
34
#include "../matplotlibcpp.h"
45

@@ -30,5 +31,7 @@ int main()
3031
// Enable legend.
3132
plt::legend();
3233
// save figure
33-
plt::save("./basic.png");
34+
const char* filename = "./basic.png";
35+
std::cout << "Saving result to " << filename << std::endl;;
36+
plt::save(filename);
3437
}

examples/minimal.png

1.52 KB
Loading

0 commit comments

Comments
 (0)