Tag Info

New answers tagged

1

Update If you don't mind restructuring the tree a bit, you can get something a bit closer to your target. I've also tried using the angles library here to draw the arc at the top. If you use an empty node for the second level (below the tier of sub-headings), then set the sub-sub-headings as children of that level, you can use a further child, where ...


5

Yes, this can be done (see example below). However, it's not clear that you really need a matrix here since all the required elements can be arranged as desired without using a matrix. One option would be to use pgfplots to draw your plots; box them (a precaution to avoid the plots from inheriting settings from the "outer" tikzpicture) and then use the ...


0

I believe something like this should work: def torus { def n_segs 60 sweep [draw=none, fill=cyan, fill opacity=0.75] {n_segs, rotate(360/n_segs, (0,0,0), [0,1,0])} sweep {n_segs, rotate(360/n_segs, (1.5,0,0), [0,0,1])} (2,0,0) } def torus2 { def n_segs 60 sweep [draw=none, fill=orange, fill opacity=0.75] {n_segs, ...


2

Here is a pstricks solution: \documentclass{standalone} \usepackage[x11names]{pstricks}% \usepackage{pstricks-add} \usepackage{multido} \usepackage{auto-pst-pdf} \begin{document} \begin{pspicture} \psset{unit = 1.25, dotsize=5pt, dash=2pt 1.5pt, shortput=nab, linewidth=1pt} \psline(-2.5,0)(3,0)% ...


5

Include domain=0:30. The default domain is -5:5, thus your plots will stop at x=5. \documentclass[paper=a4,12pt,version=last,landscape]{scrartcl} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{pgfplots} \usepackage{color} \begin{document} \begin{tikzpicture} \begin{axis}[ width=10cm, height=7.5cm, xmin=0, xmax=30, ymin=0, ymax=100, ...


3

The automatic x ticks are suppressed by the special value \empty: xtick=\empty \documentclass[paper=a4,12pt,version=last,landscape]{scrartcl} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ scale only axis, xmin=-5 ,xmax=105, ymin=0,ymax=10, axis y line*=left, axis x line*=bottom, xlabel=, xtick=\empty, ...


1

This has been fixed in version 1.1.1 of this package. Please note that there is a new syntax since 1.1 which looks like: #1 (optional) = stepsize, #2 = yearstart, #3 = yearstop, #4 = postscaledtimelinewidth, #5 (optional) = prescaledtimelinewidth The code for your example looks like the following: % arara: pdflatex \documentclass{article} ...


8

Fairly minimal, very slow... \documentclass[tikz,border=5]{standalone} \tikzset{cs/3d/.code args={#1:#2:#3}{% \pgfpointxyz{(#1)*sin(#2)*cos(#3)}{(#1)*sin(#2)*sin(#3)}{(#1)*cos(#2)}}} \tikzdeclarecoordinatesystem{3d}{\tikzset{cs/3d={#1}}}% \tikzset{spherical patch/.style args={#1:#2:#3:#4}{insert path={ [smooth, samples=20, line join=round] plot ...


4

This a TiKZ solution \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{backgrounds,angles,quotes} \begin{document} \begin{tikzpicture}[% angle eccentricity=1.2, ball/.style={circle, inner sep=0pt, minimum size=2mm, fill=blue, draw=blue, label=right:$m$}, background rectangle/.style={fill=purple!20}, show background rectangle] \draw[thick] (-2,0) ...


8

One LaTeX-friendly tool for doing this type of drawing is MetaPost. Getting started details are in the linked answer. One technique for filling the background of an image, is to save the whole drawing in a picture variable, and then fill the bbox of the picture with the background colour, and then draw the picture on top. Here's an example using a ...


15

Here's one possibility: The code (includes comments): \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc,fadings,decorations.pathreplacing,arrows,positioning} \definecolor{arrowred}{RGB}{255,16,16} \definecolor{gridyellow}{RGB}{255,255,220} % The 3D code is based on The drawing is based on Tomas M. Trzeciak's % ...


12

Here's a starting point for the first one: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \tikzset{ redondo/.style={ draw=blue, line width=1pt, rounded corners=3pt, text width=#1 }, punto/.style={ fill=red, circle, inner sep=1.25pt }, tresp/.pic={ \node[punto] at (0.25,0) {}; ...


8

A bit like Stefan's answer but with (some of) the data in a table: \documentclass[tikz,border=5]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotstableread{% x y label -37 13.25 school -34 13.25 Agency -33 14.00 body -34 12.50 organisation -34.5 12.00 organizations -32 9.50 industry ...


7

You could use pgfplots for drawing coordinate system with grid, axis and ticks with labels, without drawing any plot place the text as nodes via axis cs coordinates use styles for font type and size For example: \documentclass[border=10pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[every node/.append ...


5

At this point it's hard to know whether pure TikZ or pgfplots is the best tool, since both packages allow to easily draw the diagram in the question. Below I show both possibilities. If you need to plot some functions, then pgfplots would be my suggestion; if not, then pure TikZ can do the job. In both cases, you can use the appropriate options to scale ...


4

Here I found the routine in pb-diagram that placed dots, named \dg@dotvector and made several modifications to it. I replaced the \circle macro that placed each dot with a \rule. However, I needed to have the \rule tilted at the proper angle, so I used \FPdiv and \FParctan and \FPmul to calculate the angle tangent, take the arctangent, and convert to ...


1

Just in case you change your mind :-) % arara: pdflatex \documentclass[12pt]{article} \usepackage{tikz-cd} \begin{document} \begin{equation} \begin{tikzcd}[every arrow/.append style={-latex}] A \arrow[dashed]{r}{a} \arrow[dashed]{d}[swap]{c} \arrow[dashed]{drr}[near start,swap]{u} & B ...


3

UPDATED Here is how it works, using your more complete data set: \documentclass{article} \usepackage{pgfplots} \begin{document} \centering \begin{tikzpicture} \begin{axis}[ width=\textwidth, height=.8\textwidth, axis lines=center, xmin=1950, xmax=1990, xticklabel style={/pgf/number format/1000 sep=}, ...


5

Here's a way to do this using tkz-euclide: \documentclass{article} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture} \tkzInit[xmin=0, xmax=3, ymin=1, ymax=4] \tkzClip[space=1] \tkzDefPoint(0,1){A} \tkzLabelPoint[below left](A){A} \tkzDefPoint(3,2){B} \tkzLabelPoint[right](B){B} \tkzDefPoint(1,4){C} \tkzLabelPoint[above](C){C} ...


5

Here's one possibility using the fillbetween library: The code: \documentclass[tikz,border=5]{standalone} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \usepackage{filecontents} \begin{filecontents*}{voronoiPoints.dat} 1.645370 0.643096 -0.658113 1.655264 -0.135778 -0.651569 \end{filecontents*} \begin{filecontents*}{voronoiTriPoints.dat} ...


2

You can use tikz-cd for this. % arara: pdflatex \documentclass{article} \usepackage{tikz-cd} \usepackage{mathtools} \begin{document} \[ \begin{tikzcd}[% ,row sep={.5cm,between origins} ,every arrow/.append style=Rightarrow ] & \dfrac{h}{H} \drar & \\ \dfrac{f}{g} \drar\urar & & F(z) \\ & \dfrac{G}{Z} \urar \end{tikzcd} ...


2

Here is a way with stacks. \documentclass[a4paper]{article} \usepackage{amsmath,graphicx,stackengine} \def\rdar#1{\rotatebox[origin=bottom]{#1}{$\Rightarrow$}} \begin{document} \[ \renewcommand\stacktype{L}\ensurestackMath{ \frac{f}{g} ~ \stackanchor[1.5\baselineskip]{\rdar{30}}{\rdar{-30}} ~ \stackanchor[2.5\baselineskip]{\dfrac{h}{H}}{\dfrac{G}{z}} ~ ...


1

This is a quick solution \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance=\baselineskip and 1cm] \node (start) {$\frac{f}{g}$}; \node[above right=of start] (mid-high) {$\frac{h}{H}$}; \node[below right=of start] (mid-low) {$\frac{G}{Z}$}; \node[below right=of mid-high] ...


4

You can use next as starting point: \documentclass[tikz, border=2mm]{standalone} \usepackage{amssymb} \usetikzlibrary{positioning,arrows} \begin{document} \begin{tikzpicture}[>=stealth'] \coordinate (dash) at (0,0); \coordinate[below=3cm of dash] (psii); \coordinate[below=1.5cm of psii] (psif); \draw[dashed, thick] (dash)--++(0:5cm); \draw[thick] ...


4

You can position the node along the path, so you save lines in your code. If you don't want the arrow tip, add - to the path properties, like: \draw[flow,-] ... Here's the complete version. Output Code \documentclass[tikz,margin=10pt]{standalone} \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb} \usepackage{tikz} \usepackage{pgf} ...


3

Update Here's another option producing an isometric view; the squares in the top layer can be easily labelled since the four corners can be accessed using (t-#), (l-#), (b-#), and (r-#) (see code below): The code: \documentclass[tikz,border=5]{standalone} \def\Side{0.5cm} \newcounter{mycube} \tikzset{ cube/.style={ thin, fill opacity=.5, ...


6

Since you've asked, "Asymptote uses a robust version of Paul Bourke’s Delaunay triangulation algorithm based on the public-domain exact arithmetic predicates written by Jonathan Shewchuk" (from the docs). Here is an example with the circles added: // d.asy : // settings.outformat="pdf"; import graph; size(8cm); pen p=deepblue+0.4bp; pen[] ...


11

Something like this? \documentclass[tikz,border=5]{standalone} \begin{document} \begin{tikzpicture} \foreach \i [evaluate={\ii=int(\i-1);}] in {0,...,11}{ \foreach \j [evaluate={\jj=int(\j-1);}] in {0,...,11}{ \coordinate [shift={(\j,\i)}] (n-\i-\j) at (rand*180:1/4+rnd/8); \ifnum\i>0 \draw [help lines] (n-\i-\j) -- (n-\ii-\j); \fi \ifnum\j>0 ...


1

Beamer has its own mechanism to create TOC. Basically, every time you call \tableofcontents[options], Beamer includes the same .toc file once. The only difference is that, with different options, Beamer will change the way it applies styles to the content of the .toc file. After all, Beamer provides you some beamer templates such as subsection in toc and ...


6

A interpretation of an "unstructured grid" with random lines: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \def\xmin{0} \def\xmax{5} \def\ymin{0} \def\ymax{5} \def\xnum{20}% number of horizontal lines \def\ynum{20}% number of vertical lines \pgfmathsetseed{1000}% initialize randomness for ...


1

An easy pstricks solution, to have a circle with an inscribed and a circumscribed pentagons. It uses the pst-poly package: \documentclass[12pt, x11names, border=1pt]{standalone} \usepackage{pst-poly} \usepackage{auto-pst-pdf} \usepackage{fp}% \def\R{1.09} \begin{document} \psset{unit = 2cm, dimen =middle} \begin{pspicture} \psset{ linewidth = 0.6pt, ...


2

Here's TikZ code to draw the (special relativistic) trajectory of a uniformly accelerated observer on a spacetime diagram. The initial position, speed, and acceleration can be set in the preamble. %---------------------------------------------------------------------- % Use TikZ/PGF to programmatically draw spacetime diagrams for % uniformly accelerated ...


5

Here's a Penrose diagram for the (maximal analytic extension of) the Schwarzschild black hole, made with TikZ. \documentclass[border=2mm]{standalone} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{mathrsfs} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,patterns} \newcommand{\scri}{\mathscr{I}} \begin{document} % Penrose diagram ...


2

Here is a first cut, based on my answer at Matrix decomposition dimensions diagram. Syntax for a box is \matbox{rows}{row-label}{columns}{column-label}{box-title}. For example, \matbox{3}{dimensions}{8}{documents}{...} creates a box of 3 rows labeled "dimensions" and 8 columns labeled "documents". To allow for the complex box title, I introduce ...


1

Here's a possibility with tikz-cd; there probably is a better way for placing the asterisk. \documentclass{article} \usepackage{amsmath} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[arrows=Rightarrow] & \text{Symm} \arrow[r] \arrow[ddr] & \text{S-Comm} \\ \text{Comm} \arrow[r] & \text{F-Symm} \arrow[u] \arrow[r,crossing over] & ...


0

I'm sure that there is easier way to do this, but this is how I would do it: make \mBox function \documentclass{article} \usepackage{tikz} \usepackage{ifthen} \newcommand{\mBox}[6]{ \draw #1 node {#3}; \ifthenelse{#4=1}{\draw #1+(#2,-0.05) node {$\Longrightarrow$};}{} \ifthenelse{#5=1}{\draw #1+(0,0.8) node {\rotatebox{90}{$\Longrightarrow$}};}{} ...


13

Taken from Zarko's example code \documentclass[tikz, border=10pt]{standalone} \usetikzlibrary{chains,positioning} \usepackage{verbatim} \usepackage{xcolor} \DefineNamedColor{named}{BrickRed} {cmyk}{0,0.89,0.94,0.28} \DefineNamedColor{named}{DarkRed} {cmyk}{0.4,0.89,0.94,0.28} \renewcommand{\familydefault}{\sfdefault} \begin{document} ...


14

An alternative, which use tikzlibrary chains and positioning: \documentclass[tikz, border=10pt]{standalone} \usetikzlibrary{chains,positioning} \usepackage{verbatim} \begin{document} \begin{tikzpicture}[ node distance = 2cm, auto, start chain = going right, box/.style = {rectangle, draw, on chain}] % Nodes ...


10

Here is a quick-hack: \draw[->, draw=red] (Environment) -| ($(Sensor)+(-3,0)$) |- node[anchor=south west] {measured by} (Sensor); you need to add \usetikzlibrary{calc} to the preamble. ($(Sensor)+(-3,0)$) adds an additional coordinate to the path. (-3,0) is the offset from the (Sensor) node. Update (inspired by Zarko's answer) Instead of ...



Top 50 recent answers are included