[Tex/LaTex] GNUplot and LaTeX (linestyles)

gnuplot

I've just started using GNUplot to create graphs. I've been using the epslatex terminal and my issue is, when I create my graph in the wxt terminal, and then replot it in the epslatex terminal, the linestyle changes, even if I never explicitly specified a linestyle. Basically, in the wxt terminal, then curve is solid; however, in the epslatex terminal, the curve is dashed.

I read somewhere that changing terminals can give different linestlyes, and that one is supposed to issue the command 'test' to see the various styles; however, when I try to do 'test' in the epslatex terminal, it tells me that "epslatex terminal cannot write to standard output" (which makes sense I guess). I'm just wondering where I can find what the different linestlyes correspond to in the epslatex terminal.

Also, as a bit of a sub-question, I'm wondering if my approach is any good… To create the graphs, I create it the epslatex terminal, then I convert the eps file to a pdf file so that I can use pdflatex. Is there a better way to do this (perhaps GNUplot can create the pdf for me)?

Best Answer

To use the epslatex terminal with the test command, you first need to specify where to write the output. You can do that by issuing set out "<filename>.tex, then test, and then set out to close the file. You'll then get a <filename>.tex and a <filename>.eps. By using \input{<filename>} in a LaTeX document, you'll get the following output (assuming you used set terminal epslatex color):

As you can see, the epslatex terminal uses dashed line styles by default. You can change to solid colored lines by using set terminal epslatex color solid:


For comparison, here's the wxt output: