[vtkusers] Data not getting to chart

Barney Sperlin bsperlinus at yahoo.com
Mon Oct 18 16:24:27 EDT 2010


Thanks, Marcus, I'll look at that example and see if it does what I want (and can make it do that!).
     Barney

--- On Mon, 10/18/10, Marcus D. Hanwell <marcus.hanwell at kitware.com> wrote:

From: Marcus D. Hanwell <marcus.hanwell at kitware.com>
Subject: Re: [vtkusers] Data not getting to chart
To: "Barney Sperlin" <bsperlinus at yahoo.com>
Cc: "VTK Users" <vtkusers at vtk.org>
Date: Monday, October 18, 2010, 4:13 PM

Hi Barney,
For the plotting/charting I recommend following something like,
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Plotting/LinePlot



Adding the user list back to the CC so  that we can add to the public pool of knowledge.
Marcus

On Mon, Oct 18, 2010 at 4:06 PM, Barney Sperlin <bsperlinus at yahoo.com> wrote:

Hi Marcus,
     I remember getting the general idea from looking through the classes page, too:


file:///C:/Program%20Files/vtk-5.6.0/vtkDocHtml-5.6.0.tar/vtkDocHtml-5.6.0/html/classes.html

     Barney


--- On Mon, 10/18/10, Marcus D. Hanwell <marcus.hanwell at kitware.com> wrote:


From: Marcus D. Hanwell <marcus.hanwell at kitware.com>

Subject: Re: [vtkusers] Data not getting to chart
To: "Barney Sperlin" <bsperlinus at yahoo.com>
Date: Monday, October 18, 2010, 3:38 PM


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.
Marcus

On Mon, Oct 18, 2010 at 3:34 PM, Barney Sperlin <bsperlinus at yahoo.com> wrote:



Hi Marcus,
     Thanks for the reply.  I based my example on:


http://vtk.org/Wiki/VTK/Examples/Cxx/IO/ReadPlainText

     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?


     Barney

--- On Mon, 10/18/10, Marcus D. Hanwell <marcus.hanwell at kitware.com> wrote:



From: Marcus D. Hanwell <marcus.hanwell at kitware.com>
Subject: Re: [vtkusers] Data not getting to chart
To: "Barney Sperlin" <bsperlinus at yahoo.com>


Cc: vtkusers at vtk.org
Date: Monday, October 18, 2010, 3:28 PM

On Mon, Oct 18, 2010 at 11:35 AM, Barney Sperlin <bsperlinus at yahoo.com> wrote:





Hello, beginner question:
     Data I'm reading is not getting charted.
     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.




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.


 

     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?



     I'm using C++ in VS 2005 Express.
     Below is my code, largely taken from an online example:

Which example did you get the charting stuff from?



Marcus



      




      




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20101018/ebce5afe/attachment.htm>


More information about the vtkusers mailing list