代码拉取完成,页面将自动刷新
#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;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。