8000 use {...} notation for minimal · krahuldnkr/matplotlib-cpp@954b3e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 954b3e5

Browse files
committed
use {...} notation for minimal
1 parent 3deedea commit 954b3e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

examples/minimal.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ namespace plt = matplotlibcpp;
55

66
int main() {
77
// plot(y) - the x-coordinates are implicitly set to [0,1,...,n)
8-
// plt::plot({1, 2, 3, 4});
9-
std::vector<double> y = {1, 2, 3, 4};
10-
plt::plot(y);
8+
// note, that plot({..}, {..}) is not supported due to the ambiguous cast
9+
// of {..} to either std::string or std::vector
10+
plt::plot({1, 3, 2, 4});
1111
plt::savefig("minimal.pdf");
1212
}

0 commit comments

Comments
 (0)
0