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)
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
\documentclass[
11pt,cmyk,
multi={tikzpicture},
border=10mm,
]{standalone}
% General packages
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{helvet}
\usepackage[garamond]{mathdesign}
\usepackage{mathtools}
% Colors
\usepackage{xcolor}
\definecolor{spot}{cmyk}{1,0.20,0,0}
\colorlet{gray}{black!60}
\colorlet{wave}{spot}
% Load TikZ and libraries
\usepackage{tikz}
\usetikzlibrary{calc,positioning,decorations.pathmorphing,%
arrows.meta,backgrounds}
% Define TikZ styles etc.
\tikzset{
every plot/.style={
prefix=plots/,
samples=200,
},
every node/.style={
font=\footnotesize,
},
line width=1pt,
shorten/.style={
shorten >=#1,
shorten <=#1,
},
>=Triangle[],
axis/.style={-Stealth[]},
tick/.style={
axis,
shorten <=-0.5\pgflinewidth,
shorten >=-0.5\pgflinewidth,
},
}
% Load and configure pgfplots
\usepackage{pgfplots}
\usepgfplotslibrary{polar}
\pgfplotsset{
compat=1.11,
wave axis/.style={
view={0}{90},
hide axis,
colormap={custom}{color=(white) color=(wave)},
trig format plots=rad,
trig format=rad,
x=1cm,
y=1cm,
z=0cm,
anchor=origin,
},
wave plot/.style={
samples=200,
samples y=2,
surf,shader=interp,
},
polar wave plot/.style={
data cs=polar,
domain=0:2*pi,
samples y=100,
surf,shader=interp,
},
}
% Macro for subfigure captions
\newcommand{\subfig}[1]{\textbf{\textsf{#1)}}~}
\begin{document}
\begin{tikzpicture}
% define variables
\def\H{0.275}
\def\S{1.8}
\def\B{8}
\def\T{4.5}
\def\l{2.6}
\def\s{0.3}
\pgfmathsetmacro\w{atan((\S+\H/2)/\T)}
\pgfmathsetmacro\R{sqrt(\T^2+(\S+\H/2)^2)}
%% wave parameters
\pgfmathsetmacro\wL{6.5*\H}
\pgfmathsetmacro\wA{\H/2}
\pgfmathsetmacro\D{10*\wL}
% 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))};
\end{axis}
% radial wave
\begin{scope}
% \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)};
\end{axis}
\end{scope}
% 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$};
\end{tikzpicture}
\end{document}
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
6.
-shell-escape
? – egreg Jan 7 '19 at 11:56wave plot
part – sab hoque Jan 7 '19 at 12:05