With 2020.02.13 dev snapshot and *installed* (in /usr/local) octave:
<<<
octave -q -f
octave:1> graphics_toolkit gnuplot
octave:2> demo legend
legend example 1:
clf;
plot (rand (2));
title ("legend called with string inputs for labels");
h = legend ("foo", "bar");
set (h, "fontsize", 20, "location", "northeastoutside");
legend example 1: failed
'__gnuplot_legend__' undefined near line 130, column 130
Press <enter> to continue:
>>>
It works fine if I ./run-octave in build tree.
I suspect it is something with octave handling of directories and subdirectories....
Dmitri.
--