You should be able to simply take the table you built up from reading the file, and then add plots, with the correct columns, to the chart. Then just render/start the interactor. Hopefully this is enough to get you started.<div>
<br></div><div>Marcus<br><br><div class="gmail_quote">On Mon, Oct 18, 2010 at 4:24 PM, Barney Sperlin <span dir="ltr"><<a href="mailto:bsperlinus@yahoo.com">bsperlinus@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit">Thanks, Marcus, I'll look at that example and see if it does what I want (and can make it do that!).<br> Barney<div class="im">
<br><br>--- On <b>Mon, 10/18/10, Marcus D. Hanwell <i><<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></i></b> wrote:<br></div><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
<div class="im"><br>From: Marcus D. Hanwell <<a href="mailto:marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>><br>Subject: Re: [vtkusers] Data not getting to chart<br>To: "Barney Sperlin" <<a href="mailto:bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>><br>
</div>Cc: "VTK Users" <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>Date: Monday, October 18, 2010, 4:13 PM<br><br><div><div>Hi Barney,</div><div class="im"><div><br></div><div>
For the plotting/charting I recommend following something like,</div><div><br></div><a rel="nofollow" href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot</a><br clear="all">
<br><div>Adding the user list back to the CC so that we can add to the public pool of knowledge.</div><div><br></div></div><div>Marcus<br><br><div><div class="im">On Mon, Oct 18, 2010 at 4:06 PM, Barney Sperlin <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>></span> wrote:<br>
</div><blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit" valign="top">
<div class="im">Hi Marcus,<br> I remember getting the general idea from looking through the classes page, too:<br>
<br>file:///C:/Program%20Files/vtk-5.6.0/vtkDocHtml-5.6.0.tar/vtkDocHtml-5.6.0/html/classes.html</div><div><br><br> Barney<div class="im"><br><br><br>--- On <b>Mon, 10/18/10, Marcus D. Hanwell <i><<a rel="nofollow" href="http://mc/compose?to=marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></i></b> wrote:<br>
</div></div><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px"><div class="im"><div><br>From: Marcus D. Hanwell <<a rel="nofollow" href="http://mc/compose?to=marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>><br>
Subject: Re: [vtkusers] Data not getting to chart<br>To: "Barney Sperlin" <<a rel="nofollow" href="http://mc/compose?to=bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>><br></div>Date: Monday, October 18, 2010, 3:38 PM</div>
<div>
<div></div><div><br><br><div><div class="im">So where did you get the charting stuff from? The IO stuff makes sense, it was the mixture of old and new charts I wasn't clear
on.<div><br></div></div><div>Marcus<br><br><div><div class="im">On Mon, Oct 18, 2010 at 3:34 PM, Barney Sperlin <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>></span> wrote:<br>
</div><blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit" valign="top">
<div class="im">
Hi Marcus,<br> Thanks for the reply. I based my example on:<div>
<br><br><a rel="nofollow" href="http://vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadPlainText" target="_blank">http://vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadPlainText</a><br><br></div> but wasn't get the proper result so I "fiddled" around a little and that may be where the inconsistency comes from. Would the example above work properly with the latest VTK?<br>
</div>
Barney<div class="im"><br><br>--- On <b>Mon, 10/18/10, Marcus D. Hanwell <i><<a rel="nofollow" href="http://mc/compose?to=marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>></i></b> wrote:<br>
<blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px">
<br>From: Marcus D. Hanwell <<a rel="nofollow" href="http://mc/compose?to=marcus.hanwell@kitware.com" target="_blank">marcus.hanwell@kitware.com</a>><br>Subject: Re: [vtkusers] Data not getting to chart<br>To: "Barney Sperlin" <<a rel="nofollow" href="http://mc/compose?to=bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>><br>
Cc: <a rel="nofollow" href="http://mc/compose?to=vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>Date: Monday, October 18, 2010, 3:28 PM<div><div></div><div><br><br><div><div>On Mon, Oct 18, 2010 at 11:35 AM, Barney Sperlin <span dir="ltr"><<a rel="nofollow" href="http://mc/compose?to=bsperlinus@yahoo.com" target="_blank">bsperlinus@yahoo.com</a>></span> wrote:<br>
<blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
<table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit" valign="top">
Hello, beginner question:<br> Data I'm reading is not getting charted.<br> After reading a space-delimited file of stock market data I'm trying to view a chart of this and the chart comes out as a single straight line at a 45° angle. There should be 2 lines, neither of which are straight. I suspect that both are being plotted, one on top of the other.<br>
</td></tr></tbody></table></blockquote><div><br></div><div>You seem to be using a mixture of the old and new chart APIs. If you want to use the new chart API then the mapper stuff and the polyline code is not necessary. If you would like to stick with the old API then getting rid of vtkContextView, vtkChartXY etc would be the right thing to do.</div>
<div> </div><blockquote style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family:inherit;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:inherit;line-height:inherit;font-size-adjust:inherit;font-stretch:inherit" valign="top">
When I break the program in the reading loop the values appear correctly so I think that reading the file is not the problem. Is the data getting into the table? Debugging doesn't show it. Is the table transferring properly to the chart?<br>
I'm using C++ in VS 2005 Express.<br> Below is my code, largely taken from an online example:<br></td></tr></tbody></table></blockquote><div><br></div><div>Which example did you get the charting stuff from?</div>
<div><br></div><div>Marcus</div></div>
</div></div></div></blockquote></div></td></tr></tbody></table><br>
</blockquote></div><br></div>
</div></div></div></blockquote></td></tr></tbody></table><br>
</blockquote></div><br></div>
</div></blockquote></td></tr></tbody></table><br>
</blockquote></div><br></div>