# Tag Info

## Hot answers tagged gnuplot

Accepted

### How to draw force lines onto an equipotential contour plot using TikZ?

(The answer is inspired by the jaytar's comment) You can use pythontex for that. Note that if your potential function is U(x) then the field lines are orthogonal to its level curves, so they are ...
• 7,147
Accepted

### Plot a transfer function in latex

You can use de the bodegraph package (https://www.ctan.org/pkg/bodegraph) http://www.texample.net/tikz/examples/bode-plot/ for your example first : the plot of the amplitude and phase diagrams \...
• 12.3k

### Plot large data

When treating big vector data like this, I fear a lot the possibility of having (undetected) visual aliasing. Consider for example a sinusoidal signal with period 10 (arbitrary units), with a noise of ...
• 40.3k
Accepted

### How to plot abs(sin(x)) with gnuplottex

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 ...
• 268
Accepted

### How to plot function sin(x)^2 / x^2

As commented by @daleif, the problem is that the trigonometric functions in pgfplots are defined with the argument in degrees, not in radians. So you are calculating the function really near zero, and ...
• 40.3k
Accepted

### Graphs of Implicit Curves using Tikz, gnuplot, and LaTeXIt

In order to run gnuplot from within pdflatex, you have to pass the -shell-escape option. Go to the preferences of LaTeXIt and choose the “Typesetting” tab; next to the pdflatex box there's the icon ...
• 1.1m
Accepted

### Using tikz/pgf and gnuplot with lualatex

\write18 shell escape does not work by default for newer luatex, the shellesc package puts it back, this works for me: \RequirePackage{luatex85,shellesc} \documentclass{article} \usepackage{tikz} \...
• 752k
Accepted

### pgfplots/gnuplot: How to find the curve-fitting function passing through certain points and plot it?

You can use \addplot gnuplot to do the curve fitting using the gnuplot backend, which allows you to use different domains for fitting and plotting the function. It also allows you to fit non-linear ...
• 232k

### How to plot function sin(x)^2 / x^2

A PSTricks solution for comparison purpose only. \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot} \def\f{(sin(x)/x)^2} \psset { yunit=4cm, xunit=.5cm } \begin{...
• 46.9k

### Plot a function of two variables equal 0

@Superuser27 is correct about the missing *. Additionally, I don't understand why you're using \addplot3. Finally, that's not a function. \documentclass{article} \usepackage[margin=0.5in]{geometry} ...
• 13.6k

### Plot a transfer function in latex

If its a one time thing, you can do it manually (the hard way). Odd powers contribute to imaginary part and even powers contribute to real part; with alternating signs. Now take the square root of the ...
• 932

### Plot a transfer function in latex

Try: \documentclass[border=3mm, tikz, preview ]{standalone} \usepackage{pgfplots} \pgfplotsset{width=8cm,compat=newest} \begin{document} \begin{...
• 296k

### Using pgfplots and gnuplot and compiling with output-directory

Digging around in the files, mentioned in @anonymous' comment, to find out what to patch, I spotted the following pgf-key. It can simply be overwritten in the preamble of the document. \usepackage{...
Accepted

### How can I draw the probability density function a truncated normal distribution?

Because gnuplot knows the error function (erf), you can use the raw gnuplot function of PGFPlots to do what you want. Because I don't know the truncated normal distribution function, I am not 100% ...
• 29.5k
Accepted

### 3d interactive image using gnuplot

Asymptote (http://asymptote.sourceforge.net/) is what you are after. It produces interactive 3D models in the PRC format which are eventually embedded using the media9 LaTeX package. See Sect. 7 of ...
• 54.6k
Accepted

### Scatterplot with trendline with curve fitting equation of polynomial of degree 3

There were a few mistakes in your Gnuplot code. I'm no expert, but on comparing with Adding values to pgfplot legend and testing a bit: You need a semi-colon between each of the variable declarations,...
• 206k

### pgfmath / gnuplot: How to use gnuplot for complicated calculations?

gnuplot is more for plotting but you could use expl3's floating point instead: \documentclass{article} \usepackage{xfp} \begin{document} \newcommand{\x}{0.02} \edef\y{\fpeval{2*11000*(1 - 1.40576 - ...
• 752k
Accepted

### gnuplottex package not working anymore

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 \...
• 1.1m

### Gravitational/electric field with tikzpicture

It is quite easy in pgfplots, which is based on tikz, since the plot is made by two analytically defined contour plots as pointed out in the PDF from @Jeremie's comment. Only the singularity handling ...
• 2,207

### File not found while using \input for gnuplot figures

gnuplot's epslatex terminal creates two files fig_name.tex and fig_name.eps. You have to call fig_name.tex from your main file with \input{fig_name}, but this one will load fig_name.eps with an \...
• 136k

### How to plot abs(sin(x)) with gnuplottex

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, ...
• 54k

### Gnuplot terminal

For some nice vectorised graphics in ones latex I use gnuplot like this with cairolatex output set term cairolatex pdf set output "data.tex" plot 'data.csv' using 1:2 with lines, And then I use the ...

### Draw illustration uniform convergence

Do you want something like this? I'm not sure what exactly you are trying to do. (Usually things which look like this get plotted either using TikZ or pgfplots.) \documentclass[border=10pt]{...
• 196k