Tag Info

New answers tagged

5

You can simply randomize the lengths of rising and falling edge locations \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) --(1,0)|- ++(rnd,1) \foreach \x in {1,...,10}{-|++(rnd,-1) -| ++(rnd,1)} -| ++(rnd,-1); \end{tikzpicture} \end{document}


3

@Franck has a fine general answer, but perhaps a simpler solution is to draw the arrow first, then draw AND fill the circles. unitsize(1cm); pair a1=(4.5,2); pair a2=(0,0); real r=0.25; path c1=circle(a1,r); path c2=circle(a2,r); draw(a1--a2, arrow=MidArrow(size=8)); filldraw(c1, white); filldraw(c2, white);


4

Another try with MetaPost, inspired by Thruston's solution, but using the zscaled operator of MetaPost which is in fact the complex multiplication. Also, I have incorporated it in a LuaLaTeX program, as I use to do. \documentclass[border=2mm]{standalone} \usepackage{luamplib, amsmath} \begin{document} \begin{mplibcode} beginfig(1); r = 1.3; ...


3

Found it. Try this: \begin{tikzpicture} \foreach \x in {1,...,18} \draw[thick] (4.5,1.5) to [bend angle = 2*\x, bend left] (3+0.5*\x,-1) node [below]{\tiny\x}; \draw[thick, red] (4.5,1.5) to [bend angle = 36, bend left](3+0.5*18, -1) node [below right]{\tiny E}; \end{tikzpicture} you have: But with changing the red line with: ...


5

Does this do the trick? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[aeang/.style={red,#1}] \draw[->] (-1,0) to node [auto]{$f$} (1,0); \draw (-5,-1) node(0)[label=below:{$v_0$}, circle,fill=black,scale=0.3]{}; \draw (-2,-1) ...


3

You can implement a slightly better control over your bend angle such that the homotopy is between zero and 36 degrees relative. Then you can use it for the in,out keys. The only change in the code is \foreach \x[evaluate={\xc={(36/17)*(\x-1)};}] in {1,...,17}{ \draw[thick, dashed] (4.5,1.5) to [out=\xc,in=180-\xc,relative] (3+0.25*\x,-1); } Note that ...


2

Here is a short code for an Archimedean spiral between two points (the equation was calculated) with pstricks: \documentclass[pdf, x11names]{standalone} \usepackage{pstricks-add} \usepackage{amsmath} \DeclareMathOperator\re{Re} \DeclareMathOperator\im{Im} ...


5

A combination of rotation and scaling does the job neatly in Metapost. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); path re, im; re = origin -- right scaled 4cm; im = re rotated 90; drawarrow im; label.lft(btex $\mathop{\rm Im}(z)$ etex, point 1 of im); drawarrow re; label.bot(btex $\mathop{\rm Re}(z)$ etex, point 1 of re); z1 = ...


5

The radius, the start and end angles for the arc command can be calculated, see the following example. (Update:) For the red "spiral" line I have used the plot function with a polar coordinate. The length of the polar coordinate linearly increases with the angle going from point (z) to (a): \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} ...


6

Something like that? A combination of firstcut(p, c1).after which removes the part of path p located before its intersection with c1, and of lastcut(q, c2).before, which removes the part of path q located after its intersection with c2. See Asympote's main manual, p. 35. unitsize(2cm); pair a1=(4.5,2); pair a2=(0,0); real r=0.25; path c1=circle(a1,r); ...


0

There is a flow chart package which you can use. The documentation is given here, please check: http://ctan.imsc.res.in/graphics/pgf/contrib/flowchart/flowchart.pdf


1

Your code can be cleaned up quite a bit and made easier to read \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} \tikzset{input/.style={}} \begin{document} \begin{tikzpicture}[my node/.style={rectangle, draw, thick,minimum width=#1,minimum height=2.20cm,outer sep=4pt}, ...


3

A bit unfriendly in places, but it pretty much does the job... \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture}[x=1.5cm,y=1.25cm,>=stealth] \foreach \i [count=\y] in {0,1,\vdots,k} \foreach \j [count=\x] in {1,2,\ldots,n-1} \node (C-\y-\x) at (\x,-\y+2.5) {$\ifnum\y=3\ifnum\x=3\else\i\fi\else\ifnum\x=3\j\else ...


1

To make lines with a matrix as base you will need to name the matrix and use \path. I removed your empty columns and used this example as reference: http://www.texample.net/tikz/examples/commutative-diagram-tikz/ To make the vertical dots I create named nodes in the middle of the edges that go from the second row to the last row. I fill each node with white ...


5

Similar to LaRiFaRi, but with less dramatic length for the vertical arrows to the dots. The trick is to use mock rows and shortening row sep. \documentclass{article} \usepackage{tikz-cd} \newcommand{\cvdots}{\raisebox{-.4ex}[0pt][0pt]{$\vdots$}\mathstrut} \begin{document} \[ \begin{tikzcd}[row sep=1em] & C_{0,1} \arrow[dddl,dash] \arrow[r,dash] ...


6

This can be done by tikz-cd, xy or pure pstricks and tikz. I introduced some dimensions (e.g. [-2\jot]). You may want to modify or delete them until the diagram fits your desired style. Here you are: % arara: pdflatex \documentclass{article} \usepackage{mathtools} \usepackage{tikz-cd} \makeatletter \DeclareRobustCommand{\rvdots}{% \vbox{ ...


1

A simple solution with tikz-cd: \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd} 1 \arrow[r] & 0 \arrow[r] & -1 \arrow[l,bend left] \end{tikzcd} \end{document}


2

Unless I misunderstood your request, you don't need decorations with this type of graph. Using your foreach you can draw an arrow for each node. I had to use an if statement though to avoid typesetting an extra arrow on the right. Output Code \documentclass[margin=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta,calc} \tikzset{ ...


3

Like this? \documentclass[tikz,border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \usetikzlibrary{arrows} \begin{document} \tikzset{->-/.style={decoration={ markings, mark=at position #1 with {\arrow{>}}},postaction={decorate}}} \begin{tikzpicture} % a straight line segment \draw[latex-] (-2,0) -- (0,0); ...


7

This answer provides two solutions, the first using Tikz, and the second one, using the forest package. Tikz Code \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta,shapes,positioning,shadows,trees} \tikzset{ basic/.style = {draw, text width=2cm, drop shadow, font=\sffamily, rectangle}, root/.style = {basic, rounded ...


0

Here is one done wither pstricks. The loops are parts of strophoids, as it was the closest curve to the original figure I know. \documentclass[pdf, svgnames, x11names]{standalone} \usepackage[utf8]{inputenc} \usepackage{pst-node, pst-plot, pst-poly} \usepackage{rotating} \newcommand\myloop{\psplot[yunit = 1.6, plotpoints=200,plotstyle=curve, polarplot, ...


7

Another solution, using MetaPost. I have included it in a LuaLaTeX program (MetaPost is sort of embedded in LuaTeX) for typesetting convenience. If you do not use LuaLaTeX, you can include the PDF figure resulting from this program in your own file, via the graphicx package. Or you can use the gmp package to include this code in a LaTeX/PDFLaTeX/XeLaTeX ...


2

Code \documentclass{standalone} \usepackage{tikz-cd} \usetikzlibrary{decorations.markings, arrows.meta, calc} \tikzset{my Barb/.tip={Straight Barb[round,angle=45:1pt 3]}} \tikzset{ plus mark/.style={-, decorate, decoration={markings, mark=at position .5 with { \draw[-,dash pattern=on #1 off 2*#1 on #1] (left:2*#1) -- (right:2*#1) ...


4

Here is a possible solution using xypic. Since I don't know that cross symbol for the double arrows, I used +. Afterwards, you can replace it. \documentclass[11pt,a4paper]{report} \usepackage{amsmath} \usepackage[all,cmtip]{xy} \usepackage{lipsum} \begin{document} \lipsum*[2] \begin{equation} \begin{gathered} \xymatrix@C=.5cm@R=.5cm{% ...


4

An alternative way of drawing three dimensional graphs, using pretty much only plain TikZ. This is the intersection between the cone z^2=x^2+y^2 and the cylinder x^2+y^2=2y. \documentclass{article}\usepackage{tikz,mathtools} \tikzset{ MyPersp/.style={scale=1.4,x={(0.8cm,0.4cm)},y={(-0.8cm,0.4cm)},z={(0cm,1.2cm)}}, } ...


3

You could do this one nicely in Metapost as well. Once you have created a normal-shaped curve you can scale it and relocate it as needed. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(0); % unit u := 1cm; % axes path xx, yy; xx = (origin -- 5 right) scaled u; yy = xx rotated 90; drawarrow xx; label.rt (btex $x$ etex, point 1 ...


1

Maybe you are more confortable with tikz-cd which uses a quite easy syntax for such things. The line every arrow/.append style={dash} sets every arrow to just a line without arrow heads. % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[% ,cells={nodes={circle,draw,font=\sffamily\Large\bfseries}} ,every ...


4

Try \documentclass[tikz,border=5mm]{standalone} \usetikzlibrary{positioning} \pgfmathdeclarefunction{gauss}{2}{% \pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((\x-#1)^2)/(2*#2^2))}% } \begin{document} \begin{tikzpicture}[ node distance = 4mm, font = \small\sffamily, N/.style = {name=n#1, ...


4

You just need to take out the arrow commands -> and set the loop style to empty: All of the credit is due to @Stefan Kottwitz for creating the original picture. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[auto, node distance=3cm, every loop/.style={}, thick,main ...


0

I use Inkscape. It generate this code (and you must call it instead of image): \begingroup% \makeatletter% \providecommand\color[2][]{% \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% \renewcommand\color[2][]{}% }% \providecommand\transparent[1]{% \errmessage{(Inkscape) ...


1

Well, if you really wanted to, you could draw it as a tree. The contents of the nodes are shamelessly taken from R. Schumacher's answer. Here's an example using forest. \documentclass[tikz,border=5pt]{standalone} \usepackage{forest} \usetikzlibrary{arrows.meta} \begin{document} \begin{forest} for tree={ delay={ label/.wrap pgfmath ...


1

This is a close version of what you want. I have modified the code from How can you create a vertical timeline? The only item missing is the bottom arrow (Still thinking about that) \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{charter} \usepackage{environ} \usepackage{tikz} \usetikzlibrary{calc,matrix} % code ...


6

For this sort of semi-technical sketch you might consider Metapost as an alternative tool. Here I've followed my preferred sequence to keep everything nicely organized: define the paths (relative to each other as far as possible); draw them; then add the labels. prologues := 3; outputtemplate := "%j%c.eps"; beginfig(1); % set a unit scale u := 1cm; % ...


7

I don't think it's necessary to use pgfplots. I think you can get the effect you want (and somewhat easier) using just tikz. \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows.meta} \begin{document} \begin{tikzpicture} \coordinate (Q) at (0,0); %% put this first even though you can use opacity. ...


2

Here's an example of how to get started. I think it should make it clear enough how to continue to get the diagram you want. \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[my midway label/.style={midway,yshift=1.5in}] %% case 1 \node[anchor=east] (A/left) at (0,0) ...



Top 50 recent answers are included