mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-23 23:13:39 -06:00
Statistics dialog. Align plots horizontally
This commit is contained in:
parent
e843c58798
commit
14198191b1
@ -38,6 +38,7 @@
|
|||||||
#include <qwt_plot_marker.h>
|
#include <qwt_plot_marker.h>
|
||||||
#include <qwt_symbol.h>
|
#include <qwt_symbol.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include "qwt_scale_draw.h"
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
@ -147,8 +148,14 @@ void RicGridStatisticsDialog::setHistogramData(RimView* view)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Axis
|
// Axis
|
||||||
m_historgramPlot->setAxisScale(QwtPlot::xBottom, histogramData.min, histogramData.max);
|
double xAxisSize = histogramData.max - histogramData.min;
|
||||||
m_aggregatedPlot->setAxisScale(QwtPlot::xBottom, histogramData.min, histogramData.max);
|
double xAxisExtension = xAxisSize * 0.02;
|
||||||
|
m_historgramPlot->setAxisScale(QwtPlot::xBottom, histogramData.min - xAxisExtension, histogramData.max + xAxisExtension);
|
||||||
|
m_aggregatedPlot->setAxisScale(QwtPlot::xBottom, histogramData.min - xAxisExtension, histogramData.max + xAxisExtension);
|
||||||
|
|
||||||
|
// Set y axis label area width
|
||||||
|
m_historgramPlot->axisScaleDraw(QwtPlot::yLeft)->setMinimumExtent(60);
|
||||||
|
m_aggregatedPlot->axisScaleDraw(QwtPlot::yLeft)->setMinimumExtent(60);
|
||||||
|
|
||||||
// Samples
|
// Samples
|
||||||
hist->setSamples(histSamples);
|
hist->setSamples(histSamples);
|
||||||
|
Loading…
Reference in New Issue
Block a user