I am having difficulty using Gnuplot's epslatex output in conjunction with Lyx. Gnuplot itself is capable of separately providing EPS graphics as well as text and labels as Tex code. Strictly speaking, I'm using Octave as a front-end to Gnuplot, but that shouldn't matter.
So, I have the .tex and the .eps files produced by gnuplot, and a .lyx file that attempts to use the file as input. Various tutorials, like http://psung.blogspot.com/2007/03/gnuplot-plots-in-latex.html suggest that this should work. However, I only get the labels and axes in the generated output, and none of the graphics. This happens regardless of the type of output generated by Lyx (PDF, DVI, or PS). If I manually \includegraphics the EPS, then it gets placed underneath the proper text as though it was a second figure or something. If I manually run latex on the plain LaTeX exported by Lyx, then the results are even stranger. The console output reports errors about an overfull \hbox. The graphics are displayed, as is the text for the legend, but the axes are not displayed. This is intensely frustrating. How is \input supposed to work? Its not like I'm using ERT or anything like that. A minimal example that demonstrates the problem is attached. Thanks, -Jonathan Brandmeyer OS: Debian Sid on x86_64 Lyx: 1.6.4 Gnuplot 4.2 patchlevel 6
<<attachment: tangent_impulse.eps>>
% GNUPLOT: LaTeX picture with Postscript \begingroup \makeatletter \providecommand\color[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package color not loaded in conjunction with terminal option `colourtext'% }{See the gnuplot documentation for explanation.% }{Either use 'blacktext' in gnuplot or load the package color.sty in LaTeX.}% \renewcommand\color[2][]{}% }% \providecommand\includegraphics[2][]{% \GenericError{(gnuplot) \space\space\spa...@spaces}{% Package graphicx or graphics not loaded% }{See the gnuplot documentation for explanation.% }{The gnuplot epslatex terminal needs graphicx.sty or graphics.sty.}% \renewcommand\includegraphics[2][]{}% }% \providecommand\rotatebox[2]{#2}% \...@ifundefined{ifgpcolor}{% \newif\ifGPcolor \GPcolorfalse }{}% \...@ifundefined{ifgpblacktext}{% \newif\ifGPblacktext \GPblacktexttrue }{}% % define a \...@addto@macro without @ in the name: \let\gplgaddtomacr...@addto@macro % define empty templates for all commands taking text: \gdef\gplbacktext{}% \gdef\gplfronttext{}% \makeatother \ifGPblacktext % no textcolor at all \def\colorrgb#1{}% \def\colorgray#1{}% \else % gray or color? \ifGPcolor \def\colorrgb#1{\color[rgb]{#1}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color[rgb]{1,0,0}}% \expandafter\def\csname LT1\endcsname{\color[rgb]{0,1,0}}% \expandafter\def\csname LT2\endcsname{\color[rgb]{0,0,1}}% \expandafter\def\csname LT3\endcsname{\color[rgb]{1,0,1}}% \expandafter\def\csname LT4\endcsname{\color[rgb]{0,1,1}}% \expandafter\def\csname LT5\endcsname{\color[rgb]{1,1,0}}% \expandafter\def\csname LT6\endcsname{\color[rgb]{0,0,0}}% \expandafter\def\csname LT7\endcsname{\color[rgb]{1,0.3,0}}% \expandafter\def\csname LT8\endcsname{\color[rgb]{0.5,0.5,0.5}}% \else % gray \def\colorrgb#1{\color{black}}% \def\colorgray#1{\color[gray]{#1}}% \expandafter\def\csname LTw\endcsname{\color{white}}% \expandafter\def\csname LTb\endcsname{\color{black}}% \expandafter\def\csname LTa\endcsname{\color{black}}% \expandafter\def\csname LT0\endcsname{\color{black}}% \expandafter\def\csname LT1\endcsname{\color{black}}% \expandafter\def\csname LT2\endcsname{\color{black}}% \expandafter\def\csname LT3\endcsname{\color{black}}% \expandafter\def\csname LT4\endcsname{\color{black}}% \expandafter\def\csname LT5\endcsname{\color{black}}% \expandafter\def\csname LT6\endcsname{\color{black}}% \expandafter\def\csname LT7\endcsname{\color{black}}% \expandafter\def\csname LT8\endcsname{\color{black}}% \fi \fi \setlength{\unitlength}{0.0500bp}% \begin{picture}(7200.00,5040.00)% \gplgaddtomacro\gplbacktext{% \colorrgb{0.00,0.00,0.00}% \put(1210,704){\makebox(0,0)[r]{\strut{}0}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1303){\makebox(0,0)[r]{\strut{}500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,1902){\makebox(0,0)[r]{\strut{}1000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,2500){\makebox(0,0)[r]{\strut{}1500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3099){\makebox(0,0)[r]{\strut{}2000}}% \colorrgb{0.00,0.00,0.00}% \put(1210,3698){\makebox(0,0)[r]{\strut{}2500}}% \colorrgb{0.00,0.00,0.00}% \put(1210,4297){\makebox(0,0)[r]{\strut{}3000}}% \colorrgb{0.00,0.00,0.00}% \put(1342,484){\makebox(0,0){\strut{}0}}% \colorrgb{0.00,0.00,0.00}% \put(2132,484){\makebox(0,0){\strut{}200}}% \colorrgb{0.00,0.00,0.00}% \put(2921,484){\makebox(0,0){\strut{}400}}% \colorrgb{0.00,0.00,0.00}% \put(3711,484){\makebox(0,0){\strut{}600}}% \colorrgb{0.00,0.00,0.00}% \put(4501,484){\makebox(0,0){\strut{}800}}% \colorrgb{0.00,0.00,0.00}% \put(5291,484){\makebox(0,0){\strut{}1000}}% \colorrgb{0.00,0.00,0.00}% \put(6080,484){\makebox(0,0){\strut{}1200}}% \colorrgb{0.00,0.00,0.00}% \put(6870,484){\makebox(0,0){\strut{}1400}}% \colorrgb{0.00,0.00,0.00}% \put(440,2740){\rotatebox{90}{\makebox(0,0){\strut{}ylabel}}}% \colorrgb{0.00,0.00,0.00}% \put(4106,154){\makebox(0,0){\strut{}xlabel}}% }% \gplgaddtomacro\gplfronttext{% \csname LTb\endcsname% \put(5883,4603){\makebox(0,0)[r]{\strut{}radial}}% \csname LTb\endcsname% \put(5883,4383){\makebox(0,0)[r]{\strut{}tangential}}% }% \gplbacktext \put(0,0){\includegraphics{tangent_impulse}}% \gplfronttext \end{picture}% \endgroup
%% LyX 1.6.4 created this file. For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{graphicx} \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{graphicx} \makeatother \usepackage{babel} \begin{document} \section{My Section} % \begin{figure} \input{tangent_impulse.tex} \includegraphics{tangent_impulse} \caption{Tested figure} \end{figure} \end{document}