gnuplot on Angstrom

Hi,

I installed gnuplot-4.6.5 on Beaglebone Black running Angstrom by compiling from source. On trying to plot x^2, I got the following error:

Code:

> plot x*x   
gnuplot: unable to open display '' 
gnuplot: X11 aborted.

So I tried setting the display to :0

Code:

export DISPLAY=":0"

and retried plotting x^2.

Code:

> plot x*x      
No protocol specified
gnuplot: unable to open display ':0'
gnuplot: X11 aborted.

Can you please help me resolve this issue?

I installed x11vnc and ssvnc for remote desktop and noticed that gnuplot invoked from a terminal opened via ssh gives the above error while that invoked from a terminal opened via ‘Applications > System Tools > Terminal’ (remote desktop) doesn’t have this problem.

What could be the reason behind this?