The Stack Overflow podcast is back! Listen to an interview with our new CEO.
10

This is just a nested loop. \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture} \foreach \X in {1,...,5} {\foreach \Y in {1,2,3} {\draw (\X,\Y) circle[radius=4mm] (\X,\Y) -- ++(180-45*\X:0.4); }} \end{tikzpicture} \end{document} But one can do better using some existing post. \documentclass[tikz,border=3.14mm]{standalone} ...


6

Welcome! The upper part accidentally worked, but you really need to get rid of the ++: they mean you add something to the origin of the path, but you really want to draw to these nodes. In the case of the upper half, the node labeled top,left sits at (0,0) so it accidentally gave the desired output. In any case, you only need to drop those ++ to arrive at \...


5

With tikz-3dplot you can adjust the view angle. \documentclass[tikz,border=3mm]{standalone} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{70}{0} \begin{tikzpicture}[scale=2] \foreach \X in {1,...,6} {\begin{scope}[tdplot_main_coords] \draw[dashed] (\X,0,-1.5) coordinate (b\X) -- (\X,0,0) coordinate (c\X); \begin{scope}[canvas is xy plane ...


5

There are easier ways to draw trees, but if you wish to stick to TikZ's verbosity, you can override the style with another. \documentclass[border=9pt]{standalone} \usepackage[]{tikz} \begin{document} \tikzset{ breakarrow/.style={->, dashed}, myarrow/.style={solid, -}, varnode/.style = {shape=rectangle, rounded corners, draw, align=center, ...


5

With the help of \pgfplotsset{colormap=...} you can define your own color map colors. \pgfplotsset{colormap={CM}{rgb255(1)=(4,50,4) color(5)=(yellow)}} will for example give a dark green to yellow gradient: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat = newest} \usepgfplotslibrary{colormaps} \pgfplotsset{colormap={...


3

\documentclass[tikz,margin=3mm]{standalone} \usetikzlibrary{arrows.meta, quotes} \begin{document} \begin{tikzpicture}[ MN/.style = {%Main Node circle, draw, minimum size=15mm, font=\footnotesize, inner sep = 0pt, outer sep=0pt}, every edge/.style = {draw, -Stealth} ] \...


3

Your problem is already solved by answer of @Schrödinger's cat, i.e.: symbol ++ means that you use relative coordinates, which are described in subsection 13.4.1 Specifying Relative Coordinates, page 143 in TikZ and PGF manual (version 3.1.4b). Using relative coordinates means that in case \draw (1,1) -- ++ (2,2); the line is drawn between absolute ...


3

Looks like the automatic positioning chooses to place the labels above left/below left instead of just above/below. Specify the position with e.g. "f_1"above and it works fine. If you also specify the start anchor and end anchor the arrows look perhaps better. (There might be better ways of doing this, I don't know tikz-cd that well.) \documentclass[border=...


3

It is straightforward but very tedious to draw this. This is to give you a start. The single triangular shape is stored in a pic called kite and a group of three of those in a pic called tkite. You can move and rotate the full group and colorize and rotate the single kites with pgf keys. The same thing applies to circle, which are the circular shapes. Here ...


2

\documentclass[tikz]{standalone} \usepackage[edges]{forest} \usetikzlibrary{arrows.meta} \usetikzlibrary{calc} \forestset{ declare boolean={my folder}{0}, folder/.append style={ for descendants=my folder}, folders down/.style={ for tree={grow'=0, folder}, tier=level me, }, } \begin{document} \begin{forest} forked edges, /tikz/>/.tip={...


2

Just for fun: using TikZ modulo arithmetic. Helps to avoid mislabeling (if I understand the logic, of course). \documentclass[tikz,border=3mm]{standalone} \begin{document} \begin{tikzpicture}[circ/.style={circle,draw,minimum size=4em}] \node[circ] (n0) {$f_1,f_2,f_3$}; \foreach \X [evaluate=\X as \NextX using {int(1+mod(\X,3))}, evaluate=\X as \PrevX ...


1

I do not know if I understand the question correctly, but if I do, you want to synchronize the sizes of the circles without guessing hard-coded radii. This can be done with eqparbox, and one can make this a style, equal size. So if you want to have two nodes of the same sizes, just add equal size to the node options. If you want to have groups of nodes ...


1

Like this? I only a little bit simplified your code -- use only one node for check mark and for number 1 in circle: \documentclass[tikz,border=2mm]{standalone} \usepackage{amsmath,amssymb} \usetikzlibrary{arrows,matrix,quotes} \begin{document} \begin{tikzpicture} \tikzset{% square matrix/.style={matrix of nodes, column sep=-\...


1

You need to load arrows.meta to make use of flex, and then the correct syntax is Stealth[flex] rather than stealth[flex]. However, I would bend the arrows along the paths. \documentclass[a4paper,12pt]{article} \usepackage{tikz} \usetikzlibrary{decorations.markings,bending,arrows.meta} \tikzset{% https://tex.stackexchange.com/a/430239 arc arrow/.style ...


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