## LaTeX forum ⇒ Graphics, Figures & Tables ⇒ Airfoils in Tex using TikZ

Information and discussion about graphics, figures & tables in LaTeX documents.
flyingtex
Posts: 2
Joined: Sat Mar 31, 2018 2:30 pm

### Airfoils in Tex using TikZ

Hello,

This is the first time I'm trying to use TikZ and I have found this example:
http://www.texample.net/tikz/examples/airfoil-profiles/

However even with the example .tex files and .airfoil files I cannot get the airfoils to show when I typeset.

Should the .tex file be in the same directory as the .dat files when using TikZ, I have tried this and it doesn't show the airfoils.

Any ideas where I may be going wrong?

Stefan Kottwitz
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm
Hi,

welcome to the forum!

Perhaps show us the code you are using. You can also post attachments to posts here. It's hard to guess what may be not working in the code you tried.

Stefan

flyingtex
Posts: 2
Joined: Sat Mar 31, 2018 2:30 pm
Thanks for the reply, the code I am using is below, it comes from the link in my original post.

\begin{document} \newcounter{y}\setcounter{y}{0} \begin{tikzpicture}    \foreach \lbl / \fn in {EPPLER 625/e625.dat,                            WORTMANN FX 2/fx2.dat,                            EPPLER 664 (EXTENDED)/e664ex.dat,                            CLARK Y/clarcy.dat,                            Eiffel 10 (Wright)/eiffel10.dat,                            FX 69-PR-281/fx69pr281.dat,                            NACA Munk M-4 airfoil/m4.dat}{        % Some profiles look better when using plot[smooth]        \draw[yshift=-\arabic{y}cm,scale=3] node[left=0.5cm] {\lbl}            plot file{data/\fn} -- cycle;        \stepcounter{y}    }\end{tikzpicture} \end{document}

Stefan Kottwitz
Posts: 9019
Joined: Mon Mar 10, 2008 9:44 pm
Ah, I see! The data is expected to be in the data/ subfolder, as it's written in the plot line.

It works with the files in the same directory if you change the line to

plot file{\fn} -- cycle;

Stefan