Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

plot a data file in gnuplot with tcl/tk

Status
Not open for further replies.

gaaasa

Programmer
Feb 21, 2003
6
BE
Hello,

My problem

I want to plot a data file that is selected by the user in gnuplot. I can open a channel to gnuplot, and I can plot a specified data file BUT when the user selects a file with an file open menu, the path and file name are stored in a variable and there is my problem.

When I do something like this it will work!!!

set F1 [open "|gnuplot" r+]
puts $F1 {plot "/users/myaccount/data.dat"}
flush $F1

now the part that doesn't work. If for instance we have a variable path

set path "/users/myaccount/data.dat"
set F1 [open "|gnuplot" r+]
puts $F1 {plot $path}
flush $F1

THIS WON'T WORK IF SOMEONE COULD HELP ME I WOULD BE VERY HAPPY

I tried everything with "" without {} it all doesn't mather
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top