Sponsored Content
Top Forums Shell Programming and Scripting Gnuplot shell script controlled animation Post 302275326 by darius2 on Friday 9th of January 2009 08:13:29 PM
Old 01-09-2009
Quote:
Originally Posted by npatwardhan
here is what i have tried with gnuplot:

i have used the system function in C as follows:
Code:
 system("gnuplot.exe gnu_script");

you have to include the stdlib.h file.
this function calls the gnuplot.exe file and then runs the plots for gnuplot from the gnu_script file. The gnu_script file has gnu plot commands like:

Code:
plot "try.dat" using 1 with lines
pause -1 "Press enter for next plot"
plot "try1.dat" using 2 with lines
pause -1 "Press enter for next plot"
plot "try2.dat" using 1 with lines 
pause -1 "Press enter for next plot"

dunno if this may help. just an idea.
Thanks.
In the meantime tested file.plt
run as any another shell script with plot commands
and it worked.

One issue is interaction and parameters entering for interaction and animation.
plot "-" command doesn't work withing .plt script

====================
./loop3.plt

plot "-"
^
"./loop3.plt", line 5: Bad data on line 1

======================
does work as
gnuplot > plot "-"
======================
4.9 Can I put both commands and data into a single file?

This is possible by the new plot "-" possibility. The plot "-" command allows to read the data to be plot from standard input or the current batch job.

gnuplot> plot "-"
1 1
2 4
3 9
e
 

10 More Discussions You Might Find Interesting

1. UNIX Desktop Questions & Answers

3d animation

What are the benefits to using UNIX for 3d animation. I am looking into the field, and most places require a strong background in UNIX. Why is this? (3 Replies)
Discussion started by: aloysius1001
3 Replies

2. Filesystems, Disks and Memory

IDE controlled / RAID card issue Suse 9.2

I just built a new box to run Suse, and I guess I shoud have spent more time researching the HCL. Anyway, the Promise RAID card I have will not work, and I am unable to install the OS. The only other IDE devide in the box is a DVDOM. I can only think of 2 options, but would appreciate some... (1 Reply)
Discussion started by: 98_1LE
1 Replies

3. UNIX for Dummies Questions & Answers

script animation

I have read hundreds of the postings and cannot find the answer to my question...so I hope that someone is able to answer it for me. I am writing a script in bash, and would like to add animation. I have a gif file that I would like to open and have displayed on the screen. Can this be done? Of... (0 Replies)
Discussion started by: debit
0 Replies

4. Shell Programming and Scripting

Shell Script Animation

Hi, I want to write a shell script which can do some animation The animation is as follows it is like a progress barwhich hould gone on inresing with time & at the end of the line there should be the progess Eg == - 10%... (2 Replies)
Discussion started by: wojtyla
2 Replies

5. Shell Programming and Scripting

Controlled For Loop

I have a for loop and i pass in number of times i want to loop as argument to script. I have attached a snippet of my script. Problem is this does not work, if I manually replace the $NO_OF_LOOPS with a number in the script it works fine. NO_OF_LOOPS=$1 for i in {0..$NO_OF_LOOPS} ... (8 Replies)
Discussion started by: kelseyh
8 Replies

6. Shell Programming and Scripting

Passing gnuplot variables to shell script

Hi, I need to pass a gnuplot value to a shell script. I have a main shell script (Main.sh) that has a bunch of gnuplot commands. Main.sh calls another gnuplot script (Child.gnu). A part of the code in Child.gnu is as follows: sp '</data/src/scripts/results/plot_data.sh $col' u (A):2:3 w pm3d... (8 Replies)
Discussion started by: annazpereira
8 Replies

7. Shell Programming and Scripting

Using variables in gnuplot within a shell script

Hi everybody, please help me with this problem Suppose I have a script like this to run commands of gnuplot. #!/bin/sh lib=$1 old="output/old/$lib.dat" new="output/new/$lib.dat" gnuplot << EOF set logscale x set logscale y set size square set grid set pointsize 1 plot "< paste $old... (5 Replies)
Discussion started by: Dark2Bright
5 Replies

8. Solaris

In cluster configuration ora* VGs are not controlled by VCS

Need some one to explain "In cluster configuration ora* VGs are not controlled by VCS". Actually, I am not aware of this. Thanks, Rama (0 Replies)
Discussion started by: ramareddi16
0 Replies

9. Shell Programming and Scripting

Pass shell variable to gnuplot

Hi I am plotting a series of CDFs using gnuplot using plot "data" u 1:(1./x.) smooth cumulative I am doing this over many files and I need to tune the x value to the number of lines that meets a particular condition. Is it possible to get the line count from shell using cat file | grep... (7 Replies)
Discussion started by: jamie_123
7 Replies

10. Shell Programming and Scripting

Gnuplot script

Need assistance in getting a script right. It requires little tweaking and I am not getting it right . Using below data and the below script it creates a table with png file but regarding the time it create 6,7,8 and i want each time 6:15 ,6:30 and so on So that i can view the exact graph... (3 Replies)
Discussion started by: ajayram_arya
3 Replies
PLOT(3F)																  PLOT(3F)

NAME
plot: openpl et al. - f77 library interface to plot(3X) libraries. SYNOPSIS
subroutine openpl() subroutine erase() subroutine label(str) character str*(*) subroutine line(ix1, iy1, ix2, iy2) subroutine box(ix1, iy1, ix2, iy2) Draw a rectangle and leave the cursor at ( ix2,iy2). subroutine circle(ix, iy, ir) subroutine arc(ix, iy, ix0, iy0, ix1, iy1) subroutine move(ix, iy) subroutine cont(ix, iy) subroutine point(ix, iy) subroutine linemd(str) character str*(*) subroutine space(ix0, iy0, ix1, iy1) subroutine clospl() DESCRIPTION
These are interface subroutines, in the library -lf77plot, allowing f77 users to call the plot(3X) graphics routines which generate graphic output in a relatively device-independent manner. The f77 subroutine names are the same as the C function names except that linemod and closepl have been shortened to linemd and clospl . See plot(5) and plot(3X) for a description of their effect. Only the first 255 character in string arguments to label and linemd are used. This library must be specified in the f77(1) command before the device specific graphics library; for example, to compile and load a FOR- TRAN program in prog.f to run on a Tektronix 4014 terminal: f77 prog.f -lf77plot -l4014 See plot(3X) for a complete list of device specific plotting libraries. SEE ALSO
plot(5), plot(1G), plot(3X), graph(1G) 4.3 Berkeley Distribution April 30, 1986 PLOT(3F)
All times are GMT -4. The time now is 02:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy