Please point me in right direction. Examples appreciated. Thanks.
If its more a thing like GIS pathes you might look at something like
GRASS, which has a Tk based GUI.
Michael
Hm, it should not be too difficult to extend Plotchart
with such a facility, but that would come after my holidays :).
Drop me a note if you are interested in that.
Regards,
Arjen
Thank you for the link. I've only had a chance to look at the opengl
samples -- I've heard of it before. Typical of the problems I run into,
it seems to be simultaneously too much _AND_ too little. Their audience
is heavily orientated towards rendering 3D solids (with *IMPRESSIVE*
results). But I want at most *A* 3 dimensional line. I have also been
mulling the idea of a 3D scatter plot.
In another thread, someone was referred to Tkzinc. That appears to have
the same difficulty from my perspective.
I may revert to using Scilab for my plotting. Originally I was refferred
to TclTk to simplify data gathering. It turned out it could handle my
minimal data reduction chores. If I could master Plotchart, all could be
done in TclTk.
>
> If its more a thing like GIS pathes you might look at something like
> GRASS, which has a Tk based GUI.
No, that's not related to my interests.
gnuplot has a variety of 3d modes.
_and_
gnuplot can do output to a tcl canvas.
gnuplot:
http://www.gnuplot.info/
G!
uwe
Thank you. It was your page, http://wiki.tcl.tk/18167 , which was
tantalizing me ;) I'm newbie enough to not know how to follow up on
"They are all part of the CVS repository, so for the most recent
versions, I will refer you to the Tklib project."
I'm looking for the 3D equivalent of createXYPlot and related commands.
> Arjen Markus said:
>
> You will need to get a recent version of Plotchart - from the CVS
> repository - see the receipes on the site or by downloading the
> sources one by one.
>
> I am confident people on the comp.lang.tcl newsgroup can help you
> with retrieving and installing Tklib.
I am completely lost. I have never used CVS.
I managed to download the scrip[t that generates the samples shown on
http://wiki.tcl.tk/18167 . That was as far as I could get.
Thank you.
I've downloaded a current version of gnuplot and it plots my data
nicely. I didn't find a interface to Tcl however.[except one that will
continuously rotate the plot thru various views]. My OS is WinXP.
> I've downloaded a current version of gnuplot and it plots my data
> nicely. I didn't find a interface to Tcl however.[except one that will
> continuously rotate the plot thru various views]. My OS is WinXP.
>
gnuplot has a terminal driver for the Tk canvas.
in a tcl shell do
#start
package require Tk
set gpcmds "
set terminal tkcanvas
plot sin(x)
"
set canvcmds [ exec gnuplot << $gpcmds ]
eval $canvcmds
canvas .c ; pack .c
gnuplot .c
#end
G!
uwe
I had to modify the code to reflect path to executable and its name.
package require Tk
set gpcmds "
set terminal tkcanvas
plot sin(x)
"
set canvcmds [ exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds ]
eval $canvcmds
canvas .c ; pack .c
pgnuplot .c
In response to the last line I receive
invalid command name "gnuplot"
What is my problem?
I am using ActiveStates distribution under WinXP Pro SP2.
proc gnuplot can {
.....................
# lots of [expr] and
# [$can create ...] stuff
}
proc gnuplot_plotarea {} {
...........
# returns the bbbox of the plot
}
proc gnuplot_axisranges {} {
..............
# returns the x and y scale range and the actual used range
}
either you made some typing mistake or the [eval] went astray.
uwe
> I had to modify the code to reflect path to executable and its name.
>
> package require Tk
> set gpcmds "
> set terminal tkcanvas
> plot sin(x)
> "
> set canvcmds [ exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds ]
> eval $canvcmds
> canvas .c ; pack .c
> pgnuplot .c
>
> In response to the last line I receive
>
> invalid command name "gnuplot"
>
> What is my problem?
> I am using ActiveStates distribution under WinXP Pro SP2
I'd first just add
puts $canvcmds
after the exec line, to see what is in it. From context I guess that
it should define a proc named gnuplot...
Hi
I am little surprised. Is it really possible to run gnuplot inside TCL
in canvas ? I was thinking the gnuplot was only "external" program.
---
Esa
Printing $canvcmds gave a blank line until I changed
set canvcmds [ exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds ]
to
set canvcmds { exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds }
It still doesn't work. Has anyone else attempted to do this on a
Windows(tm) system. I notice that the help file lists many cautions
about using exec on Windows(tm) systems.
> Printing $canvcmds gave a blank line until I changed
> set canvcmds [ exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds ]
> to
> set canvcmds { exec "G:\\gnuplot\\bin\\pgnuplot" << $gpcmds }
>
That does something very differently, and probably not the thing
wanted.
> It still doesn't work. Has anyone else attempted to do this on a
> Windows(tm) system. I notice that the help file lists many cautions
> about using exec on Windows(tm) systems.-
I just downloaded, on a Win XP box,
http://gnuplot.sourceforge.net/development/binaries/gp41-July18_2006-winbin.zip
and can confirm that the exec for that particular pgnuplot.exe returns
"".
you [exec] gnuplot with the commands of your choice.
In this case you advise gnuplot to use its "tkcanvas" driver
for output.
( Tcl as in Tool Control Language ;-)
The output is a script that creates three procs.
[gnuplot] containing all the commands to create your plot as
elements on a tkcanvas. ( see prev posting for details )
[gnuplot_plotarea] to know about the bbox
and
[gnuplot_axisranges] to know about used and plotted
axis ranges.
proc gnuplot can {
.....................
# lots of [expr] and
# [$can create ...] stuff
}
proc gnuplot_plotarea {} {
...........
# returns the bbbox of the plot
}
proc gnuplot_axisranges {} {
..............
# returns the x and y scale range and the actual used range
}
>
>
> ---
> Esa
uwe