[vtkusers] Trying to use vtkChartXY with Tcl

David Gobbi david.gobbi at gmail.com
Tue Dec 15 15:51:57 EST 2015


Hi Mario,

Tcl syntax a mixture of lisp and shell script.  The code will look like
this:

  set line [chart AddPlot 0]
  $line SetInputData table 0 2

Are you really sure that you want to use Tcl?  Many of the VTK classes
and methods that you can use with Python cannot be used from Tcl, so
it might not even be possible to convert that example into working Tcl
code.  You're welcome to try, though.

 - David


On Tue, Dec 15, 2015 at 1:27 PM, Mario Rodriguez <biomates at telefonica.net>
wrote:

> Dear list members,
>
> I am interested to learn how to use the vtkChartXY class from Tcl scripts.
>
> Since I couldn't find any Tcl examples, I am trying to translate existing
> python examples into Tcl.
>
> My first efforts started with
>
>
> http://www.vtk.org/gitweb?p=VTK.git;a=blob;f=Charts/Core/Testing/Python/TestLinePlot.py
>
> But I am having problems translating the following lines into Tcl:
>
> line = chart.AddPlot(0)
> line.SetInputData(table,0,2)
>
> where chart was created with
>
> vtkChartXY chart
>
> Perhaps someone could help me to write the correct translation of this
> piece of code. I usually write programs in Lisp, and my knowledge of Python
> and Tcl is very limited.
>
> I am working with version 6.3.
>
> Thanks.
>
> --
> Mario
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151215/fcd79da2/attachment.html>


More information about the vtkusers mailing list