|  |  |  | @ -19,11 +19,6 @@ svg_text(double left, double baseline, std::string text) { | 
			
		
	
		
			
				
					|  |  |  |  |     std::cout << "<text x='"<< left <<"' y='"<< baseline <<"'>"<< text <<"</text>"; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | void | 
			
		
	
		
			
				
					|  |  |  |  | svg_proc(double left, double baseline) { | 
			
		
	
		
			
				
					|  |  |  |  |     std::cout << "<text x='"<< left <<"' y='"<< baseline<<"</text>"; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | void svg_rect(double x, double y, double width, double height,std::string stroke = "black", std::string fill = "green"){ | 
			
		
	
		
			
				
					|  |  |  |  |     std::cout<< "<rect x='"<< x <<"' y='"<< y <<"' width='"<< width <<"' height='"<< height <<"' stroke = '" << stroke <<"' fill = '" << fill <<"' />"; | 
			
		
	
		
			
				
					|  |  |  |  | } | 
			
		
	
	
		
			
				
					|  |  |  | @ -55,7 +50,6 @@ show_histogram_svg(std::vector<size_t> bins,size_t max_count) { | 
			
		
	
		
			
				
					|  |  |  |  |         const auto TEXT_LEFT_PROCENT = SCALE+TEXT_WIDTH+20; | 
			
		
	
		
			
				
					|  |  |  |  |         svg_text(TEXT_LEFT, top + TEXT_BASELINE, std::to_string(bins[i])); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_proc(TEXT_LEFT_PROCENT, top + TEXT_BASELINE); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         top += BIN_HEIGHT; | 
			
		
	
		
			
				
					|  |  |  |  |         }} | 
			
		
	
	
		
			
				
					|  |  |  | @ -65,19 +59,9 @@ show_histogram_svg(std::vector<size_t> bins,size_t max_count) { | 
			
		
	
		
			
				
					|  |  |  |  |         const auto TEXT_LEFT_PROCENT = (max_count*SCALE)+TEXT_WIDTH+20; | 
			
		
	
		
			
				
					|  |  |  |  |         svg_text(TEXT_LEFT, top + TEXT_BASELINE, std::to_string(bins[i])); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_proc(TEXT_LEFT_PROCENT, top + TEXT_BASELINE); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         top += BIN_HEIGHT; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     svg_end(); | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     /*for (size_t i = 0; i < bins.size(); i++) {
 | 
			
		
	
		
			
				
					|  |  |  |  |         const double bin_width = BLOCK_WIDTH * bins[i]; | 
			
		
	
		
			
				
					|  |  |  |  |         svg_text(TEXT_LEFT, top + TEXT_BASELINE, std::to_string(bins[i])); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_rect(TEXT_WIDTH, top, bin_width, BIN_HEIGHT); | 
			
		
	
		
			
				
					|  |  |  |  |         svg_proc(BLOCK_WIDTH*bins[i]+TEXT_LEFT+50, top + TEXT_BASELINE,procent[i]); | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  |         top += BIN_HEIGHT; | 
			
		
	
		
			
				
					|  |  |  |  |     } | 
			
		
	
		
			
				
					|  |  |  |  |     svg_end(); | 
			
		
	
		
			
				
					|  |  |  |  | }*/} | 
			
		
	
	
		
			
				
					|  |  |  | 
 |