diff --git a/config/xsd/request/histoPlot.xsd b/config/xsd/request/histoPlot.xsd index eec547c..5a0ebf1 100644 --- a/config/xsd/request/histoPlot.xsd +++ b/config/xsd/request/histoPlot.xsd @@ -30,22 +30,22 @@ - - define drawing properties for 1D histogram. + define drawing properties for 2D histogram. To be filled. - - define drawing properties for 2D histogram. + define drawing properties for 1D histogram. To be filled. diff --git a/src/ParamOutputImpl/Plot/AxisLegendManager.cc b/src/ParamOutputImpl/Plot/AxisLegendManager.cc index 87d8137..f1c9792 100644 --- a/src/ParamOutputImpl/Plot/AxisLegendManager.cc +++ b/src/ParamOutputImpl/Plot/AxisLegendManager.cc @@ -128,7 +128,7 @@ namespace plot PanelPlotOutput *plot) { SeriesProperties lSeriesProperties; - + std::string yAxisTextLegend; // Compute nb series to draw by y axis std::map nbSeriesByYAxisMap = plot->getNbSeriesByYAxis(); @@ -153,16 +153,22 @@ namespace plot continue; } if(pHistogramProperties->getHistogramType() == "histogram1d"){ - std::string yAxisTextLegend; - yAxisTextLegend = pHistogramProperties->getHistotypeProperties().getHisto1DFunction()->getTextLegend(); - Label yLabel(lYAxis->_legend.getFont(),lYAxis->_color); - yLabel._text = yAxisTextLegend; - lYAxis->_legend.setLabel(yLabel); + AMDA::Common::ParameterIndexComponent yIndexComp = pHistogramProperties->getHistotypeProperties().getIndex(); + std::string yParamId = pHistogramProperties->getHistotypeProperties().getParamId(); + yAxisTextLegend = yAxisTextLegend = pHistogramProperties->getHistotypeProperties().getHisto1DFunction()->getTextLegend(); + if(pHistogramProperties->getHistotypeProperties().getParamId().empty()) + { + Label yLabel(lYAxis->_legend.getFont(),lYAxis->_color); + yLabel._text = yAxisTextLegend; + lYAxis->_legend.setLabel(yLabel); + continue; + } + Color compLegendColor = lYAxis->_color; + if(param.getHistogramSeriesPropertiesList().size() > 0) + compLegendColor = pHistogramProperties->getColor(); + ParameterIndexComponentColor yIndex = ParameterIndexComponentColor(yIndexComp, compLegendColor); + pushComponentInList(yParamId, yIndex, axesParamsComponents[yAxisId]); } - - Color compLegendColor = lYAxis->_color; - ParameterIndexComponentColor yIndex = ParameterIndexComponentColor(pHistogramProperties->getIndex(), compLegendColor); - pushComponentInList(pHistogramProperties->getParamId(), yIndex, axesParamsComponents[yAxisId]); } } for (auto lSeriesProperties : param.getYSeriePropertiesList()) @@ -200,7 +206,7 @@ namespace plot for (auto axisParamsComponents : axesParamsComponents) { boost::shared_ptr lYAxis = plot->_panel->getAxis(axisParamsComponents.first); - setAxisLegendForSeries(plot, lYAxis, axisParamsComponents.second); + setAxisLegendForSeries(plot, lYAxis, axisParamsComponents.second,yAxisTextLegend); } } diff --git a/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.cc b/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.cc index b9d9613..51953ad 100644 --- a/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.cc +++ b/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.cc @@ -14,7 +14,7 @@ namespace plot { // Basically transforms the data to a matrix by keeping all the values needed later -std::map> Histo1DFunction::getGridValues(double* xData, int nbData, Range xRange, double xBinSize) +std::map> Histo1DFunction::getGridValues(double* xData,double* yData, int nbData, Range xRange, double xBinSize) { std::map> allValues; double xMin = xRange.getMin(); @@ -26,14 +26,14 @@ std::map> Histo1DFunction::getGridValues(double* xData, continue; int xIndex = (xData[i]- xMin)/xBinSize; - - allValues[xIndex].push_back(xData[i]); + if(!std::isnan(yData[i])) + allValues[xIndex].push_back(yData[i]); } return allValues; } // Density function for 1DHistogram -void Density1DFunction::apply(std::vector> &grid, double* xData, int nbData, Range xRange, +void Density1DFunction::apply(std::vector> &grid, double* xData, double* /*yData*/, int nbData, Range xRange, double& xBinSize, bool yIsLog, double& yMin, double& yMax) { bool yMaxToModify=true; @@ -49,7 +49,7 @@ void Density1DFunction::apply(std::vector> &grid, doub yMaxToModify = false; std::map> allValues; - allValues = getGridValues(xData,nbData,xRange,xBinSize); + allValues = getGridValues(xData,xData,nbData,xRange,xBinSize); for (unsigned int i(0); i < allValues.size(); ++i){ if (allValues[i].size() > 0) @@ -65,7 +65,7 @@ void Density1DFunction::apply(std::vector> &grid, doub // NormDensity1DFunction function for 1DHistogram -void NormDensity1DFunction::apply(std::vector> &grid, double* xData, int nbData, Range xRange, +void NormDensity1DFunction::apply(std::vector> &grid, double* xData, double* /*yData*/, int nbData, Range xRange, double& xBinSize, bool yIsLog, double& yMin, double& yMax) { @@ -82,7 +82,7 @@ void NormDensity1DFunction::apply(std::vector> &grid, yMaxToModify = false; std::map> allValues; - allValues = getGridValues(xData,nbData,xRange,xBinSize); + allValues = getGridValues(xData,xData,nbData,xRange,xBinSize); int nbRecord = 0; for(unsigned int i(0); i < allValues.size();++i){ @@ -103,5 +103,246 @@ void NormDensity1DFunction::apply(std::vector> &grid, yMin = allValues[i].size()/(double)nbRecord; } } + + grid = _cacheGrid; +} + +void Mean1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + + if (allValues[i].size() > 0){ + double mean = Histo1DFunction::mean(allValues[i]); + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(mean) : mean)); + + if(yMaxToModify){ + if(yMax < mean) + yMax =mean; + if(yMin > mean) + yMin = mean; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + + grid = _cacheGrid; + +} + +void Min1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + + if (allValues[i].size() > 0){ + double min = Histo1DFunction::min(allValues[i]); + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(min) : min)); + + if(yMaxToModify){ + if(yMax < min) + yMax =min; + if(yMin > min) + yMin = min; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + grid = _cacheGrid; +} + +void Max1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + + if (allValues[i].size() > 0){ + double max = Histo1DFunction::max(allValues[i]); + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(max) : max)); + + if(yMaxToModify){ + if(yMax < max) + yMax =max; + if(yMin > max) + yMin = max; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + grid = _cacheGrid; +} + +void Median1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + if (allValues[i].size() > 0){ + double median = Histo1DFunction::median(allValues[i]); + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(median) : median)); + + if(yMaxToModify){ + if(yMax < median) + yMax = median; + if(yMin > median) + yMin = median; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + grid = _cacheGrid; +} + +void StandardDeviation1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + if (allValues[i].size() > 0){ + double mean = Histo1DFunction::mean(allValues[i]); + double stddev = Histo1DFunction::standardDeviation(allValues[i], mean); + + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(stddev) : stddev)); + + if(yMaxToModify){ + if(yMax < stddev) + yMax = stddev; + if(yMin > stddev) + yMin = stddev; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + grid = _cacheGrid; } + +void Kurtosis1DFunction::apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax) +{ + bool yMaxToModify=true; + if(!_cacheGrid.empty()){ + grid = _cacheGrid; + return; + } + if(std::isnan(yMin)) + yMin = (yIsLog) ? 1 : 0; + if(std::isnan(yMax)) + yMax = 0; + else + yMaxToModify = false; + std::map> allValues; + allValues = getGridValues(xData,yData,nbData,xRange,xBinSize); + + for (unsigned int i(0); i < allValues.size(); ++i){ + unsigned int n = allValues[i].size(); + if (n >= 4){ + double mean = Histo1DFunction::mean(allValues[i]); + double stddev = Histo1DFunction::standardDeviation(allValues[i], mean); + double sum = 0.0; + for (const auto& value : allValues[i]) { + sum += std::pow((value - mean) / stddev, 4); + } + double kurtosis = (n * (n + 1.0) / ((n - 1.0) * (n - 2.0) * (n - 3.0))) * sum + - (3.0 * std::pow(n - 1.0, 2) / ((n - 2.0) * (n - 3.0))); + + _cacheGrid.push_back(std::make_pair(xRange.getMin()+xBinSize*i, + (yIsLog)? log10(kurtosis) + : kurtosis)); + if(yMaxToModify){ + if(yMax < kurtosis) + yMax = kurtosis; + if(yMin > kurtosis) + yMin = kurtosis; + } + if(yIsLog){ + yMin = log10(yMin); + } + } + } + grid = _cacheGrid; +} + } /* namespace plot */ diff --git a/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.hh b/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.hh index abddf4e..4a746e0 100644 --- a/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.hh +++ b/src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.hh @@ -11,6 +11,7 @@ #include #include #include +#include #include "Matrix.hh" #include "Range.hh" @@ -27,15 +28,75 @@ class Histo1DFunction { } ~Histo1DFunction(){} - virtual void apply(std::vector> &grid, double* xData, int nbData, Range xRange, double& xBinSize, + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, double& xBinSize, bool yIsLog, double& yMin, double& yMax) = 0; virtual std::string getTextLegend() { return ""; } + double mean(const std::vector& data) { + double sum = 0.0; + for (const auto& value : data) { + sum += value; + } + return sum / data.size(); + } + + double standardDeviation(const std::vector& data, double mean) { + double sum = 0.0; + for (const auto& value : data) { + sum += std::pow(value - mean, 2); + } + return std::sqrt(sum / data.size()); + } + + double sum(const std::vector& data) { + double sum = 0.0; + for (const auto& value : data) { + sum += value; + } + return sum; + } + + double max(const std::vector& data) { + if (data.empty()) { + std::cerr << "Error: Empty data for max calculation." << std::endl; + return 0.0; + } + + return *std::max_element(data.begin(), data.end()); + } + + double min(const std::vector& data) { + if (data.empty()) { + std::cerr << "Error: Empty data for min calculation." << std::endl; + return 0.0; + } - std::map> getGridValues(double* xData, int nbData, Range xRange, double xBinSize); + return *std::min_element(data.begin(), data.end()); + } + + double median(const std::vector& data) { + if (data.empty()) { + std::cerr << "Error: Empty data for median calculation." << std::endl; + return 0.0; + } + + std::vector sortedData = data; + std::sort(sortedData.begin(), sortedData.end()); + + size_t size = sortedData.size(); + if (size % 2 == 0) { + // If the size is even, take the average of the two middle elements. + return (sortedData[size / 2 - 1] + sortedData[size / 2]) / 2.0; + } else { + // If the size is odd, return the middle element. + return sortedData[size / 2]; + } + } + + std::map> getGridValues(double* xData, double* yData, int nbData, Range xRange, double xBinSize); void resetCache() { _cacheGrid.clear(); @@ -54,7 +115,7 @@ public: Density1DFunction() {} ~Density1DFunction() {} - virtual void apply(std::vector> &grid, double* xData, int nbData, Range xRange, + virtual void apply(std::vector> &grid, double* xData, double* /* yData */, int nbData, Range xRange, double& xBinSize, bool yIsLog, double& yMin, double& yMax); virtual std::string getTextLegend() { @@ -67,79 +128,91 @@ public: NormDensity1DFunction() {} ~NormDensity1DFunction() {} - virtual void apply(std::vector> &grid, double* xData, int nbData, Range xRange, - double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual void apply(std::vector> &grid, double* xData, double* /* yData */, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); virtual std::string getTextLegend() { return "Frequency"; } }; -// class Mean1DFunction : public Histo1DFunction { -// public: -// Mean1DFunction() {} -// ~Mean1DFunction() {} - -// virtual void apply(MatrixGrid &matrixGrid, double* xData, double* yData, double* zData, int nbData, Range xRange, Range yRange, -// int xBinNumber,int yBinNumber, double& zMin, double& zMax,int smoothFactor); -// virtual std::string getTextLegend() -// { -// return "Mean on bins for "; -// } -// }; - -// class Max1DFunction : public Histo1DFunction { -// public: -// Max1DFunction() {} -// ~Max1DFunction() {} - -// virtual void apply(MatrixGrid &matrixGrid, double* xData, double* yData, double* zData, int nbData, Range xRange, Range yRange, -// int xBinNumber,int yBinNumber, double& zMin, double& zMax,int smoothFactor); -// virtual std::string getTextLegend() -// { -// return "Max on bins for "; -// } -// }; - -// class Min1DFunction : public Histo1DFunction { -// public: -// Min1DFunction() {} -// ~Min1DFunction() {} - -// virtual void apply(MatrixGrid &matrixGrid, double* xData, double* yData, double* zData, int nbData, Range xRange, Range yRange, -// int xBinNumber,int yBinNumber, double& zMin, double& zMax,int smoothFactor); -// virtual std::string getTextLegend() -// { -// return "Min on bins for "; -// } -// }; - -// class Median1DFunction : public Histo1DFunction { -// public: -// Median1DFunction() {} -// ~Median1DFunction() {} - -// virtual void apply(MatrixGrid &matrixGrid, double* xData, double* yData, double* zData, int nbData, Range xRange, Range yRange, -// int xBinNumber,int yBinNumber, double& zMin, double& zMax,int smoothFactor); -// virtual std::string getTextLegend() -// { -// return "Median on bins for "; -// } -// }; - -// class StandardDeviation1DFunction : public Histo1DFunction { -// public: -// StandardDeviation1DFunction() {} -// ~StandardDeviation1DFunction() {} - -// virtual void apply(MatrixGrid &matrixGrid, double* xData, double* yData, double* zData, int nbData, Range xRange, Range yRange, -// int xBinNumber,int yBinNumber, double& zMin, double& zMax,int smoothFactor); -// virtual std::string getTextLegend() -// { -// return "Sta. deviation on bins for "; -// } -// }; +class Mean1DFunction : public Histo1DFunction { +public: + Mean1DFunction() {} + ~Mean1DFunction() {} + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Mean for "; + } +}; + +class Max1DFunction : public Histo1DFunction { +public: + Max1DFunction() {} + ~Max1DFunction() {} + + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Max for "; + } +}; + +class Min1DFunction : public Histo1DFunction { +public: + Min1DFunction() {} + ~Min1DFunction() {} + + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Min for "; + } +}; + +class Median1DFunction : public Histo1DFunction { +public: + Median1DFunction() {} + ~Median1DFunction() {} + + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Median for "; + } +}; + +class StandardDeviation1DFunction : public Histo1DFunction { +public: + StandardDeviation1DFunction() {} + ~StandardDeviation1DFunction() {} + + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Sta. dev. for "; + } +}; + +class Kurtosis1DFunction : public Histo1DFunction { +public: + Kurtosis1DFunction() {} + ~Kurtosis1DFunction() {} + + virtual void apply(std::vector> &grid, double* xData, double* yData, int nbData, Range xRange, + double& xBinSize, bool yIsLog, double& yMin, double& yMax); + virtual std::string getTextLegend() + { + return "Kurtosis for "; + } +}; } /* namespace plot */ diff --git a/src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc b/src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc index e6aad69..852b09c 100644 --- a/src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc +++ b/src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc @@ -121,9 +121,16 @@ void HistoPlot::createParameters(std::list& usedParametersId_) { if(pHistogramProperties != nullptr){ if(pHistogramProperties->getHistogramType() == "histogram1d"){ + AMDA::Parameters::ParameterSPtr originalColorParam; + if(!pHistogramProperties->getHistotypeProperties().getParamId().empty()) + originalColorParam =_parameterManager.getParameter(pHistogramProperties->getHistotypeProperties().getParamId()); if (std::find (usedParametersId_.begin(),usedParametersId_.end(),originalYParam->getId()) == usedParametersId_.end()) usedParametersId_.push_back(originalYParam->getId()); pHistogramProperties->setParamId(originalYParam->getId()); + + if(originalColorParam != nullptr) + pHistogramProperties->getHistotypeProperties().setParamId(originalColorParam->getId()); + } else if(pHistogramProperties->getHistogramType() == "histogram2d"){ ParameterAxes* xSerieParameterAxes = getParameterAxesByXSerieId(pHistogramProperties->getXId()); @@ -135,7 +142,7 @@ void HistoPlot::createParameters(std::list& usedParametersId_) originalColorParam = _parameterManager.getParameter(pHistogramProperties->getHistotypeProperties().getParamId()); } - getUsedParameters(originalXSerieParam,originalYParam,originalColorParam,pHistogramProperties->getResamplingProperties(),-1, + getUsedParameters(originalXSerieParam,originalYParam,nullptr,pHistogramProperties->getResamplingProperties(),-1, usedXParam,usedYParam,usedColorParam ); if (std::find (usedParametersId_.begin(),usedParametersId_.end(),usedXParam->getId()) == usedParametersId_.end()) @@ -340,21 +347,37 @@ void HistoPlot::histo1DUtils(double startDate, double stopDate, HistogramSeriesP xBinSize = (lXRange.getMax() - lXRange.getMin())/ xBinNumber; + //std::cout << pHistogramProperties.getHistotypeProperties().getParamId() << std::endl; ParameterData &xData = (*_pParameterValues)[pHistogramProperties.getParamId()]; + int xStartIndex; int xNbValues; xData.getIntervalBounds(startDate, stopDate, xStartIndex, xNbValues); - double* xValues; + double* xValues =nullptr; + double* yValues =nullptr; if(lXAxis->_scale==Axis::Scale::LOGARITHMIC) xValues = lXAxis->getComputedValues(xData.getValues(pHistogramProperties.getIndex(), xStartIndex),xNbValues,exp10(lXRange.getMin()), exp10(lXRange.getMax())); else xValues = xData.getValues(pHistogramProperties.getIndex(), xStartIndex); - pHistogramProperties.getHistotypeProperties().getHisto1DFunction()->apply(grid,xValues,xNbValues,lXRange, xBinSize, + + + if(!pHistogramProperties.getHistotypeProperties().getParamId().empty()){ + ParameterData &yData = (*_pParameterValues)[pHistogramProperties.getHistotypeProperties().getParamId()]; + int yStartIndex; + int yNbValues; + + xData.getIntervalBounds(startDate, stopDate, yStartIndex, yNbValues); + yValues = yData.getValues(pHistogramProperties.getHistotypeProperties().getIndex(), yStartIndex); + } + + pHistogramProperties.getHistotypeProperties().getHisto1DFunction()->apply(grid,xValues,yValues,xNbValues,lXRange, xBinSize, (lYAxis->_scale==Axis::Scale::LOGARITHMIC) ,yMin, yMax); + + if(lXAxis->_scale==Axis::Scale::LOGARITHMIC) free(xValues); diff --git a/src/ParamOutputImpl/Plot/HistoPlot/HistotypeNode.hh b/src/ParamOutputImpl/Plot/HistoPlot/HistotypeNode.hh index abf428b..19f67d4 100644 --- a/src/ParamOutputImpl/Plot/HistoPlot/HistotypeNode.hh +++ b/src/ParamOutputImpl/Plot/HistoPlot/HistotypeNode.hh @@ -51,6 +51,18 @@ public: histo1DFunction = new Density1DFunction(); else if (valueStr.compare("normdensity") == 0) histo1DFunction = new NormDensity1DFunction(); + else if (valueStr.compare("mean") == 0) + histo1DFunction = new Mean1DFunction(); + else if (valueStr.compare("max") == 0) + histo1DFunction = new Max1DFunction(); + else if (valueStr.compare("min") == 0) + histo1DFunction = new Min1DFunction(); + else if (valueStr.compare("median") == 0) + histo1DFunction = new Median1DFunction(); + else if (valueStr.compare("stadev") == 0) + histo1DFunction = new StandardDeviation1DFunction(); + else if (valueStr.compare("kurtosis") == 0) + histo1DFunction = new Kurtosis1DFunction(); else histo1DFunction = new Density1DFunction(); -- libgit2 0.21.2