2

I need to plot a point on a graph of a function. I've seen gnuplot> plot “< echo ‘x y’” as an example, however, that only works on the terminal and I need it to be on a .gp file. I've also seen doing set parametric plot 4,3 but then I can't plot the point over the graph of the function.

Is there a way to do this?

2 Answers 2

1

Try something like:

set terminal postscript enhanced color
set output 'plot.eps'

set xr[-10:10]
set yr[-2:2]
plot sin(x), \
 "<echo '3.141592 0'" pt 7 ps 2 notitle

The comma allows you to plot multiple things in the same plot. This way you have to specify the range and the point position manually, but it works for me in a plot script in gnuplot 4.6.

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

1 Comment

This doesn't really matter, but you don't need the single quote inside the double quotes. i.e. "< echo 3.14159 0" is just fine.
1

another option is to use 'inline data'

plot sin(x) w lines, '-' w p pt 7 ps 5
   3.14 0
e

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.