Ai
1 Star 0 Fork 1

qingcheng25/matplotplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
parallelplot_2.cpp 800 Bytes
一键复制 编辑 原始数据 按行查看 历史
Alan R R Freitas 提交于 2020-09-04 02:03 +08:00 . Use show instead of wait
#include <matplot/matplot.h>
int main() {
using namespace matplot;
std::vector<std::vector<double>> X(4);
X[0] = concat(rand(50, 78, 200), rand(50, 65, 91));
X[1] = concat(std::vector<double>(50, 1), std::vector<double>(50, 0));
X[2] = concat(rand(50, 122, 140), rand(50, 105, 131));
X[3] =
concat(concat(std::vector<double>(25, 3), std::vector<double>(50, 1)),
std::vector<double>(25, 2));
auto p = parallelplot(X, X[3]);
gca()->x_axis().tick_values({1, 2, 3, 4});
gca()->x_axis().ticklabels({"f_1", "f_2", "f_3", "f_4"});
p->axis()[1].tick_values({0, 1});
p->axis()[1].ticklabels({"false", "true"});
p->axis()[3].tick_values({1, 2, 3});
p->axis()[3].ticklabels({"low", "medium", "high"});
show();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/qingcheng25/matplotplusplus.git
git@gitee.com:qingcheng25/matplotplusplus.git
qingcheng25
matplotplusplus
matplotplusplus
master

搜索帮助