[vtk-developers] Charts TestScatterPlotColors should be failing...

Eric E. Monson emonson at cs.duke.edu
Thu Dec 30 11:14:43 EST 2010


Hey Marcus,

I got back to some of my charts stuff and noticed that the scatter plot (vtkPlotPoints) coloring doesn't work, at least from Python wrapping, when you try to select the color array with the (string) column name. (Git master from yesterday.) I think the Python test should be failing and isn't.

I'm still not very familiar with running VTK tests, but should the images to compare against for these new color-by-array tests should be in VTKData? Because they're not, are machines just creating the wrong image and then thinking it passed because they're comparing against a bad result?

I'll attach an image with the CTest generated image on the left, and the correct image on the right. You see the shades-of-blue points are just black on the left, which is the default behavior when it can't find the column name ("Cosine" in this case).

The mods you made on 2010-12-24 to vtkStdString for ColorArrayName broke something... Okay, I just looked at it (while my message to vtk-dev was being rejected because I sent it from the wrong email account :), It seems to be the comparison on line 866 of vtkPlotPoints.cxx:

    if (arrayName == table->GetColumnName(c))

which I guess is always failing because it's comparing the pointers. If you change it back to use strcmp it works again:

    if (strcmp(table->GetColumnName(c), arrayName) == 0)

I find it hard to read strcmp lines, too, so if you have another way of doing it that's great, but something also needs to be done about the fact that this test should have failed and didn't...

Talk to you later,
-Eric

-------------- next part --------------
A non-text attachment was scrubbed...
Name: BadGoodTestScatterColors.png
Type: image/png
Size: 13504 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20101230/e02327a8/attachment-0001.png>


More information about the vtk-developers mailing list