blob: ea3c3ecab87c2005555b0645f2eeca87aa672194 [file] [log] [blame]
#include "../matplotlibcpp.h"
namespace plt = matplotlibcpp;
int main()
{
// u and v are respectively the x and y components of the arrows we're plotting
std::vector<int> x, y, u, v;
for (int i = -5; i <= 5; i++) {
for (int j = -5; j <= 5; j++) {
x.push_back(i);
u.push_back(-i);
y.push_back(j);
v.push_back(-j);
}
}
plt::quiver(x, y, u, v);
plt::show();
}