Ai
1 Star 0 Fork 1

qingcheng25/matplotplusplus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
stairs_10.cpp 795 Bytes
一键复制 编辑 原始数据 按行查看 历史
Alan R R Freitas 提交于 2020-09-04 02:03 +08:00 . Use show instead of wait
#include <cmath>
#include <matplot/matplot.h>
int main() {
using namespace matplot;
std::vector<double> x = {1, 3, 5, 7, 10};
std::vector<double> y = {2, 5, 6, 7, 11};
auto stair_handles = stairs(x, y, x, y, x, y, x, y);
stair_handles[0]->stair_style(stair::stair_style::fill);
stair_handles[1]
->stair_style(stair::stair_style::trace_x_first)
.line_width(4);
stair_handles[2]
->stair_style(stair::stair_style::trace_y_first)
.line_width(2);
stair_handles[3]
->stair_style(stair::stair_style::histogram)
.marker_style(line_spec::marker_style::circle)
.line_width(1)
.marker_color("m")
.marker_face(true)
.marker_size(10);
axis({0, 12, 0, 13});
show();
return 0;
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/qingcheng25/matplotplusplus.git
git@gitee.com:qingcheng25/matplotplusplus.git
qingcheng25
matplotplusplus
matplotplusplus
master

搜索帮助