| 2 | #include <matplot/matplot.h> |
| 3 | |
| 4 | int main() { |
| 5 | using namespace matplot; |
| 6 | |
| 7 | std::vector<double> x = linspace(0, 180, 7); |
| 8 | std::vector<double> y = {0.8, 0.9, 0.1, 0.9, 0.6, 0.1, 0.3}; |
| 9 | plot(x, y); |
| 10 | title("Time Plot"); |
| 11 | xlabel("Time"); |
| 12 | yrange({0, 1}); |
| 13 | xticks({0, 30, 60, 90, 120, 150, 180}); |
| 14 | xticklabels( |
| 15 | {"00:00s", "30:00", "01:00", "01:30", "02:00", "02:30", "03:00"}); |
| 16 | |
| 17 | show(); |
| 18 | return 0; |
| 19 | } |