[Paraview] Set color legend font color (pv web)

Scott Wittenburg scott.wittenburg at kitware.com
Mon May 1 15:03:21 EDT 2017


Maybe we need to see more context (how you got your hands on barRep, and
what else you did)?  I just used ParaView Qt client to visualize the
wavelet, and I changed these colors before exporting the state as a python
script.  I think the following covers what you should need to do:

from paraview.simple import *
...
rv1 = CreateView('RenderView')
...
lut = GetColorTransferFunction('RTData')
...
repr = Show(someSrc, rv1)
repr.LookupTable = lut
...
repr.SetScalarBarVisibility(rv1, True)
...
lutColorBar = GetScalarBar(lut, rv1)
lutColorBar.TitleColor = [...]
lutColorBar.LabelColor = [...]

Then finally maybe a Render() is required?

If you do all that and the color doesn't change, there may be a bug.  Even
though the protocols we have now do not allow for changing the title and
label color (at least not to my knowledge), you can manage this all in your
application code.

Hope this helps,
Scott


On Mon, May 1, 2017 at 12:00 PM, Daniel Zuidinga <info at seoaachen.de> wrote:

> Hi,
>
> I try to set the color legend font color in protocols.py of paraview web
> visualizer.
>
> def updateScalarbarVisibility(self, options):
>     ...
>    barRep.TitleColor=[0.0,0.0,0.0]
>    barRep.LabelColor=[0.0,0.0,0.0]
>
> but it doesn't change the color. Where can I change it (default)? I would
> also show it as default.
>
> regards
> Daniel
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Search the list archives at: http://markmail.org/search/?q=ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170501/db7bb673/attachment.html>


More information about the ParaView mailing list