I think it is the VTK nightly from some date  in February . I will update the VTK and see whether the error still persists .<br><br>Regards<br>Darshan<br><br><div class="gmail_quote">On Tue, Mar 29, 2011 at 7:40 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;">Hey Darshan,<div><br></div><div>How recent is your version of VTK? Marcus checked in a bug fix a week or two ago that may fix this. If you&#39;re using a very recent version then maybe you can post your test code and we can take a look.</div>

<div><br></div><div>-Eric</div><div><br></div><div><br><div><div><div></div><div><div>On Mar 29, 2011, at 7:24 PM, Darshan Pai wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div>
Working on it some more I see some more problems . <br>I have 5 rows ans select the 5th row for color which is the category value 0 and 1 . <br>I make a lookup table with 2 values having green and blue . I select the range from 0 -1 . <br>


So ideally the plot should show the category value 0 with green and 1 with blue . <br><br>Instead I see that some of the lines of category zero are blue while some lines with category 1 are transparent . Also some lines change color in between . I don&#39;t understand what is wrong here . <br>


<br>added snapshot <br><br><br><div class="gmail_quote">On Mon, Mar 28, 2011 at 2:50 PM, Darshan Pai <span dir="ltr">&lt;<a href="mailto:darshanpai@gmail.com" target="_blank">darshanpai@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Yes that was the problem . Got it working . Thanks<br><font color="#888888"><br>Darshan</font><div><div></div><div><br><br><div class="gmail_quote">On Mon, Mar 28, 2011 at 2:41 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>



<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;">Those methods aren&#39;t defined in vtkPlot, but in vtkPlotPoints and vtkPlotParallelCoordinates separately. You&#39;ll have to cast the GetPlot() to the correct type.<div>



<br></div><font color="#888888"><div>-E</div></font><div><div></div><div><div><br><div><div>On Mar 28, 2011, at 2:39 PM, Darshan Pai wrote:</div><br><blockquote type="cite">.\PC.cpp(77) : error C2039: &#39;SetScalarVisibility&#39; : is not a member of &#39;vtkPlot&#39;<br>



1&gt;        C:\vtkcvs\VTK\Charts\vtkPlot.h(42) : see declaration of &#39;vtkPlot&#39;<br>1&gt;..\PC.cpp(78) : error C2039: &#39;SetLookupTable&#39; : is not a member of &#39;vtkPlot&#39;<br>
1&gt;        C:\vtkcvs\VTK\Charts\vtkPlot.h(42) : see declaration of &#39;vtkPlot&#39;<br>1&gt;..\PC.cpp(79) : error C2039: &#39;SelectColorArray&#39; : is not a member of &#39;vtkPlot&#39;<br>1&gt;        C:\vtkcvs\VTK\Charts\vtkPlot.h(42) : see declaration of &#39;vtkPlot&#39;<br>




<br>Not sure if I am missing an include<br><br><div class="gmail_quote">On Mon, Mar 28, 2011 at 2:22 PM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>




<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;">That&#39;s strange since the Python is just a wrapper around the C++...<div>

<br></div>


<div>-E</div><div><br><div><div><div>On Mar 28, 2011, at 2:15 PM, Darshan Pai wrote:</div><br></div><blockquote type="cite"><div>Thanks I get it . <br><br>BTW I cannot convert it for C++ . Is there a way to port it to C++. Esp ScalarVisibility and SelectColorArray is not defined in C++<br>




<br></div><div class="gmail_quote"><div>On Mon, Mar 28, 2011 at 9:44 AM, Eric E. Monson <span dir="ltr">&lt;<a href="mailto:emonson@cs.duke.edu" target="_blank">emonson@cs.duke.edu</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div style="word-wrap: break-word;"><div>Hey Darshan,<div><br></div><div>I don&#39;t remember if there&#39;s a way to color the lines in the older parallel coordinates view (and don&#39;t have time to look right now), but in the new Charts classes you can color plots by another array. This will be in 5.8 and it&#39;s been in git master for a while, but it wasn&#39;t in 5.6.</div>





<div><br></div><div>(There is a little bug lingering in the parallel coordinates charts plot which causes it to use the plot&#39;s pen opacity instead of the opacity of the lookup table you&#39;ve passed it, but I think Marcus is trying to get around to checking in a fix sometime soon.)</div>





<div><br></div><div>Here&#39;s an example that uses categorical colors with the parallel coordinates:</div><div><br></div><div>Talk to you later,</div><div>-Eric</div><div><div style="font-size: 12px;"><br></div><div style="font-size: 12px;">





· · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · · ·</div><div style="font-size: 12px;">Eric E Monson</div><div style="font-size: 12px;">Duke Visualization Technology Group</div><div style="font-size: 12px;">

<br>



</div></div></div><div><span>&lt;ParallelCoordinatesCatsColors.png&gt;</span><div><div></div><div><br><div>
<span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: medium;"><span style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"><div style="word-wrap: break-word;">





<div><span style="font-size: medium;"><br></span></div></div></span></span><br>
</div>
<div># Translated to Python from [VTK]/Charts/Testing/Cxx/TestPCPlot.cxx</div><div><br></div><div>import vtk</div><div>import math</div><div><br></div><div># Set up a 2D scene, add an XY chart to it</div><div>view = vtk.vtkContextView()</div>





<div>view.GetRenderer().SetBackground(1.0, 1.0, 1.0)</div><div>view.GetRenderWindow().SetSize(600,300)</div><div><br></div><div>chart = vtk.vtkChartParallelCoordinates()</div><div>view.GetScene().AddItem(chart)</div><div>





<br></div><div># Test charting with a few more points...</div><div>numPoints = 100</div><div>numCats = 8</div><div>inc = 7.5 / (numPoints-1)</div><div><br></div><div># Create arrays that will end up as table columns</div>





<div>arrX = vtk.vtkFloatArray()</div><div>arrX.SetName(&quot;XAxis&quot;)</div><div>arrX.SetNumberOfComponents(1)</div><div>arrX.SetNumberOfTuples(numPoints)</div><div>arrC = vtk.vtkFloatArray()</div><div>arrC.SetName(&quot;Cosine&quot;)</div>





<div>arrC.SetNumberOfComponents(1)</div><div>arrC.SetNumberOfTuples(numPoints)</div><div>arrS = vtk.vtkFloatArray()</div><div>arrS.SetName(&quot;Sine&quot;)</div><div>arrS.SetNumberOfComponents(1)</div><div>arrS.SetNumberOfTuples(numPoints)</div>





<div><br></div><div>arrCat = vtk.vtkIntArray()</div><div>arrCat.SetName(&quot;Category_ids&quot;)</div><div>arrCat.SetNumberOfComponents(1)</div><div>arrCat.SetNumberOfTuples(numPoints)</div><div><br></div><div># For some reason table.SetValue() is not wrapped</div>





<div># <span style="white-space: pre-wrap;">        </span>so need to build arrays and then add as columns</div><div># Would be more elegant to use numpy, but wanted to keep it out for now...</div><div>for i in range(numPoints):</div>





<div><span style="white-space: pre-wrap;">        </span>arrX.SetTuple1(i, i * inc)</div><div><span style="white-space: pre-wrap;">        </span>arrC.SetTuple1(i, math.cos(i * inc) + 0.0)</div><div><span style="white-space: pre-wrap;">        </span>arrS.SetTuple1(i, math.sin(i * inc) + 0.0)</div>





<div><span style="white-space: pre-wrap;">        </span>arrCat.SetTuple1(i, int(float(numCats)*float(i)/float(numPoints)))</div><div><br></div><div># Create a table with some points in it...</div><div>table = vtk.vtkTable()</div>





<div>table.AddColumn(arrX)</div><div>table.AddColumn(arrC)</div><div>table.AddColumn(arrS)</div><div>table.AddColumn(arrCat)</div><div><br></div><div>cl = []</div><div>cl.append([float(cc)/255.0 for cc in [27, 158, 119]])<span style="white-space: pre-wrap;">        </span># Colorbrewer Dark2</div>





<div>cl.append([float(cc)/255.0 for cc in [217, 95, 2]])</div><div>cl.append([float(cc)/255.0 for cc in [117, 112, 179]])</div><div>cl.append([float(cc)/255.0 for cc in [231, 41, 138]])</div><div>cl.append([float(cc)/255.0 for cc in [102, 166, 30]])</div>





<div>cl.append([float(cc)/255.0 for cc in [230, 171, 2]])</div><div>cl.append([float(cc)/255.0 for cc in [166, 118, 29]])</div><div>cl.append([float(cc)/255.0 for cc in [102, 102, 102]])</div><div><br></div><div>lut = vtk.vtkLookupTable()</div>





<div>lutNum = len(cl)</div><div>lut.SetNumberOfTableValues(lutNum)</div><div>lut.Build()</div><div>for ii,cc in enumerate(cl):</div><div><span style="white-space: pre-wrap;">        </span>lut.SetTableValue(ii,cc[0],cc[1],cc[2],1.0)</div>





<div>lut.SetRange(0,numCats-1)</div><div>lut.SetAlpha(1.0)</div><div><br></div><div>chart.GetPlot(0).SetInput(table)</div><div>chart.GetPlot(0).SetScalarVisibility(1)</div><div>chart.GetPlot(0).SetLookupTable(lut)</div><div>





chart.GetPlot(0).SelectColorArray(&quot;Category_ids&quot;)</div><div><br></div><div>chart.GetPlot(0).GetPen().SetOpacityF(0.8)</div><div><br></div><div>view.GetRenderWindow().SetMultiSamples(0)</div><div>view.GetRenderWindow().Render()</div>





<div><br></div><div>view.GetInteractor().Start()</div><div><br></div><div><br></div><div><br></div><div><div><div></div><div><div>On Mar 26, 2011, at 1:15 AM, Darshan Pai wrote:</div><br></div></div><blockquote type="cite">





<div><div></div><div>Oh ok , so i guess it somehow picks up the internal arrays from the RTanalyticsSOurce.<br>Is there anyway to have some of the lines as different colors ? I mean like categorical data.<br>There is also a Parallel Coordinates in the Charts too .<br>






<br><div class="gmail_quote">On Fri, Mar 25, 2011 at 10:38 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">






<div><div></div><div>On Fri, Mar 25, 2011 at 8:12 PM, Darshan Pai &lt;<a href="mailto:darshanpai@gmail.com" target="_blank">darshanpai@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt; This example<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Python/Infovis/ParallelCoordinatesExtraction" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Python/Infovis/ParallelCoordinatesExtraction</a><br>
&gt; I can run it , but can someone please explain this part in the code<br>
&gt; rep.SetInputArrayToProcess(0,0,0,0,&#39;RTDataGradient&#39;)<br>
&gt; rep.SetInputArrayToProcess(1,0,0,0,&#39;RTData&#39;)<br>
&gt; rep.SetInputArrayToProcess(2,0,0,0,&#39;Elevation&#39;)<br>
&gt; rep.SetInputArrayToProcess(3,0,0,0,&#39;BrownianVectors&#39;)<br>
&gt;<br>
&gt; How is this data acquired ? I never used Infovis before so I am not clear what these lines are doing exactly<br>
&gt; Thanks in advance<br>
&gt; Darshan<br>
<br>
</div></div>The SetInputArrayToProcess function is among the most confusing ones I<br>
have encountered (it doesn&#39;t have anything to do with vtkInfovis)<br>
<br>
<a href="http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484" target="_blank">http://www.vtk.org/doc/nightly/html/classvtkAlgorithm.html#a6bea16e1329609dbccce0ff8d2367484</a><br>
<br>
I believe all that is happening is the arrays RTDataGradient, RTData,<br>
Elevation, BrownianVectors are being set as vertical axes in the<br>
parallel coordinate representation. The first parameter, &#39;idx&#39;, is<br>
setting the 0th array, the 1st array, etc. I just always put 0&#39;s for<br>
the rest of the arguments.<br>
<br>
It has always seemed to me that for saneness there should be a<br>
<br>
void SetInputArrayToProcess (int idx, const char *name)<br>
<br>
so the explanation of &quot;I don&#39;t know, just put 0&#39;s&quot; doesn&#39;t ever have to be used.<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br></div></div>
_______________________________________________<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 VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>





</blockquote></div><br></div></div></div></div></blockquote></div><br>
</blockquote></div><br></div></div></blockquote></div><br>
</blockquote></div><br></div></div></div></div></blockquote></div><br>
</div></div></blockquote></div><br>
</div></div><span>&lt;plotoutput.jpg&gt;</span></blockquote></div><br></div></div></blockquote></div><br>