# Tag Info

16

Multi-dominance "trees" are not really trees, but graphs, and the standard tree drawing packages are really not designed to handle them. Depending on the complexity of the tree, it's possible to draw these trees, however, but it requires some manual intervention. I would use one of the TikZ based tree drawing packages for this rather than qtree. The two ...

10

To add a label next to an edge, use the syntax edge node {some text}. See for example the second tutorial in TikZ's manual, section 3.11 Adding text next to lines. Should you want to place the node on the other side of the line, use edge node[swap] {some text}. Note also that \tikzstyle is considered deprecated, you should use \tikzset or add the styles to ...

7

Use the L= option for \Vertex to have a different label: \documentclass{article} \usepackage{tkz-berge} \usepackage{lipsum} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=0.75,transform shape] \tikzstyle{LabelStyle}=[fill=white,sloped] \Vertex[x=0,y=0]{A} \Vertex[x=-2,y=-1]{B} \Vertex[x=2,y=-1,L=B]{C} \tikzstyle{EdgeStyle}=[...

7

Sorry I'm guilty. I have not taken sufficient precautions. The problem comes from : \newcommand*{\Edge}[1][]{\@edge[#1]}% because tikz-qtree defines \@edge too :( A better way was to use \tkz@edge instead of \@edge. In the next version with pgfkeys, I'll be more careful. Actually you can save the next file with the name : patch-tkz-graph.tex %%%%%%...

7

With \SetUpEdge you could adapt the answers given in the question you mention. For example: \pgfarrowsdeclare{biggertip}{biggertip}{% \setlength{\arrowsize}{1pt} \addtolength{\arrowsize}{.5\pgflinewidth} \pgfarrowsrightextend{0} \pgfarrowsleftextend{-5\arrowsize} }{% \setlength{\arrowsize}{1pt} \addtolength{\arrowsize}{.5\pgflinewidth} ...

7

Instead of explicitly defining a new counter \j you can use evaluate. Of course, this isn't much of a saving as you still need to define \j inside the evaluate statment, but it does save a loop: \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \usetikzlibrary{graphs.standard} \begin{document} \begin{tikzpicture}[every node/.style={draw,...

7

As the fit library has been mentioned a few times, here's a suggestion using that. It requires nodes, so all the black dots are created using \node. Note that by changing the node distance you can modify how stretched out the figure should be, in the y and x direction. The cross is drawn using a different technique, and relative to the nodes around it, so ...

6

Using the calc library you can say something like \draw[dashed] ([yshift=60pt]$(s)!0.5!(v1)$ ) -- ([yshift=-60pt]$(s)!0.5!(v2)$ ); A complete example: \documentclass{article} \usepackage{tkz-graph} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} [scale=.8,auto=left,every node/.style={circle,fill=blue!20}] \tikzset{vertex/.style = {...

6

Here is one attempt using tikz: The code: \documentclass[border=5mm,tikz]{standalone} \usepackage{mwe} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw(0,0)--(2,0)--(0,1)--(2,1)--(0,0); \draw(0,3)--(2,3); \draw[very thin, double distance=2pt](0.6,2.2)--(1.4,1.6); \draw[very thin, double distance=2pt](0.6,1.6)--(1.4,...

6

The \Edge macro is only syntactic sugar for basic TikZ which draw a path and places a node on it. Nodes on paths can receive the pos key to indicate at what fraction the node is to be placed. To set node option in \Edge you have to wrap them in the style option, i.e. \Edge[label=0.5,style={pos=.3}](a)(d) to place the node at one third of the path ...

6

The first line of tkz-berge is \RequirePackage{tkz-graph,tkz-arith} so it starts off from where tkz-graph finishes, so obviously any document using tkz-graph could use tkz-berge and be using exactly the same package just indirectly loaded. then tkz-berge defines additional things not in the base packages.

5

This can (if desired) be done within a single \graph command: \documentclass[tikz,border=5]{standalone} \usetikzlibrary{graphs} \usetikzlibrary{graphs.standard} \begin{document} \begin{tikzpicture}[every node/.style={draw,circle,very thick}] \graph [clockwise] { subgraph C_n [n=5,name=A, radius=2cm]; subgraph I_n [n=5,name=B, radius=1cm]; \...

5


5

One way is to draw your incoming lines using arc: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.geometric,arrows,positioning,fit,calc,} \begin{document} \begin{center} \begin{tikzpicture} \draw [fill=blue, draw=none] (0,0) circle (0.02cm) node (FieldCenter) {}; %\node (fieldcenterlabel) [above=0.08 of FieldCenter]{\tiny Field ...

5


5


5

Solution with vanilla tikz \documentclass[border = 5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[ node style/.style = {fill = black, minimum size = 7pt, circle}, edge style/.style = {black, thick}, ] % base \foreach \i in {0,...,4} { \node[node style] (A\i) at ({2 * cos(72 * \i)}, {2 * ...

4

You can add labels to \Edges by adding e.g. label={Stuff} in the \Edge options. By default the label is placed on top of the arrow, you can shift it by changing the style of the label with e.g. labelstyle={above left}, which moves the label up and to the left. To get a more automatic label placement you can use the auto key, mentioned by Qrrbrbirlbel in a ...

4

As, to be honest, I didn't feel like reading the tkz-berge manual, I threw together this example. The pgfonlayer is for drawing the edges in the background, thus behind the labels: \documentclass{article} \usepackage{tikz} \pgfdeclarelayer{background} \pgfsetlayers{background,main} \newcommand{\Vertex}[2]% pos, name { \node[circle,draw,minimum width=0.5cm,...

4

Sorry I need to translate the documentation of tkz-graph. First hte main idea of this package is to provide useful and simple macros and styles to the users. Finally you have two style to know : VertexStyle and EdgeStyle. When you want to draw a graph, you can choice a "general" style with \GraphInit[vstyle=Classic]. This is useful if all your graphs have ...

4

Load the patterns library, and add pattern=<style> to the definition of VertexStyle, where <style> include, for example, horizontal lines, vertical lines, north east lines, north west lines, etc. Code \documentclass[12pt,a4paper]{article} \usepackage{tkz-graph} \usetikzlibrary{patterns} \begin{document} \begin{figure} \begin{tikzpicture} \...

4

You can add NoLabel to the vertices that shouldn't have a label. For those you can also remove Math,LPos=.., as those don't have any effect when there are no labels. \documentclass{article} \usepackage{tkz-graph} \begin{document} \begin{tikzpicture}[scale=2] \GraphInit[vstyle=Classic] \SetUpVertex[FillColor=black, MinSize=8pt] \...

4

Just with the right node labels and font … \documentclass[border=5pt,tikz]{standalone} \usetikzlibrary{backgrounds} \usepackage{mathpazo} \definecolor{iceberg}{rgb}{0.44, 0.65, 0.82} \tikzset{ every node/.style={ fill=iceberg!40,draw,circle,minimum width=.5cm,font=\Large } } \begin{document} \begin{tikzpicture} \foreach \x in {0,...

4


3

Not sure if there is a simpler way, but some calculations lead to the code below. Note that 2.12 = 1.5*sqrt(2), and 1.06 = 1.5/sqrt(2). \documentclass{standalone} \usepackage{tkz-graph} \begin{document} \begin{tikzpicture}[scale=0.6, every node/.style={scale=0.6}] \SetGraphUnit{1.5} \GraphInit[vstyle=Normal] \SetVertexMath ...

Only top voted, non community-wiki answers of a minimum length are eligible