I am trying to recreate this TikZ picture I saw https://tex.stackexchange.com/a/212936 (specifically the last image)

However upon compiling I get a message saying that the process exited ith errors but there is no information in the log file (see attached screenshot)

enter image description here

enter image description here

I am not sure why this error as occurs as I can render both examples from: enter link description here

My code I am trying to render:

% !TeX encoding = utf8

% General packages

% Colors

% Load TikZ and libraries
% Define TikZ styles etc.
   every plot/.style={
   every node/.style={
   line width=1pt,
      shorten >=#1,
      shorten <=#1,
      shorten <=-0.5\pgflinewidth,
      shorten >=-0.5\pgflinewidth,

% Load and configure pgfplots
      wave axis/.style={
         hide axis,
         colormap={custom}{color=(white) color=(wave)},
         trig format plots=rad,
         trig format=rad,
      wave plot/.style={
         samples y=2,
      polar wave plot/.style={
         data cs=polar,
         samples y=100,

% Macro for subfigure captions


    % define variables
    %% wave parameters
    % plane wave
    \begin{axis}[wave axis]
    \addplot3[wave plot,domain=-\B:0.05,domain y=-\wA:\wA] {abs(sin(pi/\wL * x))};
    %      \addplot[domain=-\D:0,samples=200] function {abs(cos(pi/\wL * x))};
    % radial wave
    %      \clip (0,-\H/2-\S) -- (-\w:\R) arc [start angle=-\w, end angle=\w, radius=\R]
    %         -- (0,\H/2+\S) -- cycle;
    \clip (0,-\H/2-\S) rectangle (\T,\H/2+\S);
    \begin{axis}[wave axis]
    \addplot3[polar wave plot,domain y=0:2*\T] function {abs(sin(pi/\wL * y))*exp(-0.2*y)};
    %         \addplot[domain=0:2*\T,samples=200] function {abs(cos(pi/\wL * x))*exp(-0.2*x)};
    % tube
    \draw [ultra thick] (-\B,\H/2) -| (0,\H/2+\S);
    \draw [ultra thick] (-\B,-\H/2) -| (0,-\H/2-\S);
    % axis
    \draw [axis] (-\B,0) -- ($(\T,0)-(0.25,0)$) node [below left] {$x$};
    \draw [tick,|-] (0,0) node [below right=2pt and 2.5pt,inner sep=0pt] {$0$} -- (1,0);
    \draw [axis] (0,0) -- (25:2.5) node [below] {$\vec{r}$};
    % captions
    \draw (-2.5*\wL,0.25*\H) -- ++(65:.6) node [above] {$\psi_\text{i}$};
    \draw (60:\wL/1.9) -- ++(180:1.1) node [left] {$\psi_\text{a}$};
    \node at (0,-\H/2) [below left, align=right] {cross sectional\\area $A$};

Upon inspection of the log file I found this near runsystem

Package pgfplots info on input line 98: Overriding colorspace to cmyk due to xc
olor configuration.
Package pgfplots info on input line 107: Overriding colorspace to cmyk due to x
color configuration.
\openout3 = `diagram.pgf-plot.gnuplot'.

runsystem(gnuplot diagram.pgf-plot.gnuplot)...executed.

PGFPlots: reading {diagram.pgf-plot.table}
LaTeX Font Info:    Try loading font information for OT1+mdugm on input line 11
  • I get no error. Did you run LaTeX with -shell-escape? – egreg Jan 7 '19 at 11:56
  • I'm curious, what part of this code needs gnuplot (I'm guessing it is hidden somewhere) – daleif Jan 7 '19 at 12:00
  • yes the wave plot part – sab hoque Jan 7 '19 at 12:05
  • 1
    If your on windows try my mwe here tex.stackexchange.com/questions/456297/… I will show some basic checks in a rudimentary Results.txt file – user170109 Jan 7 '19 at 12:46
  • 1
    Ok I updated gnuplot to 5.3 (todays version) and get several warning etc but not from gnuplot the issue in my case seems to be font related as I have had problems with garamond in the past (I probably need to clear out a local file) so if I change Garamond to the one I have available [ebgaramond] it compiles for me (with an acceptable pair of font warnings) – user170109 Jan 7 '19 at 14:18

This appears to be a font issue as {mathdesign} requires at least three specific fonts to be available, however only one at a time so if you cut and paste these uncomment your one of choice


Used with the fontenc package \usepackage[T1]{fontenc}

The font names may be abbreviated i.e


ensure your font mapping is updated via TeX Live manager or MiKTeX-console. Having personally had problems with Garamond in the past it works in my case if I change it to


If that does not work consider reloading the mathdesign package (or simply commenting it out)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.