You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-5
Original file line number
Diff line number
Diff line change
@@ -48,7 +48,7 @@ int main()
48
48
// Plot a red dashed line from given x and y data.
49
49
plt::plot(x, w,"r--");
50
50
// Plot a line whose name will show up as "log(x)" in the legend.
51
-
plt::named_plot("log(x)", x, z);
51
+
plt::plot(x, z, {{"label", "log(x)"}});
52
52
// Set x-axis to interval [0,1000000]
53
53
plt::xlim(0, 1000*1000);
54
54
// Add graph title
@@ -65,7 +65,7 @@ int main()
65
65
66
66

67
67
68
-
Alternatively, matplotlib-cpp also supports some C++11-powered syntactic sugar:
68
+
Also, matplotlib-cpp also supports being given multiple plot commands. However these have to come in triplets of `(x, y, fmt)` where `fmt` is a formatting string, such as `r--`.
0 commit comments