1 Star 3 Fork 0

quxiaofeng/matplotplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
yyaxis_4.cpp 495 Bytes
一键复制 编辑 原始数据 按行查看 历史
#include <matplot/matplot.h>
int main() {
using namespace matplot;
colororder({"b", "m"});
vector_2d y = {{1, 3}, {2, 4}};
auto p1 = plot(y);
p1[0]->color("b");
p1[1]->color("b").line_style("--");
gca()->y_axis().color("b");
hold(on);
vector_2d z = {{4, 2}, {3, 1}};
auto ps = plot(z);
ps[0]->use_y2(true).color("m");
ps[1]->use_y2(true).color("m").line_style("--");
gca()->y2_axis().color("m");
legend();
show();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/quxiaofeng/matplotplusplus.git
git@gitee.com:quxiaofeng/matplotplusplus.git
quxiaofeng
matplotplusplus
matplotplusplus
master

搜索帮助