[Paraview] size of color legend

Michael Müller Michael.Mueller at ivd.uni-stuttgart.de
Thu Apr 9 05:24:24 EDT 2009


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.png
Type: image/png
Size: 100890 bytes
Desc: test.png
URL: <http://www.paraview.org/pipermail/paraview/attachments/20090409/35ad303a/attachment-0001.png>


More information about the ParaView mailing list