Commit 9e457aa4284eb2d227549035d710c3e24f6c6ba9

Authored by Erdogan Furkan
1 parent fce1dc16

For now

src/ParamOutputImpl/Plot/HistoPlot/Histo1DFunction.cc
@@ -95,8 +95,9 @@ void NormDensity1DFunction::apply(std::vector<std::pair<double,double>> &grid, @@ -95,8 +95,9 @@ void NormDensity1DFunction::apply(std::vector<std::pair<double,double>> &grid,
95 (yIsLog)? log10(allValues[i].size()/(double)nbRecord) 95 (yIsLog)? log10(allValues[i].size()/(double)nbRecord)
96 : allValues[i].size()/(double)nbRecord)); 96 : allValues[i].size()/(double)nbRecord));
97 97
98 - if(yMax < allValues[i].size()/(double)nbRecord)  
99 - yMax = allValues[i].size()/(double)nbRecord; 98 + if(yMaxToModify)
  99 + if(yMax < allValues[i].size()/(double)nbRecord)
  100 + yMax = allValues[i].size()/(double)nbRecord;
100 if(yIsLog){ 101 if(yIsLog){
101 if(yMin > allValues[i].size()/(double)nbRecord) 102 if(yMin > allValues[i].size()/(double)nbRecord)
102 yMin = allValues[i].size()/(double)nbRecord; 103 yMin = allValues[i].size()/(double)nbRecord;
src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.cc
@@ -294,7 +294,7 @@ void HistoPlot::configureAxisLegend () { @@ -294,7 +294,7 @@ void HistoPlot::configureAxisLegend () {
294 } 294 }
295 295
296 void HistoPlot::histo1DUtils(double startDate, double stopDate, HistogramSeriesProperties &pHistogramProperties, 296 void HistoPlot::histo1DUtils(double startDate, double stopDate, HistogramSeriesProperties &pHistogramProperties,
297 - std::vector<std::pair<double,double>> &grid, double &xBinSize){ 297 + std::vector<std::pair<double,double>> &grid, double &xBinSize, bool resetCache){
298 // Get X, Y axis. 298 // Get X, Y axis.
299 boost::shared_ptr<Axis> lXAxis(_panel->getAxis(pHistogramProperties.getXAxisId())); 299 boost::shared_ptr<Axis> lXAxis(_panel->getAxis(pHistogramProperties.getXAxisId()));
300 boost::shared_ptr<Axis> lYAxis(_panel->getAxis(pHistogramProperties.getYAxisId())); 300 boost::shared_ptr<Axis> lYAxis(_panel->getAxis(pHistogramProperties.getYAxisId()));
@@ -338,8 +338,10 @@ void HistoPlot::histo1DUtils(double startDate, double stopDate, HistogramSeriesP @@ -338,8 +338,10 @@ void HistoPlot::histo1DUtils(double startDate, double stopDate, HistogramSeriesP
338 lYAxis->setRange(lYRange); 338 lYAxis->setRange(lYRange);
339 } 339 }
340 340
341 -void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pParamId, HistogramSeriesProperties &pHistogramProperties){ 341 +void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pParamId,
  342 + HistogramSeriesProperties &pHistogramProperties, bool isSuperposed){
342 343
  344 + //std::cout << std::fixed << std::setprecision(0) << startDate << " ------ " << stopDate << std::endl;
343 if(pHistogramProperties.getHistogramType() == "histogram1d"){ 345 if(pHistogramProperties.getHistogramType() == "histogram1d"){
344 std::vector<std::pair<double,double>> grid; 346 std::vector<std::pair<double,double>> grid;
345 Color color = pHistogramProperties.getColor(); 347 Color color = pHistogramProperties.getColor();
@@ -416,7 +418,9 @@ void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pPa @@ -416,7 +418,9 @@ void HistoPlot::drawHistogram(double startDate, double stopDate, std::string pPa
416 yValues = yData.getValues(pHistogramProperties.getIndex(), yStartIndex); 418 yValues = yData.getValues(pHistogramProperties.getIndex(), yStartIndex);
417 419
418 zValues = zData.getValues(pHistogramProperties.getHistotypeProperties().getIndex(), zStartIndex); 420 zValues = zData.getValues(pHistogramProperties.getHistotypeProperties().getIndex(), zStartIndex);
419 - 421 + for (unsigned int i(0); i < xNbValues; ++i){
  422 + std::cout << xValues[i]<< std::endl;
  423 + }
420 for (unsigned int i(0); i < xBinNumber; ++i) 424 for (unsigned int i(0); i < xBinNumber; ++i)
421 { 425 {
422 for (unsigned int j(0); j < yBinNumber; ++j) 426 for (unsigned int j(0); j < yBinNumber; ++j)
@@ -469,3 +473,4 @@ void HistoPlot::resetPlot() @@ -469,3 +473,4 @@ void HistoPlot::resetPlot()
469 } 473 }
470 } 474 }
471 475
  476 +// Events from 'tt' in TIMEMIN - TIMEMAX
src/ParamOutputImpl/Plot/HistoPlot/HistoPlot.hh
@@ -68,9 +68,10 @@ public: @@ -68,9 +68,10 @@ public:
68 protected: 68 protected:
69 69
70 void histo1DUtils(double startDate, double stopDate, HistogramSeriesProperties &pHistogramProperties, 70 void histo1DUtils(double startDate, double stopDate, HistogramSeriesProperties &pHistogramProperties,
71 - std::vector<std::pair<double,double>> &grid, double &xBinSize); 71 + std::vector<std::pair<double,double>> &grid, double &xBinSize, bool resetCache=FALSE);
72 72
73 - virtual void drawHistogram(double startDate, double stopDate, std::string pParamId, HistogramSeriesProperties &pHistogramProperties); 73 + virtual void drawHistogram(double startDate, double stopDate, std::string pParamId,
  74 + HistogramSeriesProperties &pHistogramProperties, bool isSuperposed);
74 75
75 76
76 private: 77 private:
src/ParamOutputImpl/Plot/PanelPlotOutput.cc
@@ -1550,10 +1550,7 @@ namespace plot @@ -1550,10 +1550,7 @@ namespace plot
1550 restoreColor(_pls, lInitialColor, _panel->_page->_mode); 1550 restoreColor(_pls, lInitialColor, _panel->_page->_mode);
1551 } 1551 }
1552 void PanelPlotOutput::drawHistogramBoxes(std::vector<std::pair<double,double>> data, Color &color, double binWidth, double yMin){ 1552 void PanelPlotOutput::drawHistogramBoxes(std::vector<std::pair<double,double>> data, Color &color, double binWidth, double yMin){
1553 - for (unsigned int i(0); i < data.size(); i++ )  
1554 - {  
1555 1553
1556 - }  
1557 for (unsigned int i(0); i < data.size(); i++ ) 1554 for (unsigned int i(0); i < data.size(); i++ )
1558 { 1555 {
1559 //plcol0(i + 1); 1556 //plcol0(i + 1);
@@ -1568,7 +1565,7 @@ namespace plot @@ -1568,7 +1565,7 @@ namespace plot
1568 // set color 1565 // set color
1569 Color lInitialColor; 1566 Color lInitialColor;
1570 lInitialColor = changeColor(_pls, color, _panel->_page->_mode); 1567 lInitialColor = changeColor(_pls, color, _panel->_page->_mode);
1571 - 1568 + LOG4CXX_ERROR( gLogger, "FER --- " << (float)x0 << " ----- " << y0 );
1572 PLFLT x[4], y[4]; 1569 PLFLT x[4], y[4];
1573 1570
1574 x[0] = x0; 1571 x[0] = x0;
@@ -2671,7 +2668,7 @@ namespace plot @@ -2671,7 +2668,7 @@ namespace plot
2671 2668
2672 LOG4CXX_DEBUG(gLogger, "Draw a Histogram 1D/2D for parameter " << parameter._originalParamId); 2669 LOG4CXX_DEBUG(gLogger, "Draw a Histogram 1D/2D for parameter " << parameter._originalParamId);
2673 // Draw (configure) window for this series. 2670 // Draw (configure) window for this series.
2674 - drawHistogram(startTime, stopTime, parameter._originalParamId, *(parameter.getHistogramSeriesProperties())); 2671 + drawHistogram(startTime, stopTime, parameter._originalParamId, *(parameter.getHistogramSeriesProperties()), _panel->_page->_superposeMode);
2675 2672
2676 ParameterData &data = (*_pParameterValues)[parameter.getHistogramSeriesProperties()->getParamId()]; 2673 ParameterData &data = (*_pParameterValues)[parameter.getHistogramSeriesProperties()->getParamId()];
2677 2674
@@ -2754,7 +2751,8 @@ namespace plot @@ -2754,7 +2751,8 @@ namespace plot
2754 return !noData; 2751 return !noData;
2755 } 2752 }
2756 2753
2757 - void PanelPlotOutput::drawHistogram(double /*startDate*/, double /*stopDate*/, std::string /*pParamId*/, HistogramSeriesProperties &pHistogramProperties){ 2754 + void PanelPlotOutput::drawHistogram(double /*startDate*/, double /*stopDate*/, std::string /*pParamId*/,
  2755 + HistogramSeriesProperties &pHistogramProperties, bool /*isSuperposed*/){
2758 2756
2759 // Get X, Y and Z axis. 2757 // Get X, Y and Z axis.
2760 boost::shared_ptr<Axis> lXAxis(_panel->getAxis(pHistogramProperties.getXAxisId())); 2758 boost::shared_ptr<Axis> lXAxis(_panel->getAxis(pHistogramProperties.getXAxisId()));
@@ -2764,7 +2762,7 @@ namespace plot @@ -2764,7 +2762,7 @@ namespace plot
2764 Range lYRange = lYAxis->getRange(); 2762 Range lYRange = lYAxis->getRange();
2765 2763
2766 // Range lZRange = getZAxisRange (pSeries, lZAxis); 2764 // Range lZRange = getZAxisRange (pSeries, lZAxis);
2767 - 2765 + std::cout << lXRange.getMin() << " ---- " << lXRange.getMax() << " ---- " << lYRange.getMin() << " ---- " << lYRange.getMax() << std::endl;
2768 PlWindow lPlWindow = PlWindow(lXRange.getMin(), lXRange.getMax(), lYRange.getMin(), lYRange.getMax()); 2766 PlWindow lPlWindow = PlWindow(lXRange.getMin(), lXRange.getMax(), lYRange.getMin(), lYRange.getMax());
2769 // Calculate X and Y tick 2767 // Calculate X and Y tick
2770 TickConf lTickConf; 2768 TickConf lTickConf;
src/ParamOutputImpl/Plot/PanelPlotOutput.hh
@@ -417,7 +417,8 @@ protected: @@ -417,7 +417,8 @@ protected:
417 virtual void drawSauvaud(double startDate, double stopDate, std::string pParamId, 417 virtual void drawSauvaud(double startDate, double stopDate, std::string pParamId,
418 SauvaudProperties& pSauvaud, int subIndex, int subsNumber, std::string opositeLegend); 418 SauvaudProperties& pSauvaud, int subIndex, int subsNumber, std::string opositeLegend);
419 419
420 - virtual void drawHistogram(double startTime, double stopTime, std::string pParamId, HistogramSeriesProperties& HistogramSeriesProperties); 420 + virtual void drawHistogram(double startTime, double stopTime, std::string pParamId,
  421 + HistogramSeriesProperties& HistogramSeriesProperties, bool isSuperposed);
421 422
422 virtual void drawIntervals(double startDate, double stopDate, std::string pParamId, 423 virtual void drawIntervals(double startDate, double stopDate, std::string pParamId,
423 IntervalsProperties& pIntervals); 424 IntervalsProperties& pIntervals);