Родитель
b086795769
Сommit
574585c9e0
До Ширина: | Высота: | Размер: 455 B После Ширина: | Высота: | Размер: 942 B |
@ -1,24 +1,25 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
#include "histogram.h"
|
#include "histogram.h"
|
||||||
#include "svg.h"
|
#include "svg.h"
|
||||||
#include <fstream>
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
Input data = input_data();
|
Input data = input_data();
|
||||||
|
|
||||||
|
|
||||||
size_t block_width = svg::input_block_width();
|
|
||||||
|
|
||||||
auto bins = make_histogram(data.numbers, data.bin_count);
|
auto bins = make_histogram(data.numbers, data.bin_count);
|
||||||
|
|
||||||
|
// Çàïðîñ ïàðàìåòðîâ ïóíêòèðà
|
||||||
|
int dash_len, gap_len;
|
||||||
|
cout << "Enter dash length (e.g., 20): ";
|
||||||
|
cin >> dash_len;
|
||||||
|
cout << "Enter gap length (e.g., 10): ";
|
||||||
|
cin >> gap_len;
|
||||||
|
|
||||||
show_histogram_text(bins, block_width);
|
show_histogram_text(bins);
|
||||||
|
|
||||||
ofstream svg_file("histogram.svg");
|
ofstream svg_file("histogram.svg");
|
||||||
svg::show_histogram_svg(svg_file, bins, block_width);
|
svg::show_histogram_svg(svg_file, bins, dash_len, gap_len);
|
||||||
svg_file.close();
|
svg_file.close();
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Загрузка…
Ссылка в новой задаче