代码拉取完成,页面将自动刷新
#include <cmath>
#include <matplot/matplot.h>
#include <random>
int main() {
using namespace matplot;
std::vector<double> mpg = {
18, 15, 18, 16, 17, 15, 14, 14, 14, 15, 15, 14,
15, 14, 24, 22, 18, 21, 27, 26, 25, 24, 25, 26,
21, 10, 10, 11, 9, 28, 25, 25, 26, 27, 17.5, 16,
15.5, 14.5, 22, 22, 24, 22.5, 29, 24.5, 29, 33, 20, 18,
18.5, 17.5, 29.5, 32, 28, 26.5, 20, 13, 19, 19, 16.5, 16.5,
13, 13, 13, 28, 27, 34, 31, 29, 27, 24, 23, 36,
37, 31, 38, 36, 36, 36, 34, 38, 32, 38, 25, 38,
26, 22, 32, 36, 27, 27, 44, 32, 28, 31};
boxplot(mpg);
xlabel("All Vehicles");
ylabel("Miles per Gallon (MPG)");
title("Miles per Gallon for All Vehicles");
show();
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。