diff --git a/KEMField/Source/Plugins/VTK/include/KVTKIterationPlotter.hh b/KEMField/Source/Plugins/VTK/include/KVTKIterationPlotter.hh index ad096e8ec..80b93ac10 100644 --- a/KEMField/Source/Plugins/VTK/include/KVTKIterationPlotter.hh +++ b/KEMField/Source/Plugins/VTK/include/KVTKIterationPlotter.hh @@ -82,8 +82,11 @@ template void KVTKIterationPlotter::CreatePlot() dots->SetInputData(table, 0, 1); #endif dots->SetColor(0, 0, 0, 255); - +#if VTK_VERSION_NUMBER >= 90700000000ULL + if (fArrayX->GetCapacity() >= 2) { +#else if (fArrayX->GetSize() >= 2) { +#endif vtkPlot* line = fChart->AddPlot(vtkChart::LINE); #if VTK_MAJOR_VERSION <= 5 line->SetInput(table, 0, 1);