[vtk-developers] ChartParallelCoordinates data switching

Eric E. Monson emonson at cs.duke.edu
Tue Sep 28 11:49:17 EDT 2010


Hey Marcus,

Yes, I think that would work. I guess my preference would be to default to all of the columns visible by default. If people try to put too many columns in the plot (not that I'm doing that... no, no...), then they have to decide, anyway, which ones are really important, and it's unlikely that the first 10 are going to necessarily be the right choice. (Plus, it screwed me up for a little while not understanding why all of my data wasn't showing up.)

Thanks,
-Eric

On Sep 28, 2010, at 10:50 AM, Marcus D. Hanwell wrote:

> On Tuesday 28 September 2010 10:45:29 Eric E. Monson wrote:
>> Hey Marcus,
>> 
>> In my application I was switching the data in a parallel coordinates chart
>> and noticed that there are problems (and no intuitive solution) if you
>> swap out the data to a new set which has less axes/columns. If you just do
>> a chart.GetPlot(0).SetInput(table) with a new table that has less columns
>> than the previous one you get a Segmentation Fault. (I'll put a short
>> python script at the end that demonstrates this.)
>> 
>> You can get around it by first turning off the visibility of all the
>> current axes, since the plot relies on the column visibility data for its
>> updating routines. (To see that this seems to work, set the if(False) to
>> if(True) in the script.)
>> 
>> In my custom version I just added a SetAllColumnsInvisible() method, which
>> just does a this->VisibleColumns->SetNumberOfTuples(0); (plus a Modified
>> and Update), and if I call this before resetting the data in the plot it
>> seems to work fine. This name won't help people, though, since it's not
>> obvious that you'd need to call this before swapping the data...
>> 
>> So, I don't have the ideal solution, just one that's working for me, but I
>> thought I'd bring this to your attention since it seems like something
>> that should be addressed at some point.
> 
> Hi Eric,
> 
> I see why that would happen, I think a general solution would be to check if 
> the number of columns changed, and if it did to reset the visible columns. 
> Would this match your expectations? The question then becomes should all 
> columns be made visible by default, or none?
> 
> Marcus
> -- 
> Marcus D. Hanwell, Ph.D.
> R&D Engineer, Kitware Inc.
> (518) 881-4937




More information about the vtk-developers mailing list