I am trying to draw a nice multi-dominance. I find the gap between the two lines above "V" is ugly. Is there any way to move the lower end of the line in red square so that the two lines meet at one point right north of "V"?   Thank you very much.  \documentclass{article} \usepackage{forest}  \begin{document} \begin{forest} where n children=0{tier=CV}{}     [\sg     [C, tier=CV]     [\mo[, tier=CV, no edge][V, name=V, tier=CV]]     [\mo, name=mo[, no edge, tier=CV]]]     \draw (mo)--(V); \end{forest}  \end{document}
111045
I'm trying to draw a specific tree, with two parents node linked to the same child. The problem is that one of the parent is outside the main tree.  Here's the code I have for the moment:  \documentclass{article} \usepackage{tikz-qtree,tikz-qtree-compat} %\usepackage{gb4e} \usepackage{forest}  \begin{document}  %\begin{exe} \begin{forest} qtree edges/.style={for tree= parent anchor=north, child anchor=south}    [A, grow=north        [C, name=C, grow'=north            [D, grow=north ]            [E, name=t5, grow=north ]        ]        [B, grow=north ]    ]    \hspace{0.8cm}    [$F$, name=F, grow=north ]    %\draw (F.north) -- (C.south); \end{forest} %\end{exe}  \end{document}   I'd like the nodes F and C to be connected. I don't know why, but if I delete the dollar signs, node F doesn't even appear on my document.  Another thing is that I want the forest environment to be embedded in an example environment, but this doesn't work either.  Thanks in advance for your help!
99880
I've used "//" and "\" to create this "W", and have made them into outlines, as I'm trying to give the different layers a colour, as well as having a white space where the lines touch and I would like to remove the top of the second "\".   I'm struggling with the white space at the moment and now I've added a stroke, the fill has decreased. Is there another way I could do this?   I've also tried to use my pen tool to remove the top of the "\" but when using "Path Finder" I cannot find an option to "Minus Forward". I'm a newbie so any advice would be lovely :)
58921
multicol or memoir would be preferred. \columnseprule, I understand, is responsible for drawing a solid vertical line between columns. Is there a parsimonious way to achieve the following?  -----pretext--- ###### : ###### ###### : ###### ###### : ###### ###### : ###### ###### : ###### ###### : ###### -----posttext--
61082
I have  \begin{tikzpicture}[-&gt;,auto,node distance=3cm,   thick,main node/.style={draw,font=\bfseries}]   \node[main node] (111) at (0,1) {$X_{1,1}^{(1)}$};   \node[main node] (121) at (0,2) {$X_{1,2}^{(1)}$};   \node[main node] (1n1) at (0,4) {$X_{1,n}^{(1)}$};   \node[main node] (211) at (0,6) {$X_{2,1}^{(1)}$};   \node[main node] (221) at (0,7) {$X_{2,2}^{(1)}$};   \node[main node] (2n1) at (0,9) {$X_{2,n}^{(1)}$};   \node[main node] (n11) at (0,11) {$X_{n,1}^{(1)}$};   \node[main node] (n21) at (0,12) {$X_{n,2}^{(1)}$};   \node[main node] (nn1) at (0,14) {$X_{n,n}^{(1)}$};   \node[main node] (112) at (2.5,1) {$X_{1,1}^{(2)}$};   \node[main node] (122) at (2.5,2) {$X_{1,2}^{(2)}$};   \node[main node] (1n2) at (2.5,4) {$X_{1,n}^{(2)}$};   \node[main node] (212) at (2.5,6) {$X_{2,1}^{(2)}$};   \node[main node] (222) at (2.5,7) {$X_{2,2}^{(2)}$};   \node[main node] (2n2) at (2.5,9) {$X_{2,n}^{(2)}$};   \node[main node] (n12) at (2.5,11) {$X_{n,1}^{(2)}$};   \node[main node] (n22) at (2.5,12) {$X_{n,2}^{(2)}$};   \node[main node] (nn2) at (2.5,14) {$X_{n,n}^{(2)}$};   \node[main node] (11k) at (6,1) {$X_{1,1}^{(k)}$};   \node[main node] (12k) at (6,2) {$X_{1,2}^{(k)}$};   \node[main node] (1nk) at (6,4) {$X_{1,n}^{(k)}$};   \node[main node] (21k) at (6,6) {$X_{2,1}^{(k)}$};   \node[main node] (22k) at (6,7) {$X_{2,2}^{(k)}$};   \node[main node] (2nk) at (6,9) {$X_{2,n}^{(k)}$};   \node[main node] (n1k) at (6,11) {$X_{n,1}^{(k)}$};   \node[main node] (n2k) at (6,12) {$X_{n,2}^{(k)}$};   \node[main node] (nnk) at (6,14) {$X_{n,n}^{(k)}$};   \node[main node] (11n2) at (9.5,1) {$X_{1,1}^{(n-2)}$};   \node[main node] (12n2) at (9.5,2) {$X_{1,2}^{(n-2)}$};   \node[main node] (1nn2) at (9.5,4) {$X_{1,n}^{(n-2)}$};   \node[main node] (21n2) at (9.5,6) {$X_{2,1}^{(n-2)}$};   \node[main node] (22n2) at (9.5,7) {$X_{2,2}^{(n-2)}$};   \node[main node] (2nn2) at (9.5,9) {$X_{2,n}^{(n-2)}$};   \node[main node] (n1n2) at (9.5,11) {$X_{n,1}^{(n-2)}$};   \node[main node] (n2n2) at (9.5,12) {$X_{n,2}^{(n-2)}$};   \node[main node] (nnn2) at (9.5,14) {$X_{n,n}^{(n-2)}$};   \node[main node] (11n1) at (12,1) {$X_{1,1}^{(n-1)}$};   \node[main node] (12n1) at (12,2) {$X_{1,2}^{(n-1)}$};   \node[main node] (1nn1) at (12,4) {$X_{1,n}^{(n-1)}$};   \node[main node] (21n1) at (12,6) {$X_{2,1}^{(n-1)}$};   \node[main node] (22n1) at (12,7) {$X_{2,2}^{(n-1)}$};   \node[main node] (2nn1) at (12,9) {$X_{2,n}^{(n-1)}$};   \node[main node] (n1n1) at (12,11) {$X_{n,1}^{(n-1)}$};   \node[main node] (n2n1) at (12,12) {$X_{n,2}^{(n-1)}$};   \node[main node] (nnn1) at (12,14) {$X_{n,n}^{(n-1)}$};   \path     (111) edge (112)         edge (122)         edge (1n2)     (121) edge (112)         edge (122)         edge (1n2)     (1n1) edge (112)         edge (122)         edge (1n2)     (121) edge[--,dashed] (1n1); \end{tikzpicture}   I just want simple lines, no arrows. How to manage with edge to achieve that? Thanks
12149
How can I make these types of lines?
82504
I would like to draw a picture that reflects some file structure. Below code works almost as expected. I need to adjust the connections between nodes so they don't start from the center of the bottom of the parent node but from near the left bottom corner.  How can I do this?  Code:  \documentclass[11pt, oneside]{article} \usepackage{tikz}                           % super package for complex and awesome drawing  \begin{document}  \usetikzlibrary{trees} \tikzstyle{every node}=[draw=black,thick,anchor=west,inner sep=2pt,minimum size=1pt] \tikzstyle{selected}=[draw=cyan,fill=cyan!30] \begin{tikzpicture}[   grow via three points={one child at (0.5,-0.7) and   two children at (0.5,-0.7) and (0.5,-1.4)},      edge from parent path={(\tikzparentnode.south) |- (\tikzchildnode.west)}]   \node {MainFolder-\{version\}}     child { node [label={[xshift=6.0cm, yshift=-0.58cm, color=gray] Documentation for developers}] {References and Documentation/}         child { node [draw=none] {main.html} }         child { node {reference/}             child { node [draw=none] {...}}         }         child [missing] {}     }     child [missing] {}     child [missing] {}     child [missing] {}     child { node {release/}         child { node [draw=none] {libAwesome.a} }         child { node [draw=none] {libAwesome.dylib} }     }; \end{tikzpicture} \tikzstyle{every node}=[] % resets borders of tables \tikzstyle{selected}=[] % resets selected  \end{document}     Ouput:    Ideal:    Any help is appreciated.
10118
When I overlap 2 objects like this    resulting freestyle lines are like this    But I want render overlapped edge lines like this(red lines below picture)    What's the easiest way to accomplish my purpose?(A lot of objects in my work are made in that way so resulting render image misses many overlapped edges. I tried to remake some object to reveal overlapped edges but I realized that remaking all objects is too hard to me.)
89759
I'm trying to perfectly overlap two images, one complementary of the other, but apperas a white stripe in the conjunction of the path, all points are perfectly aligned how can I fix?
97414
Problem  I am trying to draw a tree diagram with forest package. I have multiline children including the \texttt command and a one-line child with normal text. This results in a misalignment among the children, as you can see from the picture below.    I would like all children to be top-aligned. How can I achieve that?  MWE:  % Class \documentclass[10pt]{article}  % Forest package \usepackage[edges]{forest}  %Defining the styles used in trees \tikzset{standard/.style={align=center,text width=3cm,rounded corners=2pt},     wide/.style={align=center,text width=4.2cm,rounded corners=2pt},     narrow/.style={align=center,text width=2cm,rounded corners=2pt} }  % Document \begin{document}     \begin{figure}[hbt!]         \centering         \begin{forest}             for tree={%                 %               grow'=0,                 l sep=0.5cm,                 s sep=0.1cm,                 minimum height=0.8cm,                 minimum width=2cm,                 draw%             },             forked edges,             [\texttt{Parent} object, standard                 [\texttt{AStandardChild} object, standard]                 [\texttt{VeryVeryVeryLongChild} object, wide]                 [Other, narrow]             ]         \end{forest}     \end{figure} \end{document}   Attempted solution  I tried to use some additional for tree options inspired by . In this attempt I need to force the line break (\\) of the long tree elements because that would not happen automatically. The misalignment is reduced but it is still present.    MWE:  % Class \documentclass[10pt]{article}  % Forest package \usepackage[edges]{forest}  %Defining the styles used in trees \tikzset{standard/.style={align=center,text width=3cm,rounded corners=2pt},     wide/.style={align=center,text width=4.2cm,rounded corners=2pt},     narrow/.style={align=center,text width=2cm,rounded corners=2pt} }  % Document \begin{document}     \begin{figure}[hbt!]         \centering         \begin{forest}             for tree={%                 %               grow'=0,                 l sep=0.5cm,                 s sep=0.1cm,                 minimum height=0.8cm,                 minimum width=2cm,                 parent anchor=south, child anchor=north, align=center, base=top,                 draw%             },             forked edges,             [\texttt{Parent} object, standard                 [\texttt{AStandardChild}\\object, standard]                 [\texttt{VeryVeryVeryLongChild}\\object, wide]                 [Other, narrow]             ]         \end{forest}     \end{figure} \end{document}
101536
I created a timeline with TikZ. The problem is, that there is a little gap between the ends of the braces that end at the same node.    And here is my code:   \begin{tikzpicture}[y=1cm, x=1cm, thick, font=\footnotesize]      % axis   \draw[line width=1.2pt, -&gt;, &gt;=latex'](0,0) -- coordinate (x axis) (10,0);         % time points \draw (3,-4pt) node(t_k){} --      (3,4pt) node[anchor=south] {$t_{k}$}; \draw (5,-4pt) node(t_k_opt) {} --      (5,4pt) node[anchor=south] {};       \draw (7,-4pt) node(t_k_opt_impl) {} --      (7,4pt) node[anchor=south] {$t_{k}+\triangle^{\text{opt}}+\triangle^{\text{impl}}$};   % curly braces \draw[decorate,decoration={brace,amplitude=3pt,mirror}]      (3,-2.5) node(t_k_unten){} --      (5,-2.5) node(t_k_opt_unten){};  \node at (4,-3){$\triangle^{\text{opt}}$}; \draw[decorate,decoration={brace,amplitude=3pt,mirror}]      (t_k_opt_unten) --      (7,-2.5) node(t_k_opt_impl_unten){};  \node at (6,-3){$\triangle^{\text{impl}}$};  % vertical dotted lines \draw[dotted] (t_k)--(t_k_unten); \draw[dotted] (t_k_opt)--(t_k_opt_unten); \draw[dotted] (t_k_opt_impl)--(t_k_opt_impl_unten);  \end{tikzpicture}   I'd be glad, if someone could help!
77091
I'm trying to get a nice tree without the overlaps, can anyone help me to improve my code?  \documentclass{standalone} \usepackage{amssymb} \usepackage{amsmath} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{dsfont} \usepackage{tikz} \usetikzlibrary{shapes} \usetikzlibrary{graphs}  \begin{document}       \begin{tikzpicture}[baseline,level/.style={level distance=20mm, sibling distance =35mm/#1},scale=1]         \node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                 child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         }                     }                 }                    child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                     child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                         child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                         child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                             child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             child{ node [ellipse split, draw] {$s_1&lt;s_2$\nodepart{lower}\tiny $(s_1,s_2,s_3,s_4)$}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                                 child{ node [rectangle, draw] {$(s_1,s_2,s_3,s_4)$}}                             }                         }                     }                 }             };     \end{tikzpicture} \end{document}
90145
Here is my MS Paint job on a real bad attempt at what I'm trying to achieve:    I have access to Photoshop and Illustrator CS6, and I want to be able to draw a thick line (that is not straight) and have a pattern within the line show arrowheads within the line to indicate the direction of the line.
52993
This question is kind of the opposite of . Is it posisble to clip a path but let the line caps lokk as the path would end at the clipping area.  basic example  \documentclass[border=10mm]{standalone}  \usepackage{tikz}  \tikzset{line/.style={blue,line width=10mm}}  \begin{document} \begin{tikzpicture}     \draw (0,0) grid (5,5);     \clip (0,0) rectangle (5,5);     \draw [line] (0,1)  -- (5,4); \end{tikzpicture} \end{document}   With the output    but the desired output is    I want to clip a plot in this way and I cannot specify it in a way that the domain equals the clip box, so I must use a clip box, but I don’t want to loose the regular line caps …  more realistic example  Case 1: I want to set the yrange of the two plots according to the y axis, but gnuplot writes all data points to the table file, even if they are out of range (they are marked with an o in a third column, whereas i indicates that the point is in range). It is possible to set xrange in a way that the plots start at the same y value but this is a lot of try and error, since the xrange mus be found individual for every plot.  Case 2: I got a curve that is define by some points an the first and the last of them must be roots, i.e. y = 0. The problem is that the second root lies out of the axes bounds … I guess I could use the (coord)!pos!(coord) syntax but this is try and error again to let this curve end at the same x value as the plots.  \documentclass[border=10mm]{standalone}  \usepackage{tikz}  \tikzset{line/.style={blue,line width=10mm}}  \begin{document} \begin{tikzpicture}     \def\yzoom{50}% needed to prevent overflow     % Axes     \draw [&lt;-&gt;] (0,0.07*\yzoom) |- (10.5,0);     % Clip     \clip (0,0) rectangle (10,0.07*\yzoom); % CASE I     % Plots     \draw [line width=2pt,line cap=round]         plot [smooth,raw gnuplot, id=\jobname-plot] function {%             set xrange [1.4:10];             set yrange [0:0.06*\yzoom];             set samples 100;             f(x) = \yzoom*(0.26/(x-1) - 1/(x**2));             plot f(x);         };     \draw [line width=2pt,line cap=round]         plot [smooth,raw gnuplot, id=\jobname-plot] function {%             set xrange [1:10];             set yrange [0:0.06*\yzoom];             set samples 100;             f(x) = \yzoom*(0.28/(x-1) - 1/(x**2));             plot f(x);         }; % CASE II     % Curve, defined by three points.     % P1 and P3 must have y=0     \draw plot coordinates {(2,0) (5,2) (18,0)}; \end{tikzpicture} \end{document}   Unclipped output:    Clipped output but the round caps are missing …
81453
OK, I've plotted these graphs but am unable to stretch the second one, so that they both have the same values on the vertical lines drawn from one to another. I've tried to set domain=0:2200 for both but it doesn't work.
111016
\fbox{ \begin{tikzpicture}[scale=1,auto=center]   \node[circle,fill=gray!20] (n1) at (2,8) {Node A};   \node[circle,fill=gray!20] (n2) at (8,8) {Node B};   \foreach \from/\to in {n1/n2}   \draw (\from) -- (\to) node[draw=none,fill=none,font=\scriptsize,midway,below] {text below}; \end{tikzpicture} }   The example show how to put text below the line in middle, but how to write the text below and above the line in middle (simultaneously) between two nodes? ...
9658
Is it possible to define in TikZ a new decoration or something like that, such that it is possible to write something like:  \draw[dim={text,above}] (A) -- (B); \draw[dim={text,below}] (C) -- (D);   or even better  \draw (A) dim[text,above] (B); \draw (C) dim[text,below] (C);   to get something like this:    It's important that the text is sloped.  If possible I would prefer the second syntax, because then I could easily combine such path's:  \draw (A) dim[text,above] (B) -- (C) -- (D) dim[text] (E) dim[text,below] (F) -- circle;
74965
I have drawn the following tree in TikZ. What I don't like about it is   that I have to manually adjust the sibling distance for each level; and the syntax is too cumbersome.   It has been suggested to me by @percusse and @AlanMunn that using tikz-qtree and/or forest may be a more efficient way to produce the same result. But I don't have experience in using either package.   It would be nice if someone can reproduce my example using either of these packages, so that I can have quick example to learn from instead of reading a 150-page manual trying to find an answer.    \documentclass{standalone} \usepackage{tikz} \usepackage{amsmath}  \begin{document}  \tikzset{   % Two node styles for game trees: solid and hollow   solid node/.style={circle,draw,inner sep=1.2,fill=black},   hollow node/.style={circle,draw,inner sep=1.2}, }  % macro for entering payoffs \newcommand\payoff[1]{   $\begin{pmatrix} #1 \end{pmatrix}$ }  \begin{tikzpicture}[font=\footnotesize]   \tikzset{     level 1/.style={level distance=15mm,sibling distance=65mm},     level 2/.style={level distance=15mm,sibling distance=30mm},     level 3/.style={level distance=15mm,sibling distance=15mm},     level 4/.style={level distance=15mm,sibling distance=10mm},   }    \node[hollow node,label=above:{Nature}]{}     child{node[solid node,label=left:{P1}]{}       child{node(l1)[solid node]{}         child{node[solid node,label=below:{\payoff{1\\-1}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}         edge from parent node[left]{U}       }       child{node(l2)[solid node]{}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{2\\-2}}]{}edge from parent node[right]{R}}         edge from parent node[right]{D}       }       edge from parent node[left,xshift=-10]{A}     }     child{node[solid node,label=right:{P1}]{}       child{node(r1)[solid node]{}         child{node[solid node,label=below:{\payoff{-2\\2}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[right]{R}}         edge from parent node[left]{U}       }       child{node(r2)[solid node]{}         child{node[solid node,label=below:{\payoff{0\\0}}]{}edge from parent node[left]{L}}         child{node[solid node,label=below:{\payoff{-1\\1}}]{}edge from parent node[right]{R}}         edge from parent node[right]{D}       }       edge from parent node[right,xshift=10]{B}     }   ;    \draw[dashed](l1)--(l2)--node[midway,above]{P2}(r1)--(r2); \end{tikzpicture}  \end{document}