| 5 | #include <vector> |
| 6 | |
| 7 | int main() { |
| 8 | using namespace matplot; |
| 9 | std::vector<axes_handle> ax; |
| 10 | for (size_t i = 0; i < 4; ++i) { |
| 11 | ax.emplace_back(subplot(2, 2, i)); |
| 12 | } |
| 13 | |
| 14 | subplot(ax[1]); |
| 15 | auto p = fplot("sin(x)"); |
| 16 | p->line_spec().color({0.1f, 0.5f, 0.1f}); |
| 17 | p->line_spec().line_width(2); |
| 18 | title("Second subplot"); |
| 19 | axis({0, 50, -1, 1}); |
| 20 | |
| 21 | show(); |
| 22 | return 0; |
| 23 | } |