diff --git a/main.cpp b/main.cpp index c2ead34..97ef452 100644 --- a/main.cpp +++ b/main.cpp @@ -3,7 +3,7 @@ #include #include "histogram.h" #include - +#include @@ -34,13 +34,15 @@ cin >> in.bin_count; return in; } + + + int main() { auto in = input_data(); auto bins = make_histogram(in.numbers, in.bin_count); auto procent = make_histogram_proc(in.numbers, in.bin_count, bins); - show_histogram(in.bin_count, bins, procent); - + show_histogram_svg(bins); return 0; } diff --git a/svg.cpp b/svg.cpp new file mode 100644 index 0000000..94f000c --- /dev/null +++ b/svg.cpp @@ -0,0 +1,26 @@ +#include +#include +#include + +using namespace std; + +void +svg_begin(double width, double height) { + cout << "\n"; + cout << "\n"; +} + +void +svg_end() { + cout << "\n"; +} + +void +show_histogram_svg(const vector& bins) { + svg_begin(400, 300); + svg_end(); +} diff --git a/svg.h b/svg.h new file mode 100644 index 0000000..0c45c32 --- /dev/null +++ b/svg.h @@ -0,0 +1,13 @@ +#ifndef SVG_H_INCLUDED +#define SVG_H_INCLUDED + +void +svg_begin(double width, double height); + +void +svg_end(); + +void +show_histogram_svg(const std::vector& bins); + +#endif // SVG_H_INCLUDED