Tag Info

New answers tagged

4

You can add additional nodes in singleextra \documentclass{article} \usepackage[tikz]{mdframed} \usepackage{lipsum} \definecolor{greentitle}{cmyk}{.3,.02,.4,0} \makeatletter \newenvironment{understanding}[1][]% {\begin{mdframed}[ bottomline=false, leftline=false, rightline=false, linecolor=greentitle, backgroundcolor=white, ...


3

Like this? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (5,4); \draw [dashed,thick] (A) to[out=90,in=180] (B); \fill (A) circle [radius=1pt] (B) circle [radius=1pt]; \end{tikzpicture} \end{document} Actually you can use the coordinates directly instead of ...


4

You missed a \ in draw in the last line. draw [dot diameter = 2pt, dot spacing = .3cm, dots ] (E) to (W); Then it works your way. The intersection is not needed but you have to add sloped option to the node midn: \draw[->,>=stealth',shorten >=1pt, name path=varToNoise] (noiseVar) to node (midn) [pos=.3, fill=white, minimum width = .8cm, ...


1

Another option: draw the rectangle and overwrite in red the side you want. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (2,2) rectangle (6,4); \draw [red] (2,2) -- (2,4); \end{tikzpicture} \end{document}


4

there may be other ways but just splitting in to two is a simple possibility: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw [red] (2,2) -- (2,4); \draw (2,4) -- (6,4) -- (6,2) -- (2,2); \end{tikzpicture} \end{document}


7

Here is a pic version. \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ pics/.cd, mybezier/.style args={#1#2#3#4#5}{ code={ \draw[very thick,#5] (#1).. controls (#2) and (#3) .. (#4); \draw [gray] (#1)--(#2)-- (#3)--(#4); \draw [fill=green,draw=black] (#1)node[above] {$P₀$} circle (2pt); \draw ...


8

An alternative could be to try the show path construction decoration. It takes a bit of time to set up (e.g., automatically placing the control labels "nicely" while also allowing for custom placement) but after that then using it is pretty easy and can be controlled using TikZ styles: \documentclass[tikz,border=5]{standalone} ...


4

For easy reference (my me, and perhaps by others), here is the final code, including the improvements mentioned in the comments, and a bit more. Credit to Jesse for doing most of the work. \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \newcommand\poleDiam{1.8pt} \newcommand\mybezier[5]{ \draw[very thick,#5] (#1).. controls ...


12

This is one possible solution. Here a macro called mybezier is defined within a tikzpicture environment as displayed below that takes 4 arguments: P_0, P_a, P_b, P_1. Then call \mybezier{p0}{pa}{pb}{p1} to draw. \newcommand\mybezier[4]{ \begin{tikzpicture} \draw [green] (#1)--(#2)-- (#3)--(#4); \draw[very thick,blue] (#1).. controls ...


0

Only because it is a tree... but it does make the tree specification nice and concise... [But I can't figure out how to make it break the lines automatically within the nodes.] \documentclass[tikz, border=5pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{forest} \begin{document} \begin{forest} for tree={ draw, text width=3cm, ...


2

This can be easily done with tikz-cd or any other package for commutative diagrams. % arara: pdflatex \documentclass{scrartcl} % [a4paper,11pt] are both default here \usepackage{tikz-cd} % loads TikZ as well. Can be followed by any TikZ library \begin{document} \begin{tikzcd} & 0 \arrow{r}{a} \arrow{d}{\tau} ...


2

Something like this? I used random steps decorator for the green path, and "manually" built the black path, using some key points and start/end angles. Also note the use of polar coordinates, which are more appropiate for this case than cartesian ones. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,shapes.geometric} ...


5

Use fill=white. \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture}[transform shape,mylabel/.style={thin, draw=black, align=center, minimum width=0.5cm, minimum height=0.5cm,fill=white,font=\Large}] \newcommand\XA{-3} \newcommand\YA{0} \node (x) [circle, draw=black, ...


2

I plotted your functions using pgfplots. % pdflatex \documentclass[margin=2mm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \pgfmathdeclarefunction{F}{3}{\pgfmathparse{#1* exp(#2*#3)}} \begin{axis} [ smooth, grid=both,minor tick num=1, ...


3

A solution completely made with TikZ. I used the styles thick and >=stealth' (from the arrows library) in both pictures to make them look fancier. This is of course completely optional. \documentclass[tikz]{standalone} \usepackage{tikz,bm} \usetikzlibrary{angles,arrows,calc,quotes} \begin{document} \begin{tikzpicture}[ thick,>=stealth', declare ...


4

The latest version of PGF has a node contents=<node text> key which can be used in place of the {<node text>} in a node. It could be used like this: \documentclass[tikz, border=5]{standalone} \tikzset{node text/.style={node contents=\transformtext{#1}}} \def\transformtext#1{\ttfamily(#1)} \begin{document} \begin{tikzpicture} \foreach \l ...


5

Here is a solution with pstricks for the first figure (the logarithmic spiral): \documentclass[a4paper, pdf, svgnames]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[f]{esvect} \pagestyle{empty} \usepackage{pstricks-add} \def\localbasis{\psline{<->}(1,0)(0,0)(0,1)} \begin{document} \small \psset{plotpoints=500, algebraic, ...


6

direct from the manual. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[domain=0:720,smooth,variable=\t] plot ({1.5*sin(\t)},0.8*\t/360,{1.5*cos(\t)}); \draw[->] (0,0,0) --( 2,0,0) node[above]{y}; \draw[->] (0,0,0) --( 0,2,0) node[right]{z}; \draw[->] (0,0,0) --( 0,0,2,) node[above]{x}; \end{tikzpicture} ...



Top 50 recent answers are included