0

In sample.dat I have:

set terminal pngcairo  transparent enhanced font "arial,10" fontscale 1.0 size 500, 350 
set output 'simple.2.png'

plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1))

From ubuntu/terminal I execute:

gnuplot -e "filename='sample.dat'"

but the simple.2.png file is not created. How do I export a plot to e.g png using gnuplot from command line?

1 Answer 1

1

I have no idea where you got that from!

To execute a gnuplot script (here called simple.gp), simply call

gnuplot simple.gp

You should keep the extension .dat for data files.

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

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.