Graphics, Figures & Tables.JPG and .eps images in the same file.

Information and discussion about graphics, figures & tables in LaTeX documents.
mas
Posts: 226
Joined: Thu Dec 04, 2008 4:39 am

Re: .JPG and .eps images in the same file.

Post by mas »

In addition to what has been suggested, I would like to add a suggestion : try the pslatex terminal in gnuplot. With that your legends, axes labels can be typeset as in LaTeX.

Regards,

sridhar

OS: Debian/GNU Linux; LaTeX System : TeXLive; Editor : Vim

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

feddozz
Posts: 8
Joined: Wed Aug 12, 2009 3:15 pm

.JPG and .eps images in the same file.

Post by feddozz »

localghost wrote: Usually GnuPlot sets the right bounding box. But I don't know which terminal you are using for the output. When I used it to get my data sets plotted, I set the terminal to postscript.

Code: Select all

set term post eps enhanced
The GnuPlot manual shows that there are many more terminals (also pdf). The job is simplified by using the gnuplottex package. Nowadays I use pgfplots (based on pgf/tikZ) or pstricks to generate plots. The advantage is a better consistency of the whole document since the default font is used.
Sorry I have been away for a while...

I am using:

Code: Select all

set term post eps enhanced
and the bounding box is smaller than the figure. The thing is that I have all the eps ready. I would like to avoid to use another procedure. I'll probably change the bounding box myself.
feddozz
Posts: 8
Joined: Wed Aug 12, 2009 3:15 pm

Re: .JPG and .eps images in the same file.

Post by feddozz »

Hello,
I am trying to use gnoplottex for my graphs. I have a problem. When I compile I get the error Shell escape not enabled. I am using the --enable-write18 in the field 'Command line arguments to pass to the compiler' for the output profile I am using (LaTeX to pdf).
any suggestions?
thanks
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

.JPG and .eps images in the same file.

Post by localghost »

Make sure that you prepared the gnuplottex package for usage with MikTeX.

Code: Select all

\usepackage[miktex]{gnuplottex}
See the manual for details. For direct compilation to PDF you should use the pdf terminal instead of postscript. See the Gnuplot manual for details.

There is some preliminary work to do before everything works fine. These steps require that you know how to handle your operating system. The file REAMDE.Windows in the Gnuplot archive suggests to use the pgnuplot.exe executable for external calls. Rename this file to gnuplot.exe so that the compiler can find it. But that is not enough. The path to the Gnuplot executables has to be added to the PATH environment variable of your system.
feddozz
Posts: 8
Joined: Wed Aug 12, 2009 3:15 pm

.JPG and .eps images in the same file.

Post by feddozz »

Hi,
I did everything you said. Renamed pgnuplot.exe to gnuplot.exe, set the environment variable path to the bin folder of gnuplot.

I have a doubt about the terminal. I set the terminal as follows in my .tex file:

Code: Select all

\begin{gnuplot}[terminal=pdf]
plot sin(x)
\end{gnuplot}
Is that correct or do I need to do something in gnuplot itself?

I still get the following warning:
"package gnuplottex Waring:Conversion of thesys-gnuplottex-fig1.gnuplot failed. please convert thesys-gnuplottex-fig1.gnuplot manually".

At least I don't get the "shell escape not enabled" warning any more.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: .JPG and .eps images in the same file.

Post by localghost »

Belated reply because I forgot this topic and now stumbled upon it. I get the same error. That's very strange. Obviously the package doesn't work with every Gnuplot terminal. I suggest to contact the author of the package.
Post Reply