[Paraview] Python Scalar Bar Label Text Size
Kent Eschenberg
eschenbe at psc.edu
Mon Mar 31 22:38:45 EDT 2008
The Python program below works except that LabelFontSize doesn't seem to have any effect. TitleFontSize works as expected.
Another object, servermanager.sources.TextSource, requires that its property ScaledText be set to 0 before its FontSize parameter had an effect. Alas, there seems to be no such option for the scalar bar. The label text is controlled only by the overall object size (Position2).
Have I missed something? Is there a workaround?
TIA!
Kent
Pittsburgh Supercomputing Center
==========
from paraview import servermanager
servermanager.Connect()
V = servermanager.CreateRenderView()
C = servermanager.rendering.PVLookupTable()
C.ColorSpace = 1
C.RGBPoints = ( 0,1,0,0, 1,1,1,0 )
bar = servermanager.rendering.ScalarBarWidgetRepresentation(
registrationGroup='scalar_bars',
registrationName="ScalarBarWidgetRepresentation1"
)
bar.Title = 'Scalar Bar Test'
bar.LookupTable = C
bar.TitleFontSize = 20
bar.LabelFontSize = 20
bar.Position = [ 0.25, 0.1 ]
bar.Position2 = [ 0.5, 0.8 ]
V.Representations.append( bar )
raw_input("Exit: ")
More information about the ParaView
mailing list