Hi Greg,<br><br>If you look at Plugins/pvblot/tplot.py you&#39;ll find some code that does exactly this.  You may find some other useful chart code in there too.<br><br>For your example, you could do:<br><br>series_names = [name for name in d.GetProperty(&quot;SeriesNamesInfo&quot;)]<br>
<br><br>Pat<br><br><div class="gmail_quote">On Wed, Oct 5, 2011 at 8:19 PM, Greg Schussman <span dir="ltr">&lt;<a href="mailto:schussman@slac.stanford.edu">schussman@slac.stanford.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>

  

    
  
  <div bgcolor="#ffffff" text="#000000">
    <font size="+1"><font face="Droid Serif">Hi.<br>
        <br>
        I have a ParaView macro which sets up a CSVReader, and a
        PlotData of that.  The variable names and legend names and
        series colors are all filled in automatically by ParaView.<br>
        <br>
        What I would like to do is, from the python macro, iterate
        through all series in a chart and make specific ones visible or
        invisible.  Recording a python trace of this gives:<br>
        <br>
      </font></font>
    
    <p style="margin:0px;text-indent:0px"> try: paraview.simple</p>
    <p style="margin:0px;text-indent:0px"> except: from
      paraview.simple import *</p>
    <p style="margin:0px;text-indent:0px">
      paraview.simple._DisableFirstRenderCameraReset()</p>
    <p style="margin:0px;text-indent:0px"> PlotData1 =
      GetActiveSource()</p>
    <p style="margin:0px;text-indent:0px"> my_representation0 =
      GetDisplayProperties(PlotData1)</p>
    <p style="margin:0px;text-indent:0px">
      my_representation0.SeriesColor = [&#39;A(0,0)&#39;, &#39;0&#39;, &#39;1&#39;, &#39;0&#39;]</p>
    <p style="margin:0px;text-indent:0px">
      my_representation0.SeriesVisibility = [&#39;A(0,0)&#39;, &#39;0&#39;]</p>
    <p style="margin:0px;text-indent:0px"> Render()</p>
    <br>
    <font size="+1"><font face="Droid Serif">When I go the python shell
        after doing this, and  I do this:<br>
        <br>
          p = FindSource(&quot;PlotData1&quot;)<br>
          d = GetDisplayProperties(p)<br>
          print d.SeriesVisibility<br>
        <br>
        it gives me<br>
        <br>
          [&#39;A(0,0)&#39;, &#39;0&#39;]<br>
        <br>
        but doesn&#39;t say anything about the other series (&#39;A(0,1)&#39; ...
        &#39;A(5,5)).<br>
        <br>
        How do I get at the names of the other series?   <br>
        <br>
        If I had them, how would I use them?  Like the following?<br>
        <br>
        Thanks.<br>
        <br>
        Greg<br>
        <br>
        new_visibility = []<br>
        For i in xrange(len(series_names)):<br>
          new_visibility.append(series_names[i])<br>
          if series_names[i] == &#39;A(1,3)&#39;:  # for example<br>
             new_visibility.append(&#39;1&#39;)<br>
          else:<br>
             new_visibility.append(&#39;0&#39;)<br>
        <br>
        d.SeriesVisibility = new_visibility<br>
        <br>
        Render()<br>
          <br>
      </font></font>
  </div>

<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ParaView Wiki at: <a href="http://paraview.org/Wiki/ParaView" target="_blank">http://paraview.org/Wiki/ParaView</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.paraview.org/mailman/listinfo/paraview" target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
<br></blockquote></div><br>