Ai
1 Star 0 Fork 1

qingcheng25/matplotplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
plot3_9.cpp 716 Bytes
一键复制 编辑 原始数据 按行查看 历史
Alan R R Freitas 提交于 2020-09-04 02:03 +08:00 . Use show instead of wait
#include <cmath>
#include <matplot/matplot.h>
#include <random>
int main() {
using namespace matplot;
std::default_random_engine g(0);
std::uniform_real_distribution<double> d;
std::vector<double> x(10);
std::generate(x.begin(), x.end(), [&]() { return d(g); });
std::vector<double> y(10);
std::generate(y.begin(), y.end(), [&]() { return d(g); });
std::uniform_real_distribution<double> d2(0, 90);
std::vector<double> z(10);
std::generate(z.begin(), z.end(), [&]() { return d2(g); });
auto p = plot3(x, y, z, "o");
p->parent()->x_axis().tick_label_format("s");
xlabel("X");
ylabel("Y");
zlabel("Duration");
grid(on);
show();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/qingcheng25/matplotplusplus.git
git@gitee.com:qingcheng25/matplotplusplus.git
qingcheng25
matplotplusplus
matplotplusplus
master

搜索帮助