Skip to content

Arrow

1
arrow(x1, y1, x2, y2);

example_arrow_1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include <cmath>
#include <matplot/matplot.h>

int main() {
    using namespace matplot;

    plot(iota(1, 10));
    auto a = arrow(2.5, 6.5, 5, 5);

    show();
    return 0;
}

More examples

example_arrow_2

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
#include <cmath>
#include <matplot/matplot.h>

int main() {
    using namespace matplot;

    plot(iota(1, 10));
    auto a = arrow(2.5, 6.5, 5, 5);
    a->color("blue");
    a->line_width(4);

    show();
    return 0;
}