8

What happens is that gnuplot is sampling the x-axis. It means that it does not compute the function for all the possible points in the interval [-2*pi:2*pi] but only a finite number of points. The corresponding y-values are then linked together with a line to complete the plot. If the number of samples is too low you obtain a behaviour similar to yours. The ...


5

Just for laughs, here is straight LaTeX \documentclass[tikz]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \begin{document} \begin{tikzpicture} \begin{axis}[ xmin=-2*pi,xmax=2*pi, ymin=0,ymax=1.1, ] \addplot[domain=-2*pi:2*pi,smooth,samples=1001] {abs(sin(deg(x)))}; \end{axis} \end{tikzpicture} \end{document}


5

It's an oversight of gnuplottex: if no gnuplot diagram is processed, the file <jobname>.gnuploterrors is not produced, so the final code for displaying errors fails to find it. 203 \AtEndDocument{% 204 \ifmiktex 205 \else 206 \CatchFileDef\gnuploterrors@{\jobname.gnuploterrors}{\endlinechar=`^^J \catcode`\ =12 }% 207 \expandafter\...


4

In gnuplot, the backslash is used as an escape character, as it is in LaTeX. So, when latex calls gnuplot, gnuplot gobbles up the backslash, and latex is asked to process the title 'eqref{eq:x2}', which just means that the braces are removed, and you end up with 'eqrefeq:x2' as your label (in a nice font). The solution is to stop gnuplot from interpreting ...


3

Thanks to the comments I have generated easily the Gnuplot figure with TikZ. I have used gnuplot raw option o addplot as follows, \documentclass[border=1mm]{standalone} \usepackage{amsmath} \usepackage{tikz,pgfplots} \pgfplotsset{width=11cm,compat=1.15} \begin{document} \centering \begin{tikzpicture} \begin{axis} [ legend pos=south east, ...


3

I had another solution here first, but I worked out a more proper one. The font size you pass to Gnuplot only controls how much space Gnuplot uses for each label. The actual characters are typeset by Latex. So, you have to specify the font size both for Gnuplot and for Latex. Gnuplot may base its calculation on a different font than is actually used by ...


3

Consider switching to the tikz terminal: \documentclass[a4paper]{article} \usepackage[miktex]{gnuplottex} \usepackage{gnuplot-lua-tikz} \begin{document} \begin{gnuplot}[terminal=tikz] set multiplot layout 2,1 set tmargin 0 set bmargin 0 set key top left set grid set ylabel 'My y-label' unset xlabel set xtics format "" plot sin(x) ls 1 set xlabel 'My x-...


2

I get a result with \documentclass[compress,red]{beamer} \mode<presentation> { \usetheme{Warsaw} \setbeamercovered{transparent} } \usepackage{gnuplottex} \begin{document} \begin{frame}[fragile] \frametitle{Illustration of 3D plot}{Rastrigin's function} \centering \begin{gnuplot}[terminal=cairolatex,terminaloptions={color size 9cm,7.25cm}] set ...


2

In order to produce the animations, you need to run pdflatex (or other engine) with -shell-escape turned on; from the command line it's pdflatex -shell-escape animated-distributions.tex Check your front-end for how to enable it. With this option, gnuplot can be called from inside the LaTeX run. Beware that it's not recommendable to have the option turned ...


2

The package ngerman is obsolete and should not be used. The error disappears if you correctly use babel. \documentclass[a4paper]{article} \usepackage[ngerman]{babel} \usepackage{gnuplottex} \begin{document} \begin{gnuplot}[terminal=epslatex] plot sin(x) w l \end{gnuplot} \end{document} Alternatively, but not recommendable, load the packages in ...


2

Just in case it's helpful, here's a version that uses pgfplots, and there's no need to use shell-escape % arara: pdflatex \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \begin{document} \begin{equation} y = ...


1

You are forcing the warning with terminaloptions = rotate. The following code works for me: \documentclass[a4paper, 11pt]{article} \usepackage{graphicx, latexsym, keyval, ifthen, moreverb} \usepackage{gnuplottex} \begin{document} \begin{figure} \begin{gnuplot}[terminal=epslatex] plot sin(x) \end{gnuplot} \caption{My figure.} \end{figure} \...


1

The problem is that file maintains open by gnuplot waiting for data, if you need to use the file created you must close that file using set output command and then return the previous device using set term pop command


1

I had this problem for a long time. After download the latest version of gnuplot, enabling shell escape, trying to write [miktex] in the \usepackage command, I finally found the solution (for me which I didn't find anywhere else). I was compiling a tex file which contains blanks in its name. I just replaces them by "_", and the errors go away by magic. I ...


1

Reinstalling Gnuplot and checking "Add application directory to your PATH environment variable" during the installation solved my problem.


1

It seems that auto-pst-pdf is processing the figures generated by gnuplottex incorrectly. Not sure what's causing this, but you can avoid the problem by using a gnuplot terminal that supports PDF output so that this conversion is unnecessary.


1

Gnuplottex doesn't format anything itself; all the formatting is done by gnuplot. You can find information on how to format labls with gnuplot here.


1

gnuplot has some options for setting the size of the generated graphic, cf. the manual (http://www.gnuplot.info/documentation.html): set size x{unit},y{unit} to set the exact size in your unit of choice, for example set size 6cm,4cm. The default is 12.5cm x 8.75cm. (Valid units are cm, mm, in or inch, pt, pc, bp, dd, cc.) set scale x,y to scale the figure ...


Only top voted, non community-wiki answers of a minimum length are eligible