From 4719fff09a2eaf80d4060383c80f229b2aa000fb Mon Sep 17 00:00:00 2001 From: l_maliakal_d Date: Tue, 16 Apr 2013 14:52:27 +0000 Subject: [PATCH] sample 2d plot git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorGui@173 af1100a4-978c-4157-bff7-07162d2ba061 --- slsDetectorGui/src/qDrawPlot.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/slsDetectorGui/src/qDrawPlot.cpp b/slsDetectorGui/src/qDrawPlot.cpp index ede539f9a..272f09b11 100644 --- a/slsDetectorGui/src/qDrawPlot.cpp +++ b/slsDetectorGui/src/qDrawPlot.cpp @@ -204,7 +204,7 @@ void qDrawPlot::SetupWidgetWindow(){ layout->addWidget(boxPlot,1,1); boxPlot->setAlignment(Qt::AlignHCenter); boxPlot->setFont(QFont("Sans Serif",11,QFont::Normal)); - + boxPlot->setTitle("Sample Plot"); plot_update_timer = new QTimer(this); connect(plot_update_timer, SIGNAL(timeout()), this, SLOT(UpdatePlot())); data_pause_timer = new QTimer(this); @@ -235,6 +235,11 @@ void qDrawPlot::SetupWidgetWindow(){ Clear1DPlot(); plot2D = new SlsQt2DPlotLayout(boxPlot); + //default plot + lastImageArray = new double[nPixelsY*nPixelsX]; + for(unsigned int px=0;pxsetFont(QFont("Sans Serif",9,QFont::Normal)); plot2D->GetPlot()->SetData(nPixelsX,-0.5,nPixelsX-0.5,nPixelsY,startPixel,endPixel,lastImageArray); plot2D->setTitle(GetImageTitle());