GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — matplotlib-cpp/examples/string_xaxis_named_plot.cpp at master · lava/matplotlib-cpp Expand file tree/ Copy pathstring_xaxis_named_plot.cppMore file actions 25 lines (21 loc) · 697 Bytes / Copy pathstring_xaxis_named_plot.cppFile metadata and controls25 lines (21 loc) · 697 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 #include "../matplotlibcpp.h" #include <string> #include <vector> namespace plt = matplotlibcpp; int main() { const std::vector<std::string> months = { "Jan 2021", "Feb 2021", "Mar 2021", "Apr 2021", "May 2021" }; const std::vector<double> speed_kmh = {58.4, 61.2, 63.9, 62.1, 65.0}; plt::figure_size(900, 500); plt::named_plot("Vehicle speed (max)", months, speed_kmh, "o-"); plt::title("Monthly peak speed"); plt::xlabel("Month"); plt::ylabel("Speed (km/h)"); plt::legend(); plt::tight_layout(); // Use save() for CI/headless usage; replace with show() for interactive runs. plt::save("./string_xaxis_named_plot.png"); return 0; } |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |