gnuplot pipelined one-liner ?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting gnuplot pipelined one-liner ?
# 1  
Old 01-07-2009
gnuplot pipelined one-liner ?

Hi,

just tested gnuplot and it works fine on dumb monitor.
gnuplot> set term dumb
Terminal type set to 'dumb'
Options are 'feed 79 24'
gnuplot> set yrange [0:1.5]
gnuplot> plot [-2:2] exp(-x*x)

What I need is to have it to read data piped from a shell script, providing refresh feature (basic animation).

shell script | gnuplot

As data from shell script is streamed on-line
how to set gnuplot working for pipelined data .

In the above example I would like shell script to generate
"x" value as input into gnuplot.

Thanks.

Darius

follow-up

One of the great features of Gnuplot is its ability to accept input data from a pipe. If your program outputs data in one of the above formats, it may be piped directly into Gnuplot without the need of an intermediate data file. For example, if your program's name is myprog, you may plot its output directly with the command

plot "< myprog"

ok.
the issue is I have got my shell scripts pipe working from left to right
but plot is reading pipe from the right.
Does it work placing
"shell script | one-liner" ?

Darius

Last edited by darius2; 01-07-2009 at 12:34 PM..
# 2  
Old 01-07-2009
Hi.

I agree that gnuplot is a very good piece of software.

You have access to a very good computing environment, so when you ask question like:
Quote:
Does it work placing ... ?
you can more easily find the answer yourself by testing rather than asking here.

Your other posts suggest that you do that testing and experimentation, and that's a good habit to get into -- that's how you become independent and can then answer questions rather than only asking them. (Many responders look at user history, particularly for a low number of posts.)

So to solve problems, I suggest:

0 - do some reading, man pages, etc.

1 - try the most reasonable approaches that occur to you (note: it will often be more than one approach) -- this will become easier and better as you continue to use unix-like systems,

2 - if it fails, do some more reading: man pages, forum search, Google

3 - if you still cannot get satisfaction, then create the smallest model of your problem, and post it here. Include a dataset if necessary, the actual results, your code, and what you think the results should be or what you desire them to be. (Learn to use CODE blocks to make appropriate sections of your posts more readable.)

Best wishes ... cheers, drl
# 3  
Old 01-07-2009
Please stop your philosophy.
I did tests , did experiments, did Google search.

I expect exact answer to basic question, nothing more.
And am sure to contact and get answer from an experienced user of gnuplot soon.

This forum is for discussion and asking questions to more experienced Linux shell scripters.

So what is your answer to my question ?

Darius














Quote:
Originally Posted by drl
Hi.

I agree that gnuplot is a very good piece of software.

You have access to a very good computing environment, so when you ask question like:

you can more easily find the answer yourself by testing rather than asking here.

Your other posts suggest that you do that testing and experimentation, and that's a good habit to get into -- that's how you become independent and can then answer questions rather than only asking them. (Many responders look at user history, particularly for a low number of posts.)

So to solve problems, I suggest:

0 - do some reading, man pages, etc.

1 - try the most reasonable approaches that occur to you (note: it will often be more than one approach) -- this will become easier and better as you continue to use unix-like systems,

2 - if it fails, do some more reading: man pages, forum search, Google

3 - if you still cannot get satisfaction, then create the smallest model of your problem, and post it here. Include a dataset if necessary, the actual results, your code, and what you think the results should be or what you desire them to be. (Learn to use CODE blocks to make appropriate sections of your posts more readable.)

Best wishes ... cheers, drl
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Gnuplot question

Hi! Let's say I have these two columns in file.txt 0 1 1 5 2 10 3 15 4 20 5 25 in gnuplot, i would plot usingplot 'file.txt' u 1:2 If I wanted to add a label to the y-axis I would useset label "Ef" at 0.0,7.0 However, I want the label Ef to be on the otherside of the y-axis. Not... (0 Replies)
Discussion started by: sidiq1983
0 Replies

2. Shell Programming and Scripting

Gnuplot in bash

Hi, I want a graph plot using gnuplot for df -h command. like filesystem, total size and avail size. Thanks, Anjan ---------- Post updated at 02:35 PM ---------- Previous update was at 02:34 PM ---------- I want a graph plot using gnuplot for df -h command per hour. (4 Replies)
Discussion started by: Anjan1
4 Replies

3. UNIX for Dummies Questions & Answers

Need help! How to gnuplot a picture??

I would like to ask if I have already plot a graph using gnuplot, the setting(made by others) is in "gnuplot.defaults": gnuplot> load '<ParadisDir>/inputs/gnuplot.defaults' gnuplot> splot 'box.in' with lines, '0t0001' w lines How to transform it to bmp file? (or other types of pictures?) ... (2 Replies)
Discussion started by: kelvin490
2 Replies

4. Shell Programming and Scripting

Search & Replace regex Perl one liner to AWK one liner

Thanks for giving your time and effort to answer questions and helping newbies like me understand awk. I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk. Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies

5. Shell Programming and Scripting

xargs and gnuplot

Hi All, Seems I have an xargs stdin problem that I don't understand. I have a script (call it myscript.sh) that takes the names of one or more file(s) specified on the command line and creates a single gnuplot command file containing multiple records, one for each specified file. Each of... (9 Replies)
Discussion started by: paulianna2002
9 Replies

6. UNIX and Linux Applications

gnuplot limitations

I'm running a simulation (programmed in C) which makes calls to gnuplot periodically to plot data I have stored. First I open a pipe to gnuplot and set it to multiplot: FILE * pipe = popen("gnuplot", "w"); fprintf(pipe, "set multiplot\n"); fflush(pipe); (this pipe stays open until the... (0 Replies)
Discussion started by: sedavidw
0 Replies

7. UNIX and Linux Applications

GNUplot

Hi, I am trying to make a plot of an ASCII file using GNUplot, but I keep getting error msg: for example plot filename.txt It says that (.txt ) is not identified ... I tried to write it without the .txt part, but I also get the error msg. Any idea why? :confused: (1 Reply)
Discussion started by: cosmologist
1 Replies

8. AIX

Sarcheck - gnuplot 3.7.1

Good Afternoon, I'm having an issue finding the correct libX11.a fileset on my 595 running AIX 5.3.0.0. Currently I'm trying to instal Sarcheck on my nim master. The problem occurs during the GNUPLOT installation. error: failed dependencies: libX11.a(shr4.o) is needed by gnuplot-3.7.1-1... (3 Replies)
Discussion started by: vincent1117
3 Replies

9. UNIX for Dummies Questions & Answers

Help with gnuplot

Hi, I am a beginner using UNIX, and was wondering how to use gnuplot from UNIX on my pc. I am connected remotely to my work's UNIX server using Secure Shell Client, and gnuplot won't open a new window when I use the plot command. How do I do this? Moreover, is it possible to save things from the... (0 Replies)
Discussion started by: KTTFB64
0 Replies
Login or Register to Ask a Question