I am a begineer in LaTex and absoulte novice in gnuplot. I am using Texstudio and Windows 8.1. The problem is - I cannot make LaTex display a simple image. Probably some settings issue. In paricular, I took the simplest gnuplot code from the web (with slight adjustment):
This is the gnuplot code for my graph:
reset
set key inside left top vertical Right noreverse enhanced autotitles box linetype -1 linewidth 1.000
set samples 50, 50
plot [-10:10] sin(x),atan(x),cos(atan(x))
set term pslatex auxfile
set output 'proba1.tex'
replot
This is a file (test1.tex) that I get (besides ps file):
% GNUPLOT: LaTeX picture with Postscript
\begingroup%
\makeatletter%
\newcommand{\GNUPLOTspecial}{%
\@sanitize\catcode`\%=14\relax\special}%
\setlength{\unitlength}{0.0500bp}%
\begin{picture}(7200,5040)(0,0)%
\special{psfile=proba1.ps llx=0 lly=0 urx=360 ury=252 rwi=3600}
\put(2340,4236){\makebox(0,0)[r]{\strut{}cos(atan(x))}}%
\put(2340,4436){\makebox(0,0)[r]{\strut{}atan(x)}}%
\put(2340,4636){\makebox(0,0)[r]{\strut{}sin(x)}}%
\put(6839,200){\makebox(0,0){\strut{} 10}}%
\put(5324,200){\makebox(0,0){\strut{} 5}}%
\put(3809,200){\makebox(0,0){\strut{} 0}}%
\put(2295,200){\makebox(0,0){\strut{}-5}}%
\put(780,200){\makebox(0,0){\strut{}-10}}%
\put(660,4799){\makebox(0,0)[r]{\strut{} 1.5}}%
\put(660,4066){\makebox(0,0)[r]{\strut{} 1}}%
\put(660,3333){\makebox(0,0)[r]{\strut{} 0.5}}%
\put(660,2599){\makebox(0,0)[r]{\strut{} 0}}%
\put(660,1866){\makebox(0,0)[r]{\strut{}-0.5}}%
\put(660,1133){\makebox(0,0)[r]{\strut{}-1}}%
\put(660,400){\makebox(0,0)[r]{\strut{}-1.5}}%
\end{picture}%
\endgroup
\endinput
This is LaTex text:
\documentclass[11pt,twoside,a4paper]{article}
\usepackage{graphicx}
\begin{document}
gnuplot test
\begin {figure}
\begin{center}
\input{test1.tex}
\end{center}
\end {figure}
\end{document}
It might seems silly, but I am looking for the solution for days now, but no luck. Many thanks. Marko
test1.texis incomplete, i.e. missing lines from the end. Is that really what you get from gnuplot? – mvkorpel Jul 04 '14 at 14:42latex+dvips+ps2pdf– egreg Jul 04 '14 at 14:46set teminal latex? It saves you lots of headaches. – Pouya Jul 04 '14 at 15:16unset outputin gnuplot and then I got a complete tex file. According to gnuplot FAW, some output formats must be explicitly closed like this. After that I usedlatex+dvips+ps2pdfas egreg suggested. This solved the problem. Many thanks once more. – Marko Jul 04 '14 at 20:08