[Paraview] size of color legend

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Thu Apr 9 09:10:22 EDT 2009


bar.Position2 can be used to control the size. It's the normalize
display size relative to the Position.

Utkarsh

On Thu, Apr 9, 2009 at 5:24 AM, Michael Müller
<Michael.Mueller at ivd.uni-stuttgart.de> wrote:
> Is there an option to define the size of a color bar? Except that, everything is working quite fine using the ScalarBarWidgetRepresentation(). Just the size seems too large and I can't any switch for that issue... (see also appendix)
> My script looks like that:
> ...
>        # Format of the color bar     ### TODO size of bar !!!
>        bar = sm.rendering.ScalarBarWidgetRepresentation()
>        bar.Visibility  = 1           # switch on color bar
>        bar.LookupTable = lt          # assign the lookup table to the color bar
>        bar.TitleColor = [0,0,0]      # switch to black
>        bar.LabelColor = [0,0,0]      # switch to black
>        bar.TitleFontSize = 10
>        bar.LabelFontSize = 10
>        bar.AutomaticLabelFormat = 0  # switch off, to modify the format
>        bar.LabelFormat   = "%-#8.2f" # format of labels
>        bar.AspectRatio   = 15
>        bar.Position  = [0.85,0.1]    # relative position of bar and labels
>        rv.Representations.append(bar)
> ...
>
> Thanks in advance!
>
> Michael
> _______________________________________________
> 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 ParaView Wiki at: http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
>


More information about the ParaView mailing list