# Tag Info

12

Here's a version in plain Metapost featuring a useful idiom to find all the intersection points between two paths. This is wrapped up in luamplib so compile it with lualatex (or work out how to adapt it for plain mpost). \documentclass[border=5mm]{standalone} \usepackage{luatex85} \usepackage{luamplib} \begin{document} \mplibtextextlabel{enable} \begin{...

11

Since you asked is there a more elegant way to do this, here is a starting point to define the nodes using foreach. \documentclass[margin=2mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[% node distance=1.5cm, inner sep=2pt, ] \foreach [count=\i] \l in {-1,,+1}{ \node (X\i) at (4*\i,0) {$X_{t\l}$}; \node[right ...

11

This is not a perfect solution. Used missing child to ‘make’ two nodes have the same child. \documentclass[border=3mm]{standalone} \usepackage[T1]{fontenc} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \begin{tikzpicture}[ every node/.style = {shape=rectangle, rounded corners, draw, font=\small, align=center, fill=white}, ...

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} ...

9

For example: \documentclass[tikz]{standalone} % tikz loads graphicx \begin{document} \begin{tikzpicture}[ declare function={boxW=1.2cm;}, box/.style={minimum size=boxW,draw}, ] \foreach \x in {0,...,15} { \ifnum\x=0 \node [box,fill=blue!20] at ({mod(\x,4)*boxW}, {-ceil((\x+1)/4)*boxW}) {$C_{\x}$}; \else \node [box] at ({mod(\x,4)*...

9

an alternative, with using TikZ libraries calc (for calculation of middle points on edges), positioning (for positioning of nodes) and quotes (for edge labels), and the nccmath packages (for medium size of fractions). redefined are also styles for nodes: \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{calc, positioning, ...

8

You need to add some code for the red line: \draw[thick,red,{Circle}-latex,dashed] let \p1=($(R2)-(R1)$), \p2=($(R3)-(R2)$), \p3=($(R4)-(R3)$), \n1={atan2(\y1,\x1)},\n2={atan2(\y2,\x2)},\n3={atan2(\y3,\x3)} in ([yshift=1mm]R1.north) to[out=\n1,in=180,looseness=0.5] ([yshift=1mm]R2.north) to[out=0,in=\n2-180,looseness=0.5] ([yshift=1mm]R3.north) to[out=0,...

8

tikz-cd documentation You have to think on your diagram as an array, with rows and columns. In your case, 2 rows and 4 columns. So, at position (i,j) you can start an arrow pointing to another position (k,l), where you specify if the ending position is left, right, up or down, or even combinations of those. In your example, and arrow from B to E should ...

8

Here is what I got using my personal style ->- and -<-. To make it more versatile, I also define several arrow types, try it out using say \draw[->-=6pt red 2] (0,0) -- (1,1); where 6pt is the size of the arrow, red the color and 2 the type. One good thing about ->- and -<- is that the center of the arrow is perfectly at the middle of the path,...

8

It is very simple, if you use the coordinate (nodea -| nodeb) you have the y coordinate of nodea and the x coordinate of nodeb. Off-topic: see also Should \tikzset or \tikzstyle be used to define TikZ styles?. \documentclass[tikz]{standalone} \usepackage{mathtools} \usetikzlibrary{shapes,arrows.meta} % Define block styles \tikzset{ ...

8

\documentclass[border = 5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{positioning} \usetikzlibrary{shadows.blur} \begin{document} \begin{tikzpicture}[ reserv/.style = { draw = #1, fill = #1!50, text = white, rounded corners = 5pt, minimum width = 6cm, minimum height = 1cm, inner sep = 1pt, drop shadow }, ...

8

a bit shorter code, exploiting TikZ libraries arrows.meta and quotes: \documentclass[smallextended]{svjour3} \usepackage{tikz} \usetikzlibrary{arrows.meta, % <--- positioning, quotes} % <--- \begin{document} \begin{tikzpicture}[ node distance = 12mm and 24mm, squarednode/.style = {draw=black!60, ...

8

Instead of placing nodes along the path, I used the decorations.markings library to place on this path (length 1) at positions 0.2; 0.4; 0.6 and 0.8 two arrows > and Circle. mark=between positions 0.2 and 1 step 0.2 with { \draw[arrows = -{>Circle[open,length=8pt,width=8pt,fill=white]}] (0pt,0pt) -- (.1pt,0pt); } The last arrows are ...

8

How about transform canvas? \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{arrows.meta} \tikzset{myarr/.style={ -{Triangle[width=6pt, length=9pt]}, }} \begin{document} \begin{tikzpicture} \draw[myarr] (0,0) -- (3,0) node[draw, anchor=west]{A}; \end{tikzpicture} \bigskip \begin{tikzpicture}[transform canvas={scale=0.5}] \draw[myarr] (0,...

8

\documentclass[border=12pt]{standalone} \usepackage[edges]{forest} \begin{document} \begin{forest} for tree={align=c,draw,rounded corners, tier/.option=level, anchor=base, l sep'+=10pt}, forked edges, before typesetting nodes={ where content={}{phantom}{} }, before drawing tree={ where n children=0{ if={>O{!u.phantom}}{ ...

7

I refactored the yesterday answer and added some new features. \documentclass[pstricks,border=12pt,12pt]{standalone} \usepackage{pstricks-add,pst-eucl} \def\f(#1){((#1+3)/3+sin(#1+3))} \def\fp(#1){Derive(1,\f(#1))} \psset{unit=2} \begin{document} \multido{\r=2.0+-.1}{19}{% \begin{pspicture}[algebraic](-1.6,-.6)(4.4,3.4) \psaxes[ticks=none,labels=none]...

7

your nice diagrams are to wide that they can be positioned in parallel. you have two options: reduce image scale to 0.5 increase \textwidth result when the first option is considered: (red lines indicate page layout) \documentclass{article} %\usepackage{geometry} %\usepackage[utf8]{inputenc} \usepackage{tikz} \definecolor{processblue}{cmyk}{0.96,0,0,0} \...

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