What is the code sent to gnuplot?

Suppose that code below is executed:

graphics_toolkit(“gnuplot”)
plot(1:10,1:10)

Is there a way to know what code is sent to gnuplot?
I mean, if I call gnuplot (outside octave), what should be the code (in the gnuplot prompt) to produce same figure?

Kind regards,
Leonardo

Sure, you can use the debugging form of drawnow to get a dump of the commands sent to gnuplot.

For example

graphics_toolkit ('gnuplot');
plot (1:10, 1:10);
drawnow ('qt', '/dev/null', 'debug.gnuplot');