FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
matplotlib-cpp/examples/xkcd.cpp at master · fool404/matplotlib-cpp · GitHub
fool404
/
matplotlib-cpp
Public
forked from
lava/matplotlib-cpp
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
matplotlib-cpp
/
examples
/
xkcd.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
21 lines (16 loc) · 401 Bytes
Breadcrumbs
matplotlib-cpp
/
examples
/
xkcd.cpp
Copy path
File metadata and controls
21 lines (16 loc) · 401 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
"
#
include
<
vector
>
#
include
<
cmath
>
namespace
plt
=
matplotlibcpp;
int
main
() {
std::vector<
double
>
t
(
1000
);
std::vector<
double
>
x
(t.
size
());
for
(
size_t
i =
0
; i < t.
size
(); i++) {
t[i] = i /
100.0
;
x[i] =
sin
(
2.0
*
M_PI
*
1.0
* t[i]);
}
plt::xkcd
();
plt::plot
(t, x);
plt::title
(
"
AN ORDINARY SIN WAVE
"
);
plt::show
();
}
Back
|
FazBrowse Home
|
New Git URL