Commit 7ad77cda authored by LEFEBVREJP email's avatar LEFEBVREJP email
Browse files

Merge branch 'vtkchartwidget' into 'master'

VTK points with error bars

See merge request !52
parents 09536d0f a7d524b7
Pipeline #15657 passed with stages
in 8 minutes and 21 seconds
......@@ -5,6 +5,9 @@ stages:
.windows_before_script: &windows_before_script
before_script:
- set PATH=%PATH%;c:\vendors\mingw-w64\x86_64-4.8.5-posix-seh-rt_v4-rev0\mingw64\bin;c:\vendors\mingw-w64\qt\5.9.1\bin
.windows_msvc_before_script: &windows_msvc_before_script
before_script:
- set PATH=c:\Qt\5.9.1\msvc2013_64\bin;%PATH%;c:\Program Files (x86)\NSIS\Bin
mac_gcc_testing:
tags:
......@@ -13,14 +16,14 @@ mac_gcc_testing:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- module load cmake gcc/4.8.5
- module load cmake gcc/4.8.5 qt/5.9.1 vtk/8.1.0
- which cmake
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-GCC-4.8.5-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-GCC-4.8.5-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -DExperimentalMemCheck -D ExperimentalSubmit
mac_llvm_testing:
......@@ -30,14 +33,14 @@ mac_llvm_testing:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- module load cmake
- module load cmake qt/5.9.1 vtk/8.1.0
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- which cmake
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-LLVM-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DDEBUG_OUTPUT=1 -DBUILDNAME=$(uname -s)-LLVM-Debug-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=DEBUG -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -DExperimentalMemCheck -D ExperimentalSubmit
......@@ -53,10 +56,10 @@ linux_gcc_testing:
- python TriBITS/tribits/ci_support/clone_extra_repos.py
- mkdir build
- cd build
- module load cmake
- module load cmake qt/5.9.0 vtk/8.1.0
- which cmake
- module load valgrind
- cmake -DBUILDNAME=$(uname -s)-GCC-4.8.5-Release-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=Release -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF ..
- cmake -DBUILDNAME=$(uname -s)-GCC-4.8.5-Release-${CI_BUILD_REF_NAME} -DCMAKE_BUILD_TYPE=Release -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
linux_analysis:
......@@ -79,17 +82,6 @@ linux_analysis:
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalMemCheck -D ExperimentalCoverage -D ExperimentalSubmit
allow_failure: true
linux_openmpi_testing:
tags:
- linux
script:
- which git
- git --version
- git clone https://github.com/lefebvre/TriBITS.git TriBITS
- which python
- python --version
- python TriBITS/tribits/ci_support/clone_extra_repos.py
linux_openmpi_testing:
tags:
- linux
......@@ -127,6 +119,7 @@ windows_mingw_testing:
windows_intel_shared_testing:
tags:
- nsmwin10
<<: *windows_msvc_before_script
script:
- 'call "c:/Program Files (x86)/Intel/Composer XE 2015/bin/ipsxe-comp-vars.bat" intel64 vs2013'
- where git
......@@ -138,5 +131,6 @@ windows_intel_shared_testing:
- git clone https://github.com/lefebvre/googletest googletest
- mkdir build
- cd build
- cmake -DBUILD_SHARED_LIBS=ON -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib -DTPL_BLAS_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -Dradix_ENABLE_radixplot=OFF -Dradix_ENABLE_radixwidgets=OFF -Dradix_ENABLE_radixglls=OFF -G "NMake Makefiles" ..
- SET VTK_DIR=c:\vendors\cl\vtk\8.1.0\
- cmake -Dradix_VERBOSE_CONFIGURE=ON -DBUILD_SHARED_LIBS=ON -DTPL_LAPACK_LIBRARIES=c:/vendors/intel/lapack/3.5.0/lib/lapack.lib\\\;c:/vendors/intel/lapack/3.5.0/lib/blas.lib -DBUILDNAME=Windows-Intel-15-Release-%CI_BUILD_REF_NAME% -DCMAKE_C_COMPILER=icl -DCMAKE_CXX_COMPILER=icl -DCMAKE_BUILD_TYPE=RELEASE -Dradix_ENABLE_SECONDARY_TESTED_CODE=ON -Dradix_ENABLE_TESTS=ON -DTPL_ENABLE_VTK=ON -Dradix_ENABLE_radixplot=OFF -G "NMake Makefiles" ..
- ctest -D ExperimentalStart -D ExperimentalBuild -D ExperimentalTest -D ExperimentalSubmit
......@@ -61,9 +61,12 @@ ELSE()
SET(HEADERS ${HEADERS}
vtkchartwidget.hh
)
SET(SOURCES
SET(SOURCES
${SOURCES}
vtkchartwidget.cc
vtkPlotErrorBars.cc
vtkPlotLineErrorBars.cc
vtkPlotPointsErrorBars.cc
)
ENDIF()
QT5_WRAP_CPP(MOC_FILES
......@@ -72,6 +75,13 @@ ELSE()
SET(HEADERS ${HEADERS}
navigationitem.hh
)
IF(TPL_ENABLE_VTK)
SET(HEADERS ${HEADERS}
vtkPlotErrorBars.hh
vtkPlotLineErrorBars.hh
vtkPlotPointsErrorBars.hh
)
ENDIF()
#
# Process qt resource files
#QT5_ADD_RESOURCES(RESOURCE_RESULT
......
......@@ -25,8 +25,11 @@ ELSE()
QT5_WRAP_CPP(QMOC_FILES4
radixvtkchartwidget.hh
)
QT5_WRAP_CPP(QMOC_FILES5
radixvtkerrorbars.hh
)
ENDIF()
QT5_WRAP_CPP(QMOC_FILES5
QT5_WRAP_CPP(QMOC_FILES6
radixnavigationwidget.hh
)
TRIBITS_ADD_EXECUTABLE(radixnumberpadwidget
......@@ -36,7 +39,7 @@ ELSE()
)
TRIBITS_ADD_EXECUTABLE(radixnavigationwidget
NOEXEPREFIX
SOURCES radixnavigationwidget.cc ${QMOC_FILES5}
SOURCES radixnavigationwidget.cc ${QMOC_FILES6}
radixnavigationwidget.hh
)
IF(TPL_ENABLE_VTK)
......@@ -44,6 +47,12 @@ ELSE()
TRIBITS_ADD_EXECUTABLE(radixvtkchartwidget
NOEXEPREFIX
SOURCES radixvtkchartwidget.cc ${QMOC_FILES4}
radixvtkchartwidget.hh
)
TRIBITS_ADD_EXECUTABLE(radixvtkerrorbars
NOEXEPREFIX
SOURCES radixvtkerrorbars.cc ${QMOC_FILES5}
radixvtkerrorbars.hh
)
ENDIF()
ENDIF()
......
#include <vtkAutoInit.h>
VTK_MODULE_INIT(vtkRenderingContextOpenGL2)
VTK_MODULE_INIT(vtkRenderingOpenGL2)
VTK_MODULE_INIT(vtkInteractionStyle)
VTK_MODULE_INIT(vtkRenderingFreeType)
#include <QApplication>
#include <QGridLayout>
#include <QMainWindow>
#include <QWidget>
#include "vtkFloatArray.h"
#include "vtkTable.h"
#include "radixwidgets/vtkPlotErrorBars.hh"
#include "radixwidgets/vtkPlotLineErrorBars.hh"
#include "radixwidgets/vtkPlotPointsErrorBars.hh"
#include "radixwidgets/vtkchartwidget.hh"
#include "radixvtkerrorbars.hh"
vtkChartMainWindow::vtkChartMainWindow(QWidget* parent)
: QMainWindow(parent)
{
setGeometry(400, 250, 542, 390);
// needed to ensure appropriate OpenGL context is created for VTK rendering.
QSurfaceFormat::setDefaultFormat(QVTKOpenGLWidget::defaultFormat());
// Test widget
QWidget* widget = new QWidget(this);
QGridLayout* layout = new QGridLayout(widget);
radix::VTKChartWidget* vtkChartWidget = new radix::VTKChartWidget(this);
layout->addWidget(vtkChartWidget, 0, 0);
setCentralWidget(widget);
// Create a table with some points in it
vtkNew<vtkTable> table;
vtkNew<vtkFloatArray> arrX;
arrX->SetName("X Axis");
table->AddColumn(arrX);
vtkNew<vtkFloatArray> arrC;
arrC->SetName("Cosine");
table->AddColumn(arrC);
vtkNew<vtkFloatArray> arrS;
arrS->SetName("Sine");
table->AddColumn(arrS);
vtkNew<vtkFloatArray> arrSum;
arrSum->SetName("Sum");
table->AddColumn(arrSum);
vtkNew<vtkFloatArray> arrXErr;
arrXErr->SetName("x error");
table->AddColumn(arrXErr);
vtkNew<vtkFloatArray> arrCosErr;
arrCosErr->SetName("cos error");
table->AddColumn(arrCosErr);
vtkNew<vtkFloatArray> arrSumErr;
arrSumErr->SetName("Sum error");
table->AddColumn(arrSumErr);
int numPoints = 29;
float inc = 7.0 / (numPoints - 1);
table->SetNumberOfRows(numPoints);
for (int i = 0; i < numPoints; ++i)
{
float x = i * inc, sin = std::sin(x), cos = std::cos(x),
sum = std::fabs(sin) + std::fabs(cos), xErr = x / 10.0,
cosErr = cos / 5.0, sumErr = sum / 5.0;
table->SetValue(i, 0, x);
table->SetValue(i, 1, cos);
table->SetValue(i, 2, sin);
table->SetValue(i, 3, sum);
table->SetValue(i, 4, xErr);
table->SetValue(i, 5, cosErr);
table->SetValue(i, 6, sumErr);
}
vtkPlotLineErrorBars* cosLine = vtkPlotLineErrorBars::New();
vtkChartWidget->chartXY()->AddPlot(cosLine);
cosLine->SetInputData(table, 0, 1, 4, 5); // x-axis and cos with errors
cosLine->SetPlotErrorBars(1);
cosLine->SetColor(255, 0, 0, 255);
cosLine->SetWidth(0.5);
vtkPlotPointsErrorBars* sinPoints = vtkPlotPointsErrorBars::New();
vtkChartWidget->chartXY()->AddPlot(sinPoints);
sinPoints->SetInputData(table, 0, 2); // x-axis and sin
sinPoints->SetColor(0, 255, 0, 255);
sinPoints->SetWidth(5.0);
vtkPlotPointsErrorBars* sumPoints = vtkPlotPointsErrorBars::New();
vtkChartWidget->chartXY()->AddPlot(sumPoints);
sumPoints->SetInputData(table, 0, 3, 4, 6); // x-axis and sum with errors
sumPoints->SetPlotErrorBars(1);
sumPoints->SetColor(255, 0, 255, 255);
sumPoints->SetWidth(2.0);
}
vtkChartMainWindow::~vtkChartMainWindow() {}
/******************************************************************************/
/******************************** MAIN PROGRAM ********************************/
/******************************************************************************/
int main(int argc, char** argv)
{
QApplication app(argc, argv);
vtkChartMainWindow mainWindow;
mainWindow.show();
mainWindow.raise();
return app.exec();
}
#ifndef RADIX_RADIXWIDGETS_EXAMPLE_RADIXVTKERRORBARS_HH_
#define RADIX_RADIXWIDGETS_EXAMPLE_RADIXVTKERRORBARS_HH_
#include <QMainWindow>
namespace Ui
{
class vtkChartMainWindow;
}
class vtkChartMainWindow : public QMainWindow
{
Q_OBJECT
private:
public:
explicit vtkChartMainWindow(QWidget *parent = 0);
~vtkChartMainWindow();
};
#endif // RADIX_RADIXWIDGETS_EXAMPLE_RADIXVTKERRORBARS_HH_
/*=========================================================================
Program: Visualization Toolkit
Module: vtkPlot.cxx
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "radixwidgets/vtkPlotErrorBars.hh"
#include <sstream>
#include "vtkAxis.h"
#include "vtkBrush.h"
#include "vtkContextMapper2D.h"
#include "vtkDataObject.h"
#include "vtkIdTypeArray.h"
#include "vtkNew.h"
#include "vtkObjectFactory.h"
#include "vtkPen.h"
#include "vtkStringArray.h"
#include "vtkTable.h"
vtkCxxSetObjectMacro(vtkPlotErrorBars, XAxis, vtkAxis);
vtkCxxSetObjectMacro(vtkPlotErrorBars, YAxis, vtkAxis);
//-----------------------------------------------------------------------------
vtkPlotErrorBars::vtkPlotErrorBars()
{
vtkPlot::ShiftScale = vtkRectd(0.0, 0.0, 1.0, 1.0);
this->Pen = vtkSmartPointer<vtkPen>::New();
this->Pen->SetWidth(2.0);
this->Brush = vtkSmartPointer<vtkBrush>::New();
this->SelectionPen = vtkSmartPointer<vtkPen>::New();
this->SelectionPen->SetColor(255, 50, 0, 150);
this->SelectionPen->SetWidth(4.0);
this->SelectionBrush = vtkSmartPointer<vtkBrush>::New();
this->SelectionBrush->SetColor(255, 50, 0, 150);
this->Labels = nullptr;
this->UseIndexForXSeries = false;
this->Data = vtkSmartPointer<vtkContextMapper2D>::New();
this->Selectable = true;
this->Selection = nullptr;
this->XAxis = nullptr;
this->YAxis = nullptr;
this->TooltipDefaultLabelFormat = "%l: %x, %y";
this->TooltipNotation = vtkAxis::STANDARD_NOTATION;
this->TooltipPrecision = 6;
this->LegendVisibility = true;
}
//-----------------------------------------------------------------------------
vtkPlotErrorBars::~vtkPlotErrorBars()
{
if (this->Selection)
{
this->Selection->Delete();
this->Selection = nullptr;
}
this->SetLabels(nullptr);
this->SetXAxis(nullptr);
this->SetYAxis(nullptr);
}
//-----------------------------------------------------------------------------
bool vtkPlotErrorBars::PaintLegend(vtkContext2D *, const vtkRectf &, int)
{
return false;
}
//-----------------------------------------------------------------------------
vtkIdType vtkPlotErrorBars::GetNearestPoint(const vtkVector2f &,
const vtkVector2f &, vtkVector2f *)
{
return -1;
}
//-----------------------------------------------------------------------------
vtkStdString vtkPlotErrorBars::GetTooltipLabel(const vtkVector2d &plotPos,
vtkIdType seriesIndex, vtkIdType)
{
vtkStdString tooltipLabel;
vtkStdString &format = this->TooltipLabelFormat.empty()
? this->TooltipDefaultLabelFormat
: this->TooltipLabelFormat;
// Parse TooltipLabelFormat and build tooltipLabel
bool escapeNext = false;
for (size_t i = 0; i < format.length(); ++i)
{
if (escapeNext)
{
switch (format[i])
{
case 'x':
tooltipLabel += this->GetNumber(plotPos.GetX(), this->XAxis);
break;
case 'y':
tooltipLabel += this->GetNumber(plotPos.GetY(), this->YAxis);
break;
case 'i':
if (this->IndexedLabels && seriesIndex >= 0 &&
seriesIndex < this->IndexedLabels->GetNumberOfTuples())
{
tooltipLabel += this->IndexedLabels->GetValue(seriesIndex);
}
break;
case 'l':
// GetLabel() is GetLabel(0) in this implementation
tooltipLabel += this->GetLabel();
break;
default: // If no match, insert the entire format tag
tooltipLabel += "%";
tooltipLabel += format[i];
break;
}
escapeNext = false;
}
else
{
if (format[i] == '%')
{
escapeNext = true;
}
else
{
tooltipLabel += format[i];
}
}
}
return tooltipLabel;
}
//-----------------------------------------------------------------------------
vtkStdString vtkPlotErrorBars::GetNumber(double position, vtkAxis *axis)
{
// Determine and format the X and Y position in the chart
std::ostringstream ostr;
ostr.imbue(std::locale::classic());
ostr.precision(this->GetTooltipPrecision());
if (this->GetTooltipNotation() == vtkAxis::SCIENTIFIC_NOTATION)
{
ostr.setf(ios::scientific, ios::floatfield);
}
else if (this->GetTooltipNotation() == vtkAxis::FIXED_NOTATION)
{
ostr.setf(ios::fixed, ios::floatfield);
}
if (axis && axis->GetLogScaleActive())
{
// If axes are set to logarithmic scale we need to convert the
// axis value using 10^(axis value)
ostr << pow(double(10.0), double(position));
}
else
{
ostr << position;
}
return ostr.str();
}
//-----------------------------------------------------------------------------
bool vtkPlotErrorBars::SelectPoints(const vtkVector2f &, const vtkVector2f &)
{
if (this->Selection)
{
this->Selection->SetNumberOfTuples(0);
}
return false;
}
//-----------------------------------------------------------------------------
bool vtkPlotErrorBars::SelectPointsInPolygon(const vtkContextPolygon &)
{
if (this->Selection)
{
this->Selection->SetNumberOfTuples(0);
}
return false;
}
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetColor(unsigned char r, unsigned char g,
unsigned char b, unsigned char a)
{
this->Pen->SetColor(r, g, b, a);
}
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetColor(double r, double g, double b)
{
this->Pen->SetColorF(r, g, b);
}
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::GetColor(double rgb[3]) { this->Pen->GetColorF(rgb); }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::GetColor(unsigned char rgb[3])
{
double rgbF[3];
this->GetColor(rgbF);
rgb[0] = static_cast<unsigned char>(255. * rgbF[0] + 0.5);
rgb[1] = static_cast<unsigned char>(255. * rgbF[1] + 0.5);
rgb[2] = static_cast<unsigned char>(255. * rgbF[2] + 0.5);
}
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetWidth(float width) { this->Pen->SetWidth(width); }
//-----------------------------------------------------------------------------
float vtkPlotErrorBars::GetWidth() { return this->Pen->GetWidth(); }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetPen(vtkPen *pen)
{
if (this->Pen != pen)
{
this->Pen = pen;
this->Modified();
}
}
//-----------------------------------------------------------------------------
vtkPen *vtkPlotErrorBars::GetPen() { return this->Pen; }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetBrush(vtkBrush *brush)
{
if (this->Brush != brush)
{
this->Brush = brush;
this->Modified();
}
}
//-----------------------------------------------------------------------------
vtkBrush *vtkPlotErrorBars::GetBrush() { return this->Brush; }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetSelectionPen(vtkPen *pen)
{
if (this->SelectionPen != pen)
{
this->SelectionPen = pen;
this->Modified();
}
}
//-----------------------------------------------------------------------------
vtkPen *vtkPlotErrorBars::GetSelectionPen() { return this->SelectionPen; }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetSelectionBrush(vtkBrush *brush)
{
if (this->SelectionBrush != brush)
{
this->SelectionBrush = brush;
this->Modified();
}
}
//-----------------------------------------------------------------------------
vtkBrush *vtkPlotErrorBars::GetSelectionBrush() { return this->SelectionBrush; }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetLabel(const vtkStdString &label)
{
vtkNew<vtkStringArray> labels;
labels->InsertNextValue(label);
this->SetLabels(labels);
}
//-----------------------------------------------------------------------------
vtkStdString vtkPlotErrorBars::GetLabel() { return this->GetLabel(0); }
//-----------------------------------------------------------------------------
void vtkPlotErrorBars::SetLabels(vtkStringArray *labels)
{
if (this->Labels == labels)
{
return;
}
this->Labels = labels;
this->Modified();
}
//-----------------------------------------------------------------------------
vtkStringArray *vtkPlotErrorBars::GetLabels()
{
// If the label string is empty, return the y column name
if (this->Labels)
{
return this->Labels;
}
else if (this->AutoLabels)
{
return this->AutoLabels;
}
else if (this->Data->GetInput() &&
this->Data->GetInputArrayToProcess(1, this->Data->GetInput()))
{
this->AutoLabels = vtkSmartPointer<vtkStringArray>::New();
this->AutoLabels->InsertNextValue(
this->Data->GetInputArrayToProcess(1, this->Data->GetInput())
->GetName());
return this->AutoLabels;
}
else
{
return nullptr;
}
}
//-----------------------------------------------------------------------------
int vtkPlotErrorBars::GetNumberOfLabels()
{