Hi.
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.
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:
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
PlotData1 = GetActiveSource()
my_representation0 = GetDisplayProperties(PlotData1)
my_representation0.SeriesColor = ['A(0,0)', '0', '1', '0']
my_representation0.SeriesVisibility = ['A(0,0)', '0']
Render()
When I go the python shell after doing this, and I do this:
p = FindSource("PlotData1")
d = GetDisplayProperties(p)
print d.SeriesVisibility
it gives me
['A(0,0)', '0']
but doesn't say anything about the other series ('A(0,1)' ... 'A(5,5)).
How do I get at the names of the other series?
If I had them, how would I use them? Like the following?
Thanks.
Greg
new_visibility = []
For i in xrange(len(series_names)):
new_visibility.append(series_names[i])
if series_names[i] == 'A(1,3)': # for example
new_visibility.append('1')
else:
new_visibility.append('0')
d.SeriesVisibility = new_visibility
Render()
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the ParaView Wiki at:
http://paraview.org/Wiki/ParaView
Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview