[vtkusers] Data not getting to chart

Marcus D. Hanwell marcus.hanwell at kitware.com
Mon Oct 18 17:04:23 EDT 2010


Any numeric data type should be fine.

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

> Hi Marcus,
>      I got the chart to work.  Actually, some of my code WAS coming from
> the example you pointed to.  I dropped out the "renderer" references and it
> still wouldn't work, but it did when I made the first column of the table an
> integer value.
>      It would seem that the first column, appearing to be the X-value,
> would be able to be a float, but I'll play around with it.
>      Thanks again!
>
>             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, 4:32 PM
>
>
> 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.
>
> Marcus
>
> On Mon, Oct 18, 2010 at 4:24 PM, Barney Sperlin <bsperlinus at yahoo.com<http://mc/compose?to=bsperlinus@yahoo.com>
> > wrote:
>
> 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<http://mc/compose?to=marcus.hanwell@kitware.com>
> >* wrote:
>
>
> From: Marcus D. Hanwell <marcus.hanwell at kitware.com<http://mc/compose?to=marcus.hanwell@kitware.com>
> >
> Subject: Re: [vtkusers] Data not getting to chart
> To: "Barney Sperlin" <bsperlinus at yahoo.com<http://mc/compose?to=bsperlinus@yahoo.com>
> >
> Cc: "VTK Users" <vtkusers at vtk.org <http://mc/compose?to=vtkusers@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<http://mc/compose?to=bsperlinus@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<http://mc/compose?to=marcus.hanwell@kitware.com>
> >* wrote:
>
>
> From: Marcus D. Hanwell <marcus.hanwell at kitware.com<http://mc/compose?to=marcus.hanwell@kitware.com>
> >
> Subject: Re: [vtkusers] Data not getting to chart
> To: "Barney Sperlin" <bsperlinus at yahoo.com<http://mc/compose?to=bsperlinus@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<http://mc/compose?to=bsperlinus@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<http://mc/compose?to=marcus.hanwell@kitware.com>
> >* wrote:
>
>
> From: Marcus D. Hanwell <marcus.hanwell at kitware.com<http://mc/compose?to=marcus.hanwell@kitware.com>
> >
> Subject: Re: [vtkusers] Data not getting to chart
> To: "Barney Sperlin" <bsperlinus at yahoo.com<http://mc/compose?to=bsperlinus@yahoo.com>
> >
> Cc: vtkusers at vtk.org <http://mc/compose?to=vtkusers@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<http://mc/compose?to=bsperlinus@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/ec41bf58/attachment.htm>


More information about the vtkusers mailing list