So I just started using bodegraph but no graph at all. Always from this pdf .  \documentclass{standalone} %    \usepackage[utf8]{inputenc} %%    %    \usepackage{pgf} %    \usepackage{tikz} \usepackage{bodegraph} % per i diagrammi di Bode  \begin{document}              \begin{tikzpicture}[xscale=7/4]             \begin{scope}[yscale=3/40]             \semilog{-2}{2}{-20}{20}             \BodeGraph[asymp lines,samples=100]{-2:2}             {\POAmpAsymp{6}{0.3}}             \BodeGraph{-2:2}{\POAmp{6}{0.3}}             \end{scope}             \begin{scope}[yshift=-2.5cm,yscale=3/90]             \semilog{-2}{2}{-90}{0}             \BodeGraph[asymp lines,samples=100, const plot]{-2:2}             {\POArgAsymp{6}{0.3}}             \BodeGraph{-2:2}{\POArg{6}{0.3}}             \end{scope}             \end{tikzpicture}            \end{document}   but it only show me the empty grid. As @Marijn suggested in a previous post, I tried only with the code for the bodegraph. Still the same...   And the result shoul look more o less like this:    Tanks in advance Fr3d
123874
I'm using pdfLatex (with --shell-escape option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: .  After correcting that error the code compiles smoothly but just displays the logarithmic grids, not the function. The gnuplot files are created in the right place, but the graphic doesn't come out in the PDF.  Code from :  \documentclass{article}  \usepackage{tikz} \usepackage{bodegraph}  \begin{document}  \begin{tikzpicture}[     gnuplot def/.append style={prefix={}}, % Fixed the issue (prefix was 'gnuplot/\jobname/' before) ] \begin{scope} \UnitedB \semilog{-1}{2}{-50}{60}  \BodeAmp{-1:1.35}{\POAmpAsymp{4}{2.0}+\IntAmp{1}}  \end{scope} \end{tikzpicture} \end{document}   Any clues?
118159
I am trying to plot a graph using tikz, but I can't seem to be able to highlight the areas between the curves. The result should look something like this:    This is the code I have so far:     \begin{center} \begin{tikzpicture}[scale=0.8]  \draw[-&gt;] (0,-0.5) -- (0,4.5) node[anchor=east] {}; \draw[-&gt;] (-0.5,0) -- (9,0) node[anchor=north] {}; \draw   (1,-0.2) node[anchor=north] {$a$}         (8,-0.2) node[anchor=north] {$b$}                ; \filldraw[fill=black!10](1,0)--(1,2)--(8,2)--(8,0); \draw [](1,3) parabola bend (2.5,1.5)(4.2,2.4);  \draw [](4.2,2.4) parabola bend (5.5,3)(8,0);  \draw[] (1,0)--(1,3); \end{tikzpicture} \end{center}   The end result I would like to achieve is to have C and D higlighted in orange, while A and B in a dark grey. Don't worry about the axes labels or else, I mostly need help with the shading.  Thanks in advance!!
123344
\documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.15}  \begin{document}     \newcommand{\xmax}{14}     \newcommand{\fmin}{(pi/3)}     \newcommand{\fmax}{(2*pi)} \begin{tikzpicture}[domain=0:\xmax, samples=500]  \draw[ultra thick, red] plot (\x, {sin(deg(exp(ln(\fmin)+\x/\xmax*(ln(\fmax)-ln(\fmin)))*\x))} );  \end{tikzpicture} \end{document}   I would understand if LaTeX repeat the code below this statement many times.
92305
Asymptote does give 3D arrows when drawing three dimensional figures (they even have shade!). Could we fake it with TikZ? Here's an example, manually written, with just one arrow worked:  \documentclass{scrartcl} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[-&gt;,scale=2]   \draw[&gt;={Triangle[width=3pt,length=5pt]}] (0,0,0) -- (1,0,0);   \draw[&gt;={Triangle[width=3pt,length=5pt]}] (0,0,0) -- (0,1,0);   \draw[&gt;={Circle[sep=-.9pt,width=3.08pt,length=2pt]Triangle[width=3pt,length=5pt]}] (0,0,0) -- (0,0,1); \end{tikzpicture} \end{document}     But that's (wrongly) manually calculated by trial and error (apart from the fact that it's not perfect, seeing how the other two axis —x and y— are oriented, it should have certain slant). It would be nice to have an interface like the other arrows  &gt;={3D[length=⟨real length⟩,width=⟨real width of the base⟩]}   Which would then calculate from those values (and, of course, also taking into account x=⟨x vect⟩,y=⟨y vect⟩,z=⟨z vect⟩)  Circle[sep=⟨value⟩,width=⟨value⟩,length=⟨value⟩,slant=⟨value⟩] Triangle[width=⟨value⟩,length=⟨value⟩] % And I'm not sure if `slant=⟨value⟩`                                        % is necessary in this Triangle case   Example  Using the code from the answer (thanks to Symbol1), for instance, this code (taking the idea from another question, link in the comments)  \begin{tikzpicture}[x={(0cm,1cm)},                     y={({cos(30)*1cm},{sin(30)*-1cm})},                     z={({cos(20)*1cm},{sin(20)*1cm})},                     thick,                     scale=3]   \pgfmathsetmacro{\ax}{.4}   \pgfmathsetmacro{\ay}{.6}   \pgfmathsetmacro{\az}{-.6}   \pgfmathsetmacro{\bx}{.4}   \pgfmathsetmacro{\by}{-.7}   \pgfmathsetmacro{\bz}{-.8}   \draw[densely dotted,thin] (\ax,\ay,\az) -- (\ax,0,\az);   \draw[densely dotted,thin] (\ax,\ay,\az) -- (0,\ay,\az);   \draw[densely dotted,thin] (\ax,0,0) -- (\ax,0,\az) -- (0,0,\az);   \draw[densely dotted,thin] (0,0,\az) -- (0,\ay,\az) -- (0,\ay,0);   \draw[densely dotted,thin] (\bx,\by,\bz) -- (\bx,0,\bz);   \draw[densely dotted,thin] (\bx,\by,\bz) -- (0,\by,\bz);   \draw[densely dotted,thin] (\bx,0,0) -- (\bx,0,\bz) -- (0,0,\bz);   \draw[densely dotted,thin] (0,0,\bz) -- (0,\by,\bz) -- (0,\by,0);   \draw[-{Cone3}] (0,0,0) -- (1,0,0) node[right] {$x$};   \draw[-{Cone3}] (0,0,0) -- (0,1,0) node[above right] {$y$};   \draw[-{Cone3}] (0,0,0) -- (0,0,1) node[below right] {$z$};   \draw[-{Cone3}] (0,0,0) -- (0,0,-1) node[above left] {$-z$};   \draw[thin] (0,0,0) -- (0,-.9,0);   \draw[-{Cone3}] (0,0,0) -- (\ax,\ay,\az) node[below left] {source};   \draw[-{Cone3}] (0,0,0) -- (\bx,\by,\bz) node[above right] {sim}; \end{tikzpicture}   gives this figure
105307
How do you include a Feynman diagram in a beamer presentation?  \documentclass{beamer} \usepackage{amsmath, amsthm, amssymb,latexsym} \usepackage{slashed} \usepackage{graphicx} \usepackage{pgfplots} \usepackage{bbm} \usepackage{epstopdf}  \usepackage{hyperref} \usepackage{tikz} \usepackage{tabularx} \usetikzlibrary{calc,decorations.markings} \usepackage{feynmp} \mode&lt;presentation&gt; { \usetheme{Warsaw}     }   \section{Theory} \subsection{The diagram} \frame {     \frametitle{the title etc}     \begin{figure}     \begin{fmffile}{Feynman1}     \fmfframe(-20,-30)(-20,-100){     \begin{fmfgraph*}(40,40)         \fmfleft{i1,i2,i3}         here is the feynmp code....\end{fmfgraph*}         }     \end{fmffile}     \end{figure} }  \end{document}   The Feynman diagram doesn't show up for me. What am I doing wrong, any suggestions?
53161
I'm trying to do something similar to this epsilon-delta graph I've found.  Specifically, I'd like to copy the placements and arrows, like the L+e and L-e coming out of L. Same thing with the x0 + d and x0-d coming out of the x0. Can someone help me with this? This is what I have so far.    \begin{tikzpicture} \begin{axis}[ ,         legend pos=north east,         axis x line=middle,         axis y line=middle,         x tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         y tick label style={/pgf/number format/fixed,                             /pgf/number format/fixed zerofill,                             /pgf/number format/precision=1},         grid = major,         width=8cm,           height=6cm,         grid style={dashed, gray!30},         xmin=0   ,     % start the diagram at this x-coordinate         xmax= 4,    % end   the diagram at this x-coordinate         ymin= 0,     % start the diagram at this y-coordinate         ymax= 11,   % end   the diagram at this y-coordinate %axis background/.style={fill=white},         xlabel=$x$,         ylabel=$f(x)$,         tick align=outside,         enlargelimits=false] % plot the stirling-formulae %\addplot[domain=0:200, red, ultra thick,samples=100] {K/(1 +    ((K-X0)/X0) * exp(r*x))    }; \addplot[domain=0:200, red, ultra thick,samples=100] {3*x-1 };  \addplot[line width=1pt, dashed, mark=none, black] coordinates {(0,8) (3,8)}; \addplot[line width=1pt, dashed, mark=none, black] coordinates {(3,0) (3,8)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(3.33,0) (3.333,9)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (2.666,0)}; \addplot[line width=1pt, dashed, mark=none, blue] coordinates {(2.666,7) (0,7)}; \addplot[line width=1pt, solid, mark=none, blue] coordinates {(3.333,9) (0,9)}; \addplot[holdot] coordinates{(60,8.66)};  % 1\addlegendentry{$f(x) = 10 \sin (x)$}  \end{axis}   \end{tikzpicture}   which gives
25020
I want to draw a voronoi diagram with pgfplots, but sadly I cannot get it the way it should look like. I used the Matlab command to get the x and y coordinates and saved them as a dat-file. In that file I stored the x coordinates in the first column and the y coordinates in the second column.      Does anyone have an idea, how it could work?  Minimal Example of the Code:  \documentclass{standalone}  \usepackage{amsmath,amsfonts,amssymb}  \usepackage{mathtools}  \usepackage[ngerman]{babel}  \usepackage[utf8]{inputenc}  \usepackage{graphicx}  \usepackage[svgnames]{xcolor}  \usepackage{pgfplots} \pgfplotsset{compat=newest}  \usepackage{tikz}  \usetikzlibrary{positioning,fit,calc,shapes,arrows,external,3d,patterns,spy}  \usepackage{filecontents}  \begin{document}  \begin{filecontents*}{data.dat}   -7.9265104e+00   3.6503989e-01    4.3133971e-01   9.4062409e-01   -7.9265104e+00   3.6503989e-01    6.3976919e-02   5.4947497e-01    6.3976919e-02   5.4947497e-01    3.0293735e-01   6.5037024e-01    3.6748619e-01   9.5786833e-02    6.3976919e-02   5.4947497e-01    3.0293735e-01   6.5037024e-01    4.0645496e-01   8.2958752e-01    4.9066479e-01   4.4410036e-01    3.0293735e-01   6.5037024e-01    3.6748619e-01   9.5786833e-02    4.9244296e-01   2.3488102e-01    4.9244296e-01   2.3488102e-01    4.9066479e-01   4.4410036e-01    4.9066479e-01   4.4410036e-01    7.3082954e-01   5.1825327e-01    1.8829507e+00   1.7053562e-01    4.9244296e-01   2.3488102e-01    4.3133971e-01   9.4062409e-01    8.7230061e-01   2.0371867e+00    4.0645496e-01   8.2958752e-01    4.3133971e-01   9.4062409e-01    6.6251849e-01   6.4842135e-01    4.0645496e-01   8.2958752e-01    6.9696115e-01   6.8938388e-01    8.7230061e-01   2.0371867e+00    7.3082954e-01   5.1825327e-01    6.6251849e-01   6.4842135e-01    1.8829507e+00   1.7053562e-01    7.3082954e-01   5.1825327e-01    6.6251849e-01   6.4842135e-01    6.9696115e-01   6.8938388e-01   -7.9265104e+00   3.6503989e-01   -1.7371176e+01   8.6111447e-02    3.6748619e-01   9.5786833e-02   -6.0998602e-02  -1.3709259e+00    1.8829507e+00   1.7053562e-01    4.4291165e+00  -2.9045575e-01    8.7230061e-01   2.0371867e+00    1.8287612e+00   4.5227847e+00    6.9696115e-01   6.8938388e-01    1.9370861e+00   1.3452721e+00 \end{filecontents*}  \begin{tikzpicture} \begin{axis}[x=3cm, y=3cm, z=0cm, view={0}{90}] \addplot3 [color=blue, samples y=0] file {voronoi.dat};  \end{axis} \end{tikzpicture}  \end{document}   Thanks for your help!!
22234
Consider the snippet below (compiled with PDFLatex TexLive 2015).  Why is DocumentViewer (3.18.2, Ubuntu 16) displaying a thin line (some zoom levels)? I have set the outer/inner sep  to 0. Is this a flaw in PDF-rendering or has this TiKZ snippet an issue?     \documentclass{book} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} \begin{tikzpicture} \node[inner sep=0mm, outer sep=0mm, fill=blue,minimum width=5cm,minimum height=5cm] (first) at (10,10) {}; \node[inner sep=0mm, outer sep=0mm, fill=blue,minimum width=5cm, fit=(first.north)(first.south),anchor=east] (second) at (first.west) {}; \end{tikzpicture} \end{document}
74599
I tried to export my Geogebra graphs into tikz-code. In General it works fine, but plot x^1/3 doesn't work:  \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{ccqqqq}{rgb}{0.8,0,0} \definecolor{qqttcc}{rgb}{0,0.2,0.8} \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75} \begin{tikzpicture}[line cap=round,line join=round,&gt;=triangle 45,x=1.0cm,y=1.0cm] \draw [color=cqcqcq,dash pattern=on 1pt off 1pt, xstep=1.0cm,ystep=1.0cm] (-4,-4) grid (4,4); \draw[-&gt;,color=black] (-4,0) -- (4,0); \foreach \x in {-4,-3,-2,-1,1,2,3} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize $\x$}; \draw[-&gt;,color=black] (0,-4) -- (0,4); \foreach \y in {-4,-3,-2,-1,1,2,3} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize $\y$}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize $0$}; \clip(-4,-4) rectangle (4,4); \draw[color=qqttcc, smooth,samples=100,domain=-4.0:4.0] plot(\x,{(\x)*(\x)*(\x)}); \draw[color=ccqqqq, smooth,samples=100,domain=-4.0:4.0] plot(\x,{((\x))^(1/(3))}); \draw [color=qqttcc](2.06,4.18) node[anchor=north west] {$f(x)=x^3$}; \draw [color=ccqqqq](2.06,1.18) node[anchor=north west] {$f(x)=\sqrt[3]{x}$}; \begin{scriptsize} \draw[color=qqttcc] (-1.74,-7.16) node {$f$}; \end{scriptsize} \end{tikzpicture} \end{document}      Error line 21: !Missing number, treated as zero.   So plot has problems with the negative x I suppose, but I don't know. Any help would be great! I googled it for nearly 1 hour - but no real answers.  As suggestet it rotated and mirrored the graph - works great!:  \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} \definecolor{ccqqqq}{rgb}{0.8,0,0} \definecolor{qqttcc}{rgb}{0,0.2,0.8} \definecolor{cqcqcq}{rgb}{0.75,0.75,0.75} \begin{tikzpicture}[line cap=round,line join=round,&gt;=triangle 45,x=1.0cm,y=1.0cm] \draw [color=cqcqcq,dash pattern=on 1pt off 1pt, xstep=1.0cm,ystep=1.0cm] (-4,-4) grid (4,4); \draw[-&gt;,color=black] (-4,0) -- (4,0); \foreach \x in {-4,-3,-2,-1,1,2,3} \draw[shift={(\x,0)},color=black] (0pt,2pt) -- (0pt,-2pt) node[below] {\footnotesize \x}; \draw[-&gt;,color=black] (0,-4) -- (0,4); \foreach \y in {-4,-3,-2,-1,1,2,3} \draw[shift={(0,\y)},color=black] (2pt,0pt) -- (-2pt,0pt) node[left] {\footnotesize \y}; \draw[color=black] (0pt,-10pt) node[right] {\footnotesize 0}; \clip(-4,-4) rectangle (4,4); \draw[color=qqttcc, smooth,samples=100,domain=-4.0:4.0] plot(\x,{(\x)*(\x)*(\x)}); \begin{scope}[yscale=-1,xscale=1] \draw[rotate=90, color=ccqqqq, smooth,samples=100,domain=-4.0:4.0] plot(\x,{(\x)*(\x)*(\x)}); \end{scope} \draw [color=qqttcc](2.06,4.00) node[anchor=north west] {$f(x)=x^3$}; \draw [color=ccqqqq](2.06,1.00) node[anchor=north west] {$f(x)=\sqrt[3]{x}$}; \begin{scriptsize} \draw[color=qqttcc] (-1.74,-7.16) node {f}; \end{scriptsize} \end{tikzpicture} \end{document}
57366
Trying to convert a coment into a complete answer for  I think that my solution there worked by chance and that MWijnand  found a wrong behavior in to path library when {x|y}scale has negative values.  Take a look at this example:  \documentclass[tikz,border=2mm]{standalone} \usepackage{bondgraph}           \usetikzlibrary[petri]   \begin{document} \begin{tikzpicture}[thin,&gt;=stealth, every place/.style={draw,thick,minimum size=6mm}]     \node[place] (pG) {$p_G$};     \node[place,right=3cm of pG] (pR) {$p_R$};     \draw[-&gt;] (pR) to [out=150, in=30] (pG);     \begin{scope}[yscale=-1]     \draw[-&gt;,blue] (pR) to [out=150, in=30] (pG);     \end{scope}      \begin{scope}[xscale=-1]     \draw[-&gt;,red] (pR) to [out=150, in=30] (pG);     \end{scope}      \begin{scope}[scale=-1]     \draw[-&gt;,green] (pR) to [out=150, in=30] (pG);     \end{scope}  \end{tikzpicture} \end{document}   and its strange result.    What I would expect was that pR.center was the paths origin and pG.center was the path end. The path would have a out angle affected by scale factor and the drawn path would start on corresponding intersection point over pR border. This is what happens with out angle as you can see around pR node.  But this doesn't happen with in angle (pG node). in angle fixes final anchor at  pG.30 and not at pG.center as expected. It also changes incidence angle for which scale factor is applied.   I think this is wrong and I'll fill a . If I'm wrong or you have a better solution, please let us know.
93508
I am trying to plot a graph of 100*e^(-x/5) in LaTeX but for some reason it will only plot up to x=5.  \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture} \begin{axis}[  xlabel=$\Delta V$, ylabel={$\% payload$}, xmin = 0, xmax = 10, ymin = 0, ymax = 100, samples = 65 ]  \addplot [black, smooth]{100*exp(-x/5)};  \end{axis} \end{tikzpicture} \end{figure} \end{document}   Is there any reason for this? How can I get around it?
88482
I need to plot several functions in PGFPlots, and each function I plot is actually the same main function minus the function evaluated at some point x. Instead of hard-coding the value of the function for each x, I was wondering if there's a way to define a function, and then evaluate such function at x. So far the code I have is:  \documentclass{article} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \usepackage{amsmath} \usepackage{mathptmx} % Use the Adobe Times Roman as the default text font together with math symbols from the Sym­bol, Chancery and Com­puter Modern fonts  \usepackage{tikz} % Required for drawing custom shapes \usepackage{pgfplots} \usetikzlibrary{plotmarks, calc, spy, pgfplots.polar, external} \usepgflibrary{shapes.geometric}  \begin{document}  % add and edit tikz figure here:  \begin{tikzpicture}[scale=1]     \begin{axis}  \addplot + [mark=none, domain=0:2, samples=70] { (x^0.65 + sin(1.5*pi*x)))/2}; \addplot + [mark=none, domain=0:4, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (2^0.65 + sin(1.5*pi*2))))/2}; \addplot + [mark=none, domain=2:6, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (4^0.65 + sin(1.5*pi*4))))/2}; \addplot + [mark=none, domain=4:8, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (6^0.65 + sin(1.5*pi*6))))/2}; \addplot + [mark=none, domain=6:10, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (8^0.65 + sin(1.5*pi*8))))/2}; \addplot + [mark=none, domain=8:12, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (10^0.65 + sin(1.5*pi*10)))/2}; \addplot + [mark=none, domain=10:13, samples=70] { (x^0.65 + sin(1.5*pi*x)) - (12^0.65 + sin(1.5*pi*12))))/2};      \end{axis} \end{tikzpicture} \end{document}
81107
\documentclass[12pt]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document}     \begin{axis}[hide axis,red,width=16cm,height=8cm,thick]          \addplot[domain=20:300,samples=800, colormap={}{ color(2cm)=(red);    },   ultra thick, point meta=x*x,mesh]{sin(150*pow(x,1/2))};  %You could also ask a new question. Or you could just flip the picture.      \begin{tikzpicture}[xscale=-1]          \begin{axis}[hide axis,red,width=16cm,height=4cm,thick]             \addplot[domain=20:300,samples=800, colormap={}{ color(2cm)=(red); color(16cm)=(blue); },             ultra thick, point meta=x*x,mesh]                 {sin(pow(x,2)/15)};         \end{axis}      \end{tikzpicture} \end{document}   This code work well for me. But I would obtain just one more thing: - How can I obtain a more hight wave the more waves are tracked? I would increase also distance between waves
109781
I have a graph that consists of x and y from Z/11. Is it possible to programmatically draw the lines that have a slope of 2?  Like from (0,0) to (5,10) and (6,12) would become (6,1) because of modulo 11. Just like the graph below.    For that graph I use the following code. But I have to manually calculate the start and end points.      \begin{tikzpicture}     \coordinate (Origin)   at (0,0);     \coordinate (XAxisMin) at (0,0);     \coordinate (XAxisMax) at (11,0);     \coordinate (YAxisMin) at (0,0);     \coordinate (YAxisMax) at (0,11);      \draw [thick, gray,-latex] (XAxisMin) -- (XAxisMax);% Draw x axis     \draw [thick, gray,-latex] (YAxisMin) -- (YAxisMax);% Draw y axis      \foreach \x in {0,1,...,10}{% Two indices running over each       \foreach \y in {0,1,...,10}{% node on the grid we have drawn          \node[draw,circle,inner sep=1pt,fill] at (\x,\y) {};             % Places a dot at those points       }     }      \draw [thin, blue,-latex] (Origin) -- (5,10);       \draw [thin, blue,-latex] (6,1) -- (10,9); \end{tikzpicture}
89393
The following code is compiled by pgfplots to graph an exponential function and its inverse. I have some questions about the code, and I would like to modify some of the features of the graphs.  How is pgfplots instructed to draw grid lines 5 units apart? Why is the graph of the exponential function between the vertical lines x=-5 and x=3.8, I guess?  Why is the graph of the line y=x between the vertical lines x=-5 and x=5?  Why does the label for the logarithmic function interfere with the graph of the logarithmic function?  I would like the numbers on the axes to be in white nodes - so that the grid lines are not drawn over them.  The grid lines are drawn too high and too far to the right. I would like either the grid lines to be drawn a bit shorter or the axes to be drawn a bit longer.  The domain of the exponential function (that is graphed) should be from -6 to 4, and the domain of the linear function should be from -6 to 16.  \documentclass[10pt]{amsart} \usepackage{tikz} \usetikzlibrary{calc,angles,positioning,intersections,quotes,decorations.markings} \usepackage{tkz-euclide} \usetkzobj{all} \usepackage{pgfplots} \pgfplotsset{compat=1.11}    \begin{document} \begin{tikzpicture} \begin{axis}[grid=both,           xmax=18,ymax=17,           axis lines=middle,           restrict y to domain=-7:17,           enlargelimits] \addplot[dashed]{x} node[fill=white, above, right]{$y=x$}; \addplot[green]  {pow(2,x)} node[fill=white, above, right]{$y=2^x$}; \addplot[blue,domain=1/2^6:16,samples=100]  {log2(x)} node[fill=white, below] {$y=\log_2(x)$}; \end{axis} \end{tikzpicture}  \end{document}
85475
I'm trying to generate a gif from a tikz picture, using tikz's external library. Ultimately, my plan is to   Convert a picture to gif write a node style that converts the nodes' coordinates to pixel offsets in a map file use them together on a web page.   If somebody has done this before, I'm glad to get a pointer.  However, I have adapted the example from the tikz documentation which uses convert in a system call. The only difference to the original example is that I don't add code to include external and that I changed the desired output format to gif:  \documentclass{standalone}  \usepackage{tikz} \usetikzlibrary{external}  \tikzset{   gif export/.style={     external/system call/.add=     {}     {; convert -density 300 -transparent white "\image.pdf" "\image.gif" },     %     /pgf/images/external info,   } } \tikzexternalize \tikzset{gif export}  \begin{document}   \begin{tikzpicture}     \draw (0,0) node[draw,minimum width=1in] {TestNode};   \end{tikzpicture} \end{document}    The resulting main.pdf is empty, the externalization library creates an empty main-figure0.pdf and main-figure0.dpth an additional file called } is created, but I don't know what I can do with it.   I have the impression that the closing } after "\image.gif" is causing problems. When I change that line to end with  "\image.gif"},   (no space between gif and }), the resulting converted file is called main-figure0.gif} and also empty.  but I have no idea how I can fix this.
37681
This code works correctly:  \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document}  \begin{tikzpicture}   \tikzset{     every picture/.prefix style={       execute at begin picture=\shorthandoff{;}     }   }   \def\names{{"1", "2"}}   \foreach \i in {0,1} {%     \ifnum\i=0\relax       \node (\i) [draw] {\pgfmathparse{\names[\i]}\pgfmathresult};     \else       \pgfmathparse{int(\i-1)}       \node (\i) [draw,right= 1cm of \pgfmathresult]             {\pgfmathparse{\names[\i]}\pgfmathresult};       \draw[dotted] ($(\pgfmathresult.south east) !.5! (\i.south west)$)             -- +(0,1cm);   \fi } \end{tikzpicture} \end{document}   But when I add  \usepackage[utf8]{inputenc} \usepackage[german]{babel}   to the preamble, it starts giving an error:  ! Argument of \language@active@arg" has an extra }. &lt;inserted text&gt;                  \par  l.25 }   the same for russian. It is somehow related to the quotes in the array:   \def\names{{"1", "2"}}   I tried the tricks, shown here for the french, but they don't work.