| 5 | #include <vector> |
| 6 | |
| 7 | int main() { |
| 8 | using namespace matplot; |
| 9 | |
| 10 | subplot(2, 2, 0); |
| 11 | fplot("sin(x)"); |
| 12 | title("Subplot 1: sin(x)"); |
| 13 | |
| 14 | subplot(2, 2, 1); |
| 15 | fplot("sin(2*x)"); |
| 16 | title("Subplot 2: sin(2x)"); |
| 17 | |
| 18 | subplot(2, 2, 2); |
| 19 | fplot("sin(4*x)"); |
| 20 | title("Subplot 3: sin(4x)"); |
| 21 | |
| 22 | subplot(2, 2, 3); |
| 23 | fplot("sin(8*x)"); |
| 24 | title("Subplot 4: sin(8x)"); |
| 25 | |
| 26 | show(); |
| 27 | return 0; |
| 28 | } |