1

Is it possible to run a gnuplot from a standard shell without entering the gnuplot interactive shell?

I just want to be able to type my gnuplot commands in one line from my standard shell and to be able to save standard gnuplots as aliases. Currently I have to create .sh files where I write my commands which is quite terrible.

1 Answer 1

2

Do you mean

echo "plot sin(x)" | gnuplot -p

OR

echo -e "set term png\n set output 'alma.png'\n plot sin(x)\n" | gnuplot

?

OR

echo | gnuplot -p -e "plot sin(x)" 

(last one by Christoph)

Sign up to request clarification or add additional context in comments.

3 Comments

No need to use echo: gnuplot -p -e "plot sin(x)"
@Christoph You are right. But you mean echo | gnuplot -p -e "plot sin(x)" don't you?
Great! Exactly what I needed.

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.