[vtkusers] How to put a legend box?

Karthik Krishnan karthik.krishnan at kitware.com
Tue Feb 2 10:52:45 EST 2010


Is this a 3D scene or a flat 2D scene. If its a 3D scene and if you
are using perspective projection, its a really bad idea to using an
annotation that's driven by size is obviously going to be incorrect.
If you are using a parallel projection, you are going to have to
redraw the legend with various zoom levels .

The would be the simplest way to go, is as you've pointed out : color
map the vectors by their magnitude and simply use a vtkScalarBarActor.
Why do you find it necessary "to use both color and size in the second
case" ?


On Mon, Feb 1, 2010 at 12:23 PM, Rakesh Patil <rakeshthp at in.com> wrote:
>
>
> Thanks David,
>
> I understand the concept of legendboxactor now.. But I hope you know why i
> want to
> use different sized symbol.. I am displaying vector plots. So to show the
> magnitude
> range of a vector (min and max size of arrow) i need different sized shapes
> in legendboxactor.
>
> As you said, colors, these vectors can be plotted either in black color, or
> with color
> scaled by the vector magnitude. So in second case, i need both color and
> size to
> indicate range. Whereas in first case i only need size...
>
> So, Apart from writing my own actor, can anyone suggest some other
> solution..??
>
> Thanks 'n' Regards
>
> ---------- Original message ----------
> From:David Doria< daviddoria+vtk at gmail.com >
> Date: 01 Feb 10 19:29:20
> Subject: Re: [vtkusers] How to put a legend box?
> To: rakeshthp at in.com
>
> On Mon, Feb 1, 2010 at 5:24 AM, Rakesh Patil wrote:
>> Hello,
>>
>> I want to di splay a legend box ... The legend should be an arrow. One big
>> arrow and one small arrow along with the smallest and the largest length
>> of
>> the arrow. How do i do this..??
>>
>> Thanks
>>
>
> The problem was that he was trying to put different sized symbols in
> the legend box. Rakesh, the legend actor automatically resizes the
> symbols, as we discussed in the last thread about this. Different
> sized symbols in a legend is probably not a good idea, hence why
> they've written the code as such. You'll probably either want to dig
> into the code of the actor or find a different way (maybe color?) to
> indicate which arrows are which.
>
> Thanks,
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list