The example provided works fine for me (TeXLive 2011) with
pdflatex --shell-escape. Note that the
--shell-escape option is necessary. If you don't provide that option then output file will be blank.
If that does not solve your problem, I would guess that there is a problem with you
gnuplot installation. Perhaps you can try some of the test cases that come wtih
gnuplot and ensure that that works. Also, is your path properly set up to locate
It would be helpful if you would provide more details as to what do you mean by "did not generate the graph". Were there any error messages in the logs? If you put text before the
tikzpicture does that get output properly? Did you have a look at the files that get generated in the directory where you are running this? Is there are *.gnuplot file generated? Perhaps you should have a look at this gnuplot tutorial and ensure that gnuplot is working.