[Paraview] Changing Chart Series Visibilities from Python

Greg Schussman schussman at slac.stanford.edu
Thu Oct 6 14:30:24 EDT 2011


Hi, Pat.

In the Pipeline Browser, PlotData1 is visible (non-greyed out eye next 
to it), and selected (white text on blue background).  There's a blue 
border around the displayed chart (and not around the 3d view next to it).

When I say

   rep.Visibility = 0
   Render()

the plot window goes all white, and

   rep.Visibilty = 1
   Render()

brings the plot back.

I'm guessing that means rep refers to the correct thing.

How is the ParaView GUI able to see something that I can't?  Or is it 
just that ParaView does most of it's work directly in C++?

Thanks for your help.

Greg


On 10/06/2011 11:10 AM, pat marion wrote:
> Are you sure that the chart view is the active view when you call 
> GetDisplayProperties(p)?   If the render view is active, you'll get 
> the wrong representation.  I verified that this works for Wavelet --> 
> Plot Data filter using PV 3.10.1.
>
> Pat
>
> On Thu, Oct 6, 2011 at 2:03 PM, Greg Schussman 
> <schussman at slac.stanford.edu <mailto:schussman at slac.stanford.edu>> wrote:
>
>     On 10/06/2011 07:33 AM, pat marion wrote:
>>     series_names = [name for name in d.GetProperty("SeriesNamesInfo")]
>
>     Hi, Pat.
>
>     Thanks for the helpful pointers.
>
>     After setting everything up in ParaView (3.10.1, 64-bit), I'm not
>     getting results.  Here is what I did from the ParaView Python Shell:
>
>     >>> p = FindSource("PlotData1")
>
>     >>> rep = GetDisplayProperties(p)
>
>     >>> rep.GetProperty("SeriesNamesInfo")
>
>     None
>
>     >>>
>
>
>     While, at the same time, the Object Inspector shows 27 series,
>     each with the correct name.
>
>     Does something need to be updated or refreshed first?  I notice in
>     the pvblot script, there is a
>
>       rep.Update()
>
>     but when I try that in ParaView's python shell (after getting the
>     representation the way I showed above), it tells me:
>
>     >>> rep.Update()
>
>     Traceback (most recent call last):
>
>     File "<console>", line 1, in <module>
>
>     File
>     "/usr/lib64/paraview/site-packages/paraview/servermanager.py",
>     line 370, in __getattr__
>
>     return getattr(self.SMProxy, name)
>
>     AttributeError: Update
>
>     >>>
>
>
>     Thanks!
>
>     Greg
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20111006/8b145ef5/attachment.htm>


More information about the ParaView mailing list