added histogram code to s_curve_analyzer.cpp