1 Star 0 Fork 0

stp111/matplotlib-cpp

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
xkcd.cpp 427 Bytes
一键复制 编辑 原始数据 按行查看 历史
Chachay 提交于 2018-02-18 21:20 +08:00 . Update windows/VS2017 support
#define _USE_MATH_DEFINES
#include <cmath>
#include "../matplotlibcpp.h"
#include <vector>
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();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/stp111/matplotlib-cpp.git
git@gitee.com:stp111/matplotlib-cpp.git
stp111
matplotlib-cpp
matplotlib-cpp
master

搜索帮助