diff --git a/fin_lab34.cpp b/fin_lab34.cpp index fc9a2dc..e6a8f7b 100644 --- a/fin_lab34.cpp +++ b/fin_lab34.cpp @@ -3,6 +3,7 @@ #include #include "histogram.h" #include "text.h" +#include "svg.h" const size_t WINDOW_WIDTH = 80; const size_t MAX_VALUE = WINDOW_WIDTH - 3 - 1; using namespace std; @@ -30,7 +31,7 @@ main(){ double min = 0, max = 0; Input in = input_data(); auto bins = make_histogram(in.numbers, in.bin_count); - for (auto now: bins) {cout << now << endl;} - show_histogram_text(bins); + //for (auto now: bins) {cout << now << endl;} + show_histogram_svg(bins); return 0; } diff --git a/svg.cpp b/svg.cpp new file mode 100644 index 0000000..11f3dfe --- /dev/null +++ b/svg.cpp @@ -0,0 +1,24 @@ +#include +#include +#include "svg.h" +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..d307e71 --- /dev/null +++ b/svg.h @@ -0,0 +1,13 @@ +#ifndef SVG_H_INCLUDED +#define SVG_H_INCLUDED +#include +using namespace std; +void +svg_begin(double width, double height); + +void +svg_end(); + +void +show_histogram_svg(const vector &bins); +#endif // SVG_H_INCLUDED