1

I would like to plot directly from other program stdout. I have found - should be applied to signal data is piped; but how to do that?

./DVM -l 1 -O 1 | gnuplot -p

2 Answers 2

3

I have no idea what ./DVM will produce, but if it is emitting gnuplot commands that should work as shown. If it is emitting only data values then you still need a source of gnuplot commands from somewhere, maybe as part of the gnuplot command, maybe from a separate file. That may be the mechanism referred to by your previous advice "- should be applied". For example to execute a simple gnuplot command that plots input [x,y] values:

yourcommand | gnuplot -p -e "plot '-' with lines"
Sign up to request clarification or add additional context in comments.

Comments

0

If I understand correctly you have script that is generating some output that you want to use in your plot like:

$ ls
script.sh

$ cat script.sh 
#! /bin/bash

echo "1 1"
echo "2 3"
echo "5 5"

You can pass its output as a data to gnuplot with command:

./script.sh | gnuplot -p -e "plot '<cat' w l"

Edit: After taking a look in Ethan's answer I realised that you can use '-' insteal of '<cat'.

The output will look like: gnuplot chart

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.