[vtkusers] vtkChartXY
Hagen Mölle
h.moelle at googlemail.com
Wed Oct 20 02:23:23 EDT 2010
Hi Eric and Marcus,
I tried the new VTK master. Rotation of y-axis label is very good.
I can live with creating a new table for each plot. The point is that
there is no real difference (in coding) between creating a new vtkTable
object or using vtkDataObjectToTable. Creating the new vtkTable object
has no impact on performance of my code. So I do not see any problem.
Remove plots: I can use the address value of a vtkPlot pointer as a
unique 64bit integer.
I will start today or tomorrow looking at vtkChartXY to implement the
new label scheme for logarithmic plots.
Have a nice day,
Hagen
> Hey Hagen,
>
> I'll let Marcus reply to most of the specifics, but I just wanted to make sure you knew about a couple things that might help a bit.
>
>> In my opinion it would be really nice having a method like vtkPlot::SetInput(vtkDataSet*, vtkDataSet*) or vtkPlot::SetInput(vtkDataSet*, vtkDataSet*, int iNumPoints).
> Have you seen vtkDataObjectToTable?
>
> http://www.vtk.org/doc/nightly/html/classvtkDataObjectToTable.html
>
> Maybe it would be fine to add the complication of your proposed methods, but with this it might not be necessary.
>
>> 3. Removing a plot from a chart works with an index. Would it be possible to use (unique) identifiers (just a number). Lets imagine a vtkPlot object holds an identifier and vtkChartXY::RemovePlot(int iIdentifier) will remove this plot object. Assume you have a large number of plots and you would like to display only a few of them. Right now I would have to manage the indices of the shown plots and map them to a list of available plots. Furthermore assume one plot gets deleted from/added to the list of available plots... Working with identifiers would make it a lot easier.
> There is also a method RemovePlotInstance(vtkPlot *plot) to go along with the AddPlot(vtkPlot *plot) in which case you could think of the pointer as a unique identifier when you need to add/remove individuals and just keep track of those.
>
> http://www.vtk.org/doc/nightly/html/classvtkChart.html
>
>> I can help programming the stuff if you give me some details about the vtkChartXY class.
> Please don't be offended if this is obvious to you, but all of the source code is available to download. Since you were wanting the extra control Marcus just built in for the axis labels, and it sounds like you'd like to contribute code, I would encourage you to get the latest development code from Git.
>
> http://www.vtk.org/VTK/resources/software.html
>
> Have a good day,
> -Eric
>
> ------------------------------------------------------
> Eric E Monson
> Duke Visualization Technology Group
>
More information about the vtkusers
mailing list