[vtkusers] Color legends for vtkCharts
Marcus D. Hanwell
marcus.hanwell at kitware.com
Fri May 10 14:41:30 EDT 2013
On Fri, May 10, 2013 at 2:19 PM, Bastian A. <bastianra at gmail.com> wrote:
> Hello all,
>
> I am using vtkPlotPoints to create a plot in which I am setting the color
> of the points using vtkPlotPoints::SelectColorArray, SetScalarVisibility(1)
> and a continuous lookup table.
> This is working great, however I am having trouble displaying a legend
> that shows how the colors are mapped to the scalar range of the data.
> Using SetShowLegend(1) will turn on a legend that only displays the marker
> and the name of the column that is plotted.
>
> How can I display a legend that shows how colors map to scalar values
> (Using vtk 6) ?
>
I am afraid that is a feature we currently lack in the charts. I haven't
tried this, but the vtkColorLegend class is used in the 2D histogram chart
to display this data. You could probably set the transfer function on it
and place it on the scene. That may do most of what you want, then you
would need to handle the layout. This could obviously be added to the
charts in a future release, but I am not sure about the ideal layout if
multiple series using multiple transfer functions and all want to be shown
in an extended legend.
Marcus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130510/3a9364aa/attachment.htm>
More information about the vtkusers
mailing list