30

Use pics. You can define a pic tower list which draws the circles. Getting all the x coordinates and circles is then as simple as saying \pic{tower list={0,1,1,0,2,0,1,0,3,1,0,2,1,1,0}}; where the integers indicate how many circles should be drawn at 0, 1, 2.... \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture}[font=\...


29

\documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{chains, positioning } \usepackage{amsmath} \begin{document} \begin{tikzpicture}[ node distance = 1pt and 0pt, start chain = going right, block/.style = {rectangle, minimum width=1.5em, outer sep=0pt, on chain}, dot/.style = {circle, fill, node ...


19

As detailed in the https://github.com/u-fischer/luaotfload/issues/6, pgf_lookup_and_require wrongly uses resolvers.findfile to find the graph drawing libraries when used with ConTeXt. This bug surfaced when luaotfload was upgraded which now also the resolvers.findfile function. The problem is clearly with PGF here, because resolvers.findfile is to find ...


17

You don't really need TiKZ for this. Just marvosym, booktabs and stackengine: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{marvosym} \usepackage[svgnames, table]{xcolor} \newcommand\MVTen{\MVOne\MVZero} \newcommand\MVxi{\MVOne\MVOne} \newcommand\MVxii{\MVOne\MVTwo} \newcommand\MVxiii{\MVOne\MVThree} \newcommand\...


14

The code illustrates the use of polar coordinates which make it easy to construct symmetrical graphs. \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}% [vertex/.style={circle,draw,fill=black,minimum width=1.5mm,inner sep=0mm}] \newcommand\coce{0.5}% distance of triangle corners from ...


11

You can use a decoration. The main problem is the mark at the end of path (see Tikz: decoration at path end disappears at high bend angles). \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning, decorations.markings} \begin{document} \begin{tikzpicture} [very thick, decoration={markings, mark=between positions ...


11

From this question indexed letters inside circles there is a possibility also with tikz-cd. \documentclass[12pt]{article} \usepackage{tikz-cd,amssymb,mathtools} \usepackage{tikz} \newcommand\encircle[1]{% \tikz[baseline=(X.base)] \node (X) [draw, shape=circle, inner sep=0] {\strut #1};} \begin{document} \begin{tikzcd}[column sep=huge] \encircle{A} \...


10

Answer to Edited Question This is straightforward to do with forest. I assume that with your original code, you would need to name the nodes you want to circle and then draw a circle around them, though I'm not sure. With forest, you can automatically collect nodes with particular content into a register which you then use as the basis for the circle. As ...


9

I think you're trying to use graphdrawing when you actually should be using the normal graph instead. The graphdrawing library is for when you have stuff that follows a structural logic but the graph itself is not of a fixed nature. Quoting Till Tantau: You do not specify where, exactly, the nodes and edges should be. This is something you leave to a ...


9

You have more possibilities how to start with drawing your illustration. For example with pure TikZ: \documentclass[tikz, margin=3mm]{standalone} \begin{document} \begin{tikzpicture} \draw[->] (-1,0) -- ++ (4,0); \draw[thick, red] plot[domain=0:2*pi, samples=30] (\x/pi,{sin(\x r)}); \draw[densely dashed] (0,0) -- + (0,1.5) (2,0) -- + (0,1....


9

A simple solution with the psmatrix environment (from pst-node): \documentclass[border=5pt]{standalone} \usepackage{pst-node, pst-arrow} \usepackage{auto-pst-pdf} \begin{document} \psset{arrows=-v, veearrowlinewidth=0.5pt, veearrowlength=4pt, veearrowangle=35, linewidth=0.6pt, nodesep=2pt, labelsep=1pt, rowsep=1cm} \sffamily\...


8

I know this is not exactly what you want, but it might at least get you started. I added some resources to the code. Unfortunately, pattern density cannot be modified easily in TikZ. I would create a clipping path and draw a bunch of dots, but that might still look too perfect. Code \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,patterns,...


8

I see that you're using spring layout but it seems to me that the resulting graphic is more like distributed charges (electric charges) making me think that the spring electrical layout is more suiting. Just by using it you already see the difference in the final graph. Furthermore, to fine tune the graphic you can use the nudge=<coordinate> key (or ...


8

I post my answer. I hope this is helpful for you. Unfortunately I did not put the opacity. I'm sorry. \documentclass{article} \usepackage{tikz} \usepackage{mathtools} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture}[line cap=round, line join=round, >=Triangle] \clip(-2.19,-2.49) rectangle (2.66,2.58); \draw [shift={(0,0)}, lightgray, ...


7

Not overly happy with these, I think they could be simplified, but anyway, one way with clipping and layers... \documentclass[tikz,border=5]{standalone} \usetikzlibrary{backgrounds,arrows.meta} \begin{document} \begin{tikzpicture}[x=(10:4cm),y=(90:4cm),z=(225:4cm),>=Triangle] \coordinate (O) at (0,0,0); \draw [->] (O) -- (1,0,0) node [at end, right] {...


7

\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x/\y/\z in {0/0/-1,4/0/-1,2/4/-1,2/1/1} { \draw[ultra thick] (\x,\y) -- (\x+1,\y) -- (\x+0.5,\y+\z)--cycle; \draw[fill] (\x,\y) circle(1.5mm); \draw[fill] (\x+1,\y) circle(1.5mm); \draw[fill] (\x+0.5,\y+\z) circle(1.5mm); } \draw[ultra thick] (0,0)--(2,4) (3,4)-...


7

Here is an option using basic tikz code, and written in a structured way. RESULT: MWE: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning,arrows.meta} \begin{document} \begin{tikzpicture}[ %Environment Styles cell/.style={ circle, %node shape is a circle draw, %shape is drawn ...


6

Do-it-for-me style, without trying to be clever: \documentclass[tikz,margin=.5cm]{standalone} \usetikzlibrary{arrows.meta} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture}[scale=.5] \tikzstyle{bluelines}=[blue] \tikzstyle{redlines}=[red] \tikzstyle{purplelines}=[purple!50!black] \tikzstyle{number}=[black] ...


6

In the second part to this answer a custom coordinate system was given. This can be used to plot the grids (albeit a bit slowly). The other requirements (not done here) involve re-orienting the x, y, and z vectors, and changing the content and positioning of the labels. \documentclass[tikz,border=5]{standalone} \usetikzlibrary{arrows} \tikzset{declare ...


6

Instead every node={align=left} in tikzpicture parameters you should say: every node/.style={anchor=west} Result: Upgrade: To my taste, regarding to you edited questions, the following solution looks nicer: \graph [tree layout, grow'=right, fresh nodes, level distance=0.5in, sibling distance=0.1in ] { 4 -&...


6

Here is the automaton drawn with the automata library. I have labeled all edges with letters to make it easier to identify them in the code, but of course you can also use something like node{\texttt{+}} or node{$+$}. \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{automata,positioning} \begin{document} \begin{tikzpicture}% [>=...


6

Modifying the code from How to draw a graph in LaTeX?, one can obtain this MWE: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} [nodePath/.style={circle,fill=yellow!40}] \node[nodePath] (n1) at (0,4) {1} edge [loop above] (); \node[nodePath] (n2) at (3,3) {2}; \node[nodePath] (n3) at (4,0) {3} edge [loop ...


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