FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib-cpp/examples/quiver.cpp at master · lava/matplotlib-cpp · GitHub
lava
/
matplotlib-cpp
Public
Notifications
You must be signed in to change notification settings
Fork
1.2k
Star
4.8k
Code
Issues
192
Pull requests
31
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib-cpp
/
examples
/
quiver.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
20 lines (17 loc) · 447 Bytes
Breadcrumbs
matplotlib-cpp
/
examples
/
quiver.cpp
Copy path
File metadata and controls
20 lines (17 loc) · 447 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#
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
();
}
Back
|
FazBrowse Home
|
New Git URL