I have created a graph but i'm not able to add the label in the node, below my code  \begin{tikzpicture} \SetGraphUnit{4} \SetVertexArt \renewcommand*{\VertexInnerSep}{8pt} \renewcommand*{\VertexBallColor}{blue!50} \Vertices{circle}{1,2,3,4,5,6,7,8} \AddVertexColor{blue}{1,2,3,4,5,6,7,8} \SetUpEdge[style={-&gt;,ultra thick},color=blue!50] \Edge(1)(2) \Edge(1)(3) \Edge(1)(4) \Edge(1)(5) \Edge(1)(6) \Edge(2)(3) \Edge(2)(4) \Edge(2)(5) \Edge(2)(6) \Edge(3)(4) \Edge(3)(5) \Edge(3)(6) \Edge(4)(5) \Edge(4)(6) \Edge(5)(6) \Edge(2)(6) \Edge(2)(3) \Edge(2)(1) \Edge(2)(8) \Edge(6)(3) \Edge(6)(1) \Edge(6)(8) \Edge(3)(1) \Edge(3)(8) \Edge(1)(8) \Edge(7)(8) \Edge(5)(1) \Edge(5)(6) \Edge(5)(2) \Edge(5)(7) \Edge(1)(6) \Edge(1)(2) \Edge(1)(7) \Edge(6)(2) \Edge(6)(7) \Edge(2)(7) \end{tikzpicture}   Can you help me? Thanks in advance
122425
What is the correct way to label and captionize a tkizpicture inside a tabular environment? (Since figures are not allowed inside a tabular)  Excerpt from my .tex:  \begin{tabular}{l r}  &amp;    \begin{tikzpicture}    ... % I want to label this tikzpicutre and give it a nice caption    \end{tikzpicture} \end{tabular}   Outside the tabular I would have done it like this:     \begin{figure}    \begin{tikzpicture}    ...     \end{tikzpicture}    \label{fig:...}\caption{...}    \end{figure}   Basically I want to create a page that looks like this:  ---------------------------- |Text Text    TKIZ    TKIZ | |TextText     TKIZ    TKIZ | | Text Text   Figure X: ...| |                          | |This text is under the    | |table and references above| |TKIZ Figure with \ref{..} | ----------------------------
13797
Is it possible to tell pgfplots to put tick labels between the tick marks instead of at the tick marks?  MWE:  \documentclass[margin=5pt]{standalone}  \usepackage{tikz} \usepackage{pgfplots}  \begin{document}      \begin{tikzpicture}          \begin{axis}[             width=5in,             height=3in,             axis lines=middle,             scaled ticks=false,             xtick=\empty,             xmin=0,             xmax=3,             extra x ticks={0,1,2,3},             extra x tick labels={low,high,med},         ]          \addplot [mark=*,draw] coordinates {(0.5,2) (1.5,4) (2.5,3)};          \end{axis}     \end{tikzpicture}  \end{document}   Result:    I can do it manually by adding  xticklabel style = {xshift=1.9cm,align=center},     but this seems unsatisfying, unreliable, and requires too much trial and error.
1962
I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to define this ellipsis as a node, but the dots appear horizontally and not as shown in figure, i.e., it would be great if the ellipsis are three adjacent points on  the circumference of the circle where other nodes rest.  The same problem arises even when I have a complete graph. Can someone help me out with this? Thanks!     Code so far:  \begin{tikzpicture}[-&gt;,&gt;=stealth', shorten&gt;=1pt, auto, node distance=2.8cm, semithick]  \tikzstyle{peer}=[draw,circle,violet,bottom color=\lav, top color= white, text=violet, minimum width=8pt]  \tikzstyle{superpeer}=[draw, circle, burntorange, left color=\oran, text=violet, minimum width=25pt]   \node[superpeer] (A) {$0$};   \node[peer]         (B)  at ($ (A) + (20:4) $) {$1$};   \node[peer]         (C)  at ($ (A) + (-52:4) $) {$2$};   \node[peer]         (D)   at ($ (A) + (-124:4) $){$3$};   \node[draw=none] (F)  at ($ (A) + (-176:4) $){$\cdots$};     \node[peer] (E) at ($ (A) + (92:4) $) {$N$};    \path (A) edge [color=blue, sloped] node[]{$\lambda_{01}, \mu_{01}$} (B);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{02}, \mu_{02}$} (C);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{03}, \mu_{03}$}(D);   \path (A) edge [color=blue, sloped, below] node[] {$\lambda_{0N}, \mu_{0N}$} (E);   \path (B) edge [color=blue, sloped] node[] {$\lambda_{10}, \mu_{10}$}(A);   \path (C) edge [color=blue, sloped] node[] {$\lambda_{20}, \mu_{20}$}(A);   \path (D) edge [color=blue, sloped] node[] {$\lambda_{30}, \mu_{30}$}(A);   \path (E) edge [color=blue, sloped, above] node[] {$\lambda_{N0}, \mu_{N0}$}(A); \end{tikzpicture}
114002
Following is the code for drawing the graph of x+y=4. Now i am thinking to draw the graph of x+y=100 for that what are the necessary changes in the given codes.  \documentclass[12pt,a4paper]{article} \usepackage[a4paper,bindingoffset=0.2in,left=0.7in,right=0.7in,top=0.7in,bottom=0.7in,footskip=.25in]{geometry} \usepackage[centertags]{amsmath} \usepackage{latexsym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsthm} \usepackage{newlfont} \usepackage{enumerate} \usepackage{makeidx} \usepackage{tikz} \usetikzlibrary{backgrounds,intersections} \begin{document} \begin{tikzpicture} \draw[thick,latex-latex] (-2,0) -- (5,0)node[right]{$x$};     \draw[thick,latex-latex] (0,-2) -- (0,5)node[above]{$y$};     \node at (-0.3,-0.3) {O};     \foreach \x in {-1,1,2,3,4}{         \node[fill,circle,inner sep=1.5pt,label=below:$\x$] at (\x,0) {};         \node[fill,circle,inner sep=1.5pt,label=left:$\x$] at (0,\x) {};     }     \draw[thick,stealth-stealth, shorten &gt;= -2cm, shorten &lt;= -2cm,name path =b ] (0,4) -- (4,0)     node[pos=0.65,above,sloped] {$ $};     \foreach \x/\y/\name in {0/4/B,4/0/A}{         \node[fill,circle,inner sep=2.5pt,label={[inner sep=0pt]above right:\name($\x, \y$)}] at (\x,\y) {};     } \end{tikzpicture} \end{document}
100147
I would like to make a venn diagram with Tikz, but instead of labeling A, B or C each circle I'd like to give some other names. However, having read the manual I've changed their labels but each new word doesn't fit in each shape.  My code so far is:  \documentclass[12pt,a4paper]{article} \usepackage[english,greek]{babel} \usepackage{ucs}  \usepackage[utf8x]{inputenc} \usepackage{venndiagram} \begin{document} \begin{venndiagram3sets}[labelA={υλικά}, labelB={καταναλωτικά}, labelC={διαρκή}, labelABC={ΑΑΑΒΒΒΨΨΦΦΔ}] \fillACapBCapC \end{venndiagram3sets} \end{document}   My diagram I'd like to be like:   How can I change how big a circle can be?
49858
I'm very new to the TikZ environment. I'm trying to replace the "4" in the following graph by a Greek letter (ideally a \tau^{*}). Any idea ? Thanks in advance  \begin{document} \begin{tikzpicture}[     declare function={             gamma(\x)= 0.25*\x*\x*exp(-0.5*\x);     } ]  \begin{axis}[   no markers, domain=1:13, samples=200,   axis lines*=left, xlabel=$\tau$, ylabel=$V(\tau)$,   every axis y label/.style={at=(current axis.above origin),anchor=south},   every axis x label/.style={at=(current axis.right of origin),anchor=west},   xtick={4}, ytick=\empty,   enlargelimits=false, clip=false, axis on top,   grid = major,       xmin=0, ymin=0, ] \addplot [very thick,cyan] {gamma(x)};  \end{axis} \end{tikzpicture}  \end{document}
48666
I need to connect the rectangles by labeled arrows (rights) in this case:        \documentclass[tikz,border=2mm]{standalone}      \usetikzlibrary{arrows, chains}       \begin{document}          \begin{tikzpicture}[        node distance = 0mm,          start chain = going right,           box/.style = {draw, semithick, minimum size=1cm,                 outer sep = 3mm, on chain,}                     ]      \foreach \i  in {{\Huge S_0}, S_1, S_2, S_3, S_4, S_5, S_6, S_7, S_8}         \node[box,label=below:] {$\i$};       \end{tikzpicture}      \end{document}   I need also label arrows with \lambda_n where n is number from 0 to 7. Labels should be placed above the arrows.
67364
I know how to draw different shapes using tikz, like this:  \documentclass{minimal} \usepackage{tikz} \begin{document}  \begin{tikzpicture} \draw (0,0) ellipse (1 and 1.5)       (0,2.5) circle (1)       (2.5,0) circle (1.5); \end{tikzpicture}  \end{document}     However, I would like to put a number of different shapes together inside a node, and I couldn't yet find a simple way to do that. I will make a little figure to include in a large diagram which is already made of several nodes.  If this is not possible, or not easy, then how do I include a JPG or EPS file in a node?  Thank you!
43994
I have created a simple node-edge graph in which I would like to have the texts on each edge aligned to the direction of the edge.  \documentclass[class=minimal,border=0pt]{standalone} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} \begin{document}  \begin{tikzpicture}[-&gt;,&gt;=stealth',shorten &gt;=1pt,auto,node distance=2.8cm,                     semithick]   \tikzstyle{every state}=[fill=red,draw=none,text=white]    \node[state]         (D)                     {$D$};   \node[state]         (C) [below right of=D]  {$C$};   \node[state]         (B) [above right of=D]  {$B$};   \node[state]         (A) [below right of=B]  {$A$};    \path (D) edge              node {tdc} (C)                     (B) edge              node {tbc} (C)         (C) edge              node {tca} (A); \end{tikzpicture}  \end{document}   For example, I would like the text tbc rotates -90 degrees automatically to be aligned to the direction of the edge connects the node B to the node C. Is that possible?
76362
I created following figure with a script as pasted below:    \documentclass[tikz,border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning, shapes.multipart, arrows, shadows, backgrounds, fit}  \tikzset{   bluebox/.style={     draw,     rectangle,     minimum height=4.5cm,     fill=blue!50!white,     align=center,     inner sep=2ex   },   whitebox/.style={     draw,     rectangle,     minimum height=4.5cm,     fill=white,     align=center,     inner sep=2ex   },   item/.style={     draw,     inner sep=1ex,     fill=white    },   matrix/.style={     draw,     fill=white,     text centered,     minimum height=1em,     drop shadow   } }  \begin{document}  \begin{tikzpicture}[font=\sffamily]      % Stage 1     \node[whitebox, label={Labela}] (Stage1) {\rotatebox{90}{Something}};      % Stage 2     \node[whitebox, right=of Stage1, label=Labelpgq] (Stage2) {\rotatebox{90}{\footnotesize{Something}}};      % Stage 3     \node[draw, shape=rectangle split, rectangle split parts=2, fill=white, right=of Stage2, label=Options A] (OptionsA) {         \nodepart{one} A         \nodepart{two} B};      \node[draw, shape=rectangle split, rectangle split parts=2, fill=white, below=of OptionsA, label=Options B] (OptionsB) {         \nodepart{one} A         \nodepart{two} B};      \begin{scope}[on background layer]         \node[bluebox, fit=(OptionsA) (OptionsB), label=Labelg] (Stage3) {};     \end{scope}      \draw[dashed] (Stage1) -- (Stage2);     \draw[dashed] (Stage2) -- (Stage3); \end{tikzpicture}  \end{document}   Here are the issues I want to solve:   When labels contain a "p", "g" or "q", the text has a larger distance. It looks like the padding is given by the lowest pixel (bug?). For some reason, the blue box is shifted. It should be on level with the others. I experimented by applying "right=of Stage2" to the blue box, but without success.   I'm thankful for help here.
91856
I'm using TikZ for the first time to draw a simple Kripke model, and I'm using the child notation to produce new nodes. How can I turn my edges into arrows?  \begin{tikzpicture}   \node [circle,draw] (q0) {}   child {node [circle,draw] (q1) {$p$}     child {node [circle,draw] (q4) {$p$}       child {node [circle,draw] (q7) {$p\land q$}}       child {node [circle,draw] (q8) {$p\land q$}}       child {node (q9) {} edge from parent[-&gt;, dashed]}}     child {node [circle,draw] (q5) {$q$}}     child {node (q6) {} edge from parent[dashed]}}   child {node [circle,draw] (q2) {$p$}}   child {node (q3) {} edge from parent[dashed]}; \end{tikzpicture}   I know how to change the color or thickness of all edges by passing an option at the beginning of \begin{tikzpicture}, but I can't turn them into arrows.   Also, while we're at it, is there a way to label these edges? Or am I left with simply using node notation for all my nodes?  Thanks for all your help, Piotr
104509
The following are my code. I used the axis environment for better axis style. I try to add nodes at g^W=g^L, which is a point on the y-axis, but the axis environment seemes to cut off anything outside the axis. What should I do?  \documentclass[11pt]{article} \usepackage{pgfplots} \begin{document}  \begin{figure} \centering \begin{tikzpicture}[scale = 1.2]      \begin{axis}[xmin=0,xmax=10,ymin=0,ymax=7,         axis lines = left, axis line style = thick,  unit vector ratio=1 1 1, xtick={0,8},         xticklabels = {$p^w=0$, $p^w=1$},         ytick={1.5,3,5.5},         yticklabels = {$g^L-\beta$,$g^W=g^L$,$g^w+\alpha$}]         \addplot[mark=none, dashed] coordinates {(8, 0) (8, 7)};          \addplot[domain=0:8, dashed] {1.5};         \addplot[domain=0:8, dashed] {3};          \node[black,right] at (axis cs:8,1.5){\small{$W=0$}};         \node at (axis cs:8,1.5) [circle, scale=0.3, draw=black!80,fill=black!80] {};         \node at (axis cs:8,3) [circle, scale=0.3, draw=black!80,fill=black!80] {};         \node at (0,3.5) [circle, scale=0.3, draw=black!80,fill=black!80] {};       \end{axis} \end{tikzpicture} \caption{A caption.} \end{figure}   \end{document}
115016
I am attempting to draw the following graph in tikz.   My attempt so far has gotten me to here.   \documentclass[border=3mm]{standalone} \usepackage[dvipsnames]{xcolor} \usepackage{pgfplots} \pgfplotsset{width=8cm,compat=newest} \usetikzlibrary{arrows}    \begin{document}      \begin{tikzpicture}     \begin{axis}[  xtick = \empty,    ytick = \empty, xlabel = {$t$}, x label style = {at={(1,0)},anchor=west}, ylabel = {$q$}, y label style = {at={(0,1)},rotate=-90,anchor=south}, axis lines=left, enlargelimits=0.2,                 ]               \addplot[mark=none, blue] coordinates {(1.85,1.1)(0.0,3)};  \addplot[color=red,smooth,thick,-] coordinates  {     (0.3,2.7) (1.3,1) (2.5,2) (4,0.65)  (6,0.8)};       \end{axis}     \end{tikzpicture} \end{document}   The output is;     This has taken me most of the day to draw. I can't understand how to write the coordinates to get the shape of the tangent curve I want. I am wondering is there a knack to this and can anyone offer me advice on how to shape things correctly. There must be a better way than I am currently going about things!
21267
I have used the following code:      \begin{figure}[h]   \begin{tikzpicture}          \draw[-&gt;] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[-&gt;] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2);         \draw [dashed] (0,1.5) -- (4,4);   \end{tikzpicture}   \caption{No Interaction} \label{fig:M1}    \begin{tikzpicture}         \draw[-&gt;] (-0.5,0) -- (4,0) node[right] {$x$};         \draw[-&gt;] (0,-0.5) -- (0,4) node[above] {$y$};         \draw (0,0.5) -- (4,2.5);         \draw [dashed] (0,1.5) -- (4,3.5);   \end{tikzpicture}.  \caption{Interaction} \label{fig:M2}   \end{figure}     to insert two figures, however it places them one on top of the other and I would like them next to each other but labelled independently, is this possible?
113508
I've been creating a flow chart using the template I found here:    Please see the code below:  \documentclass{article} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} % Define block styles \tikzstyle{decision} = [diamond, draw, fill=blue!20,      text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt] \tikzstyle{block} = [rectangle, draw, fill=blue!20,      text width=5em, text centered, rounded corners, minimum height=4em] \tikzstyle{line} = [draw, -latex'] \tikzstyle{cloud} = [draw, ellipse,fill=red!20, node distance=3cm,     minimum height=2em] \begin{document} \begin{tikzpicture}[node distance = 2cm, auto]     % Place nodes          \node [cloud] (a) {a};         \node [block, right of = a, node distance =5cm] (b) {b};         \node [decision, below of = b] (c) {c};         \node [block, below of = c, node distance = 3cm] (d) {d};         \node [decision, below of = d, node distance = 3.2cm] (e) {e};         \node [block, right of = e, node distance = 3.2cm] (f) {f};         \node [decision, below of = e] (g) {g};         \node [block, left of = g, node distance = 3.2cm] (h) {h};         \node [decision, below of = g, node distance = 3.5cm] (i) {i};         \node [block, left of = i, node distance = 3.2cm] (j) {j};         \node [block, right of = i, node distance = 3.5cm] (k) {k};      % Draw edges     \path [line] (a) -- (b);     \path [line] (b) -- (b);     \path [line] (b) -- node [near start] {yes} (d);     \path [line] (d) -- (e);     \path [line] (e) -- node [near start] {no} (f);     \path [line] (f) |- (b);     \path [line] (e) -- node [near start] {yes} (g);     \path [line] (g) -- node [near start] {no} (h);     \path [line] (h) |- (e);     \path [line] (g) -- node [near start] {yes} (i);     \path [line] (i) -- node [near start] {yes} (j);     \path [line] (j) -- (h);     \path [line] (i) -- node [near start] {no} (k);     \path [line] (k) -| (h); \end{tikzpicture} \end{document}   How can I create an arrow from k to h that doesn't intersect any of the other boxes or arrows?
74537
I have found a strange behavior in TikZ. When using the \draw ... to ... syntax and trying to place nodes along the line with the node[...]{...} syntax, the nodes do not turn up at the expected location.  \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}   \draw(0,0) to[out=60,in=120] (1,0) node[midway]{x}; \end{tikzpicture} \end{document}     How is this done properly?
106031
I'm doing a school project and I need to create a graph like this one. I created the graph but dont know how the add the vertical dashed red lines...        \begin{tikzpicture}[&gt;=latex]     \begin{axis}[             axis lines = middle,             xlabel = $t$,             ylabel = {$x(t)$},             xtick={-50,-40,...,50},             ytick={-2,-1,...,2},             xmin=-50.5,             xmax=50.5,             ymin=-2.5,             ymax=2.5,             width=155mm,             height=70mm,         ]         \addplot[             scatter,             domain=-50:50,             samples=120,             color=blue,         ]         {sin(180*x/12)+cos(180*x/8)};         \addplot[             only marks,             domain=-50:50,             samples=120,             color=red         ]         {sin(180*x/12)+cos(180*x/8)};     \end{axis} \end{tikzpicture}   This is the code that I have created and the graph.