Howto:Build graduate dials with LaTeX: Difference between revisions

Jump to navigation Jump to search
m
no edit summary
mNo edit summary
Line 17: Line 17:
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% the document itself
% the document itself
\documentclass{standalone}
\documentclass[tikz,margin=0pt]{standalone}
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
Line 129: Line 129:
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% the document itself
% the document itself
\documentclass{standalone}
\documentclass[tikz,margin=0pt]{standalone}
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
Line 187: Line 187:
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% \documentclass{standalone} is particular class that non have a size, but the size is define from
% the document itself
% the document itself
\documentclass{standalone}
\documentclass[tikz,margin=0pt]{standalone}
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% \usepackage{tikz} is the package that contain the graphics command as \draw etc ...
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
% The package is describe in this document: https://www.sharelatex.com/learn/TikZ_package
Line 198: Line 198:
% https://www.ctan.org/tex-archive/fonts/ocr-b-outline
% https://www.ctan.org/tex-archive/fonts/ocr-b-outline
\usepackage{ocr}
\usepackage{ocr}
\tikzset{font={\fontsize{12pt}{10}\selectfont}}
% Defines the font size to use, the first number defines the font size,
% Defines the font size to use, the first number defines the font size,
% the second number the dimensional family from which the font is taken.
% the second number the dimensional family from which the font is taken.
Line 208: Line 209:
         \begin{tikzpicture}
         \begin{tikzpicture}
             %2° Rays
             %2° Rays
             \foreach \a in {0, 5,...,355}
             \foreach \a in {0, 2,...,358}
                 \draw[ultra thick] (\a:5.6) -- (\a:6);     
                 \draw[ultra thick] (\a:5.6) -- (\a:6);     
             %10° Rays
             %10° Rays
             \foreach \a in {0, 30,...,359}
             \foreach \a in {0, 10,...,350}
                 \draw[ultra thick] (\a:5.2) -- (\a:6);
                 \draw[ultra thick] (\a:5.2) -- (\a:6);
             %Angle labels  
             %Angle labels  
             \foreach \a in {30, 60, 120, 150, 210, 240, 300, 330}
             \foreach \a in {30, 60, 120, 150, 210, 240, 300, 330}
                 \pgfmathtruncatemacro\result{(360 - \a)/10}
                 \pgfmathtruncatemacro\result{(360 - \a)/10}
                 \draw (\a + 90: 4.5) node[rotate=\a] {\LARGE\result};
                 \draw (\a + 90: 4.8) node {\result};
             % Wind rose labels
             % Wind rose labels
             \draw (90: 4.5) node[rotate=0] {\Huge{N}};
             \draw (90: 4.8) node{\LARGE{N}};
             \draw (360: 4.5) node[rotate=270] {\Huge{E}};
             \draw (360: 4.8) node{\LARGE{E}};
             \draw (270: 4.5) node[rotate=180] {\Huge{S}};
             \draw (270: 4.8) node{\LARGE{S}};
             \draw (180: 4.5) node[rotate=90] {\Huge{W}};
             \draw (180: 4.8) node{\LARGE{W}};
             \foreach \b in {-40,-38,...,40}
             % Insert the label
                \edef\c{-90 - \b * 1.38}
            \draw (90: 1.5) node{\LARGE{WIND UNIT}};
                \draw[ultra thick] (\c:6.5) -- (\c:6.8);
            \foreach \b in {-40,-30,...,40}
                \edef\c{-90 - \b * 1.38}
                \draw[ultra thick] (\c:6.5) -- (\c:7);
            \foreach \b in {-40,-30,...,40}
                \edef\c{-90 - \b * 1.38}
                \pgfmathtruncatemacro\result{abs(\b)}
                \draw (\c:6.2) node[rotate=\c+90] {\footnotesize\result};
         \end{tikzpicture}
         \end{tikzpicture}
     }
     }
412

edits

Navigation menu