I am not sure why naming a plot in a tdoes not seem to work for me.
This works without using name in the addplot line:
$graph_imageb = createTikZImage();
xtick distance=1, ytick distance=4 ]
\addplot[blue, ultra thick] (x,5*x*x-2*x);
But changing the addplot line to include name does not: \addplot[name path=F, blue, ultra thick] (x,5*x*x-2*x);
Ultimately I wish to use the names to fill in between two graphs.