How to set what appears as a title in a document viewer menu bar?

I don't see how this is related to gnuplot, but using

\usepackage{hyperref}

\hypersetup{pdftitle=foo,pdfdisplaydoctitle}

in your LaTeX document preamble might do what you want.


This is caused by the following lines which gnuplot puts in graph.tex:

SDict begin [
  /Title (graph.tex)
  /Subject (gnuplot plot)
  /Creator (gnuplot 4.4 patchlevel 4)
  /Author (mait)
%  /Producer (gnuplot)
%  /Keywords ()
  /CreationDate (Fri Mar 23 16:20:26 2012)
  /DOCINFO pdfmark
end

I can't find anything in the gnuplot manual that prevents this behaviour, so I suggest editing the file and putting percentage symbols before /Title, /Subject, /Creator and /Author. Otherwise your figures are likely to interfere with other methods of inserting metadata into the pdf. Doing this manually is likely to be cumbersome if you have a lot of files, though.

EDIT

Gnuplot can issue system commands, so you can use a utility such as sed to automatically change the file graph.tex.

set term pslatex
set output "temp.tex"
plot x**2
set output #Closes the temporary output file.
!sed -e 's|/Title|%/Title|' -e 's|/Subject|%/Subject|' -e 's|/Creator|%/Creator|' -e 's|/Author|%/Author|' < temp.tex > graph.tex

I think this will work on any unix machine.