# Tag Info

14

Like this? I am not sure if you want to fill only the images and get rid of every thing else. I have excluded only the grid and numbers. You may choose to comment out more lines if you don't need them. \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{arrows,shapes,backgrounds} ...

10

With a small patch, it is possible to achieve: which is far from being perfect, but looks like the reference picture. The code: \documentclass[12pt]{article} \usepackage{smartdiagram} \usetikzlibrary{shapes.symbols} \tikzset{description title/.append style={ signal, signal to=south, signal from=north, yshift=-0.65cm, } } ...

10

Or, without the smartdiagram package: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes.symbols,positioning} \definecolor{myblue}{RGB}{79,129,189} \tikzset{ myshape/.style={ shape=signal, fill=myblue, minimum height=1.5cm, minimum width=1.5cm, text=white, signal pointer angle=130, signal to=east, signal from=west, ...

10

Without numbers: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw [ultra thick] (-8,0) -- (8,0); \draw [ultra thick] (0,0) circle (8); \foreach \i in {0,1,2,3} {% \draw [ultra thick] (90*\i:8) arc (270+90*\i:180+90*\i:8);} \foreach \i in {0,1,...,7} {% \draw [very thick] ...

8

Based on looking through the pgf documentation's LaTeX source and also this answer, I believe that the documentation should list that both the graphs and graphs.standard libraries are included to produce these graphics. All your examples work if I use \usetikzlibrary{graphs,graphs.standard} instead of only \usetikzlibrary{graphs}. Here is one sample: Code ...

7

Hopefully this will work with \input too. You can use a node to put your .tikz files \documentclass{article} \usepackage{graphicx,array,booktabs,tikz} \usetikzlibrary{calc} \begin{document} \newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}} \begin{table}[htb!] \centering \begin{tabular}{P{5.5cm} P{5.5cm}} \toprule R220expt21 & ...

7

One method is to use layers. Declare the foreground (fg) layer with \pgfdeclarelayer{fg} and set the order of layers (bottom to top) with \pgfsetlayers{main,fg}. Then, anywhere in a pgf-based environment, you can use \begin{pgfonlayer}{fg} <drawing commands> \end{pgfonlayer} to draw in the foreground. A note: the shapes.geometric library is ...

7

This can be done by the fillbetween library which is shipped with pgfplots version 1.10: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} % \usetikzlibrary{} \usepgfplotslibrary{fillbetween} \begin{document} \begin{tikzpicture} \begin{axis}[axis on top,set layers] \addplot[blue,name path=A,domain=0:2.3] ...

7

No need for nested loops, you can use just a simple \foreach and the count= option: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}\small \foreach \x in {0,...,3} \fill (\x,0) circle (2pt); \foreach \x in {0,...,3} \node[above=2pt] at (\x,0) {\x}; \foreach \x in {3.25,3.5,...,4.75} \fill (\x,0) circle (0.5pt); \foreach ...

6

With a little TikZ: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} % Time axis \draw (0,0) -- node[below=1cm] {Time $\to$} (6,0); % Emotional axis \draw (0,0) -- node[left] {\parbox{2cm}{\centering $\uparrow$ \\ Emotional \\ intensity}} (0,4); % Time ticks \foreach \x [count=\j] in {0.2,3,4.5,6} { \draw ...

6

Just for typing exercise with PSTricks so I leave the code as is without optimization. One \documentclass[pstricks,border=12pt]{standalone} \usepackage{pst-plot,pst-eucl} \def\f{x -.5 sub x 2.5 sub mul 2 div } \def\g{\f neg } \begin{document} \begin{pspicture}[dimen=m](-2,-2)(4.5,4.5) ...

6

Using polar relative coordinates it is easy to build a path in a triangular grid, such as: \draw (0,0) -- ++(0:1) -- ++(120:1) -- ++(0:1) -- ++(-120:1) -- ++(0:1) -- ++(120:2); Each coordinate is given in the form (angle:distance) relative to the previous one (this is what ++ is for). This draws the path: Using again polar relative coordinates ...

5

I suggest two ways for solving your issue. Redefine \mess to “stringify” the problematic argument in the proper place Define a \Mess command with an additional optional argument (a string that refers to the text); if the second mandatory argument to \Mess (corresponding to the same place in \mess) is characters only, you don't need to add the label in the ...

5

Here's a possibility that makes use of the \subcaption command of the subcaption package and the minipage environment (see p. 4 of the documentation; there are also dedicated subfigure and subtable environments that are explained on p. 5, if you prefer another possibility). \documentclass{article} \usepackage{pgfplots} \usepackage{subcaption} ...

5

Version 1.10 of pgfplots has been released just recently, and it comes with a new solution for the problem to fill the area between plots. Note that the old solution is still possible and still valid; this here is merely an update which might simplify the task. In order to keep the knowledge base of this site up-to-date, I present a solution based on the ...

5

Well even if it supported Python like loops, $$would still cause problems since it is the inline math environment opening for example \(\alpha$$ is $\alpha$. But it doesn't. Hence you need to use \foreach \x/\y in {-2/green,-1/red,0/black,1/blue,2/yellow}

5

Yep, there’s a way to do this. From section 83/page 911 of the PGF/TikZ Manual (v3.0.0): Multiple variables. You will often wish to iterate over two variables at the same time. Since you can nest \foreach loops, this is normally straight-forward. However, you sometimes wish variables to iterate “simultaneously.” For example, we might be given a list of ...

5

Improved version: I changed the old \tikzsetstyle to the more appropriate \tikzset syntax. I'd suggest you not to use : in the name of a node, since the : operator has a special meaning when applied to a name of a node. I loaded the positioning library and change the deprecated of= syntax to the =of syntax (notice the economy in the resulting code). ...

5

Good evening, this is working for me (let's say we use er0.Rnw): \usepackage[czech]{babel} \catcode"=13 \catcode-=13 After adding those two lines we call these three lines in R (e.g. we could use pdflatex er0.tex later, or, let's use knit2pdf instead of knit...): require(knitr) require(tikzDevice) knit("er0.Rnw") We would ...

5

I was wondering the same thing yesterday in the comments of this answer on a close subject. For recursive drawings as this one are (relatively!) easy to do with languages closely related to (La)TeX, but external to it, as MetaPost or Asymptote. For example, here is my "quick and dirty" attempt with MetaPost on the Farey diagram illustrated in the original ...

5

It is not any different than the examples given by other languages. Only a few places where expansion needs to be taken care of. I didn't really go for the code golf but it seems working. And it gets fainter as the recursion depth increases. \documentclass[tikz]{standalone} \newcount\recurdepth \begin{document} \begin{tikzpicture}[scale=2] \draw[style=help ...

4

This is cheating. Utterly, utterly cheating. It’s a Python script which generates the TikZ necessary to draw a Farey diagram. I use the definition from the Wikipedia page on Farey numbers to generate the successive Farey sequences. This gets processed into a form suitable for TikZ: a list of terms num/denom/nextnum/nextdenom which you can loop over with ...

4

See How can I add a zero line to a plot? Find the inverse of the function, plug in the value. \documentclass[border=5mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat = 1.9} \pgfmathsetmacro\result{-ln(1-0.63)*5} \begin{document} \begin{tikzpicture} \begin{axis}[ ymax = 1.15, ymin = 0, xmin = 0, xmax = 20, ytick = {0, .63, ...

4

One option: the inset is saved in a box and then placed at the desired position using a \node and the axis coordinate system for the main plot (See Section 4.17.1 Accessing Axis Coordinates in Graphical Elements): \documentclass{article} \usepackage{pgfplots} \newsavebox\mybox \begin{document} % the box is filled with the inset \savebox\mybox{% ...

4

You can use TikZ. Here is an example: But I never used it before, so maybe there is a better method than gluing arrows together, here is the code: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{width=6cm,compat=newest} %for arrows in the middle of the line \usetikzlibrary{decorations.markings} ...

4

You need to shift the cube to be centerd about the origin. The easiest way I can see to do that with your existing code is to apply a scope: Code: \documentclass[11pt]{scrartcl} \PassOptionsToPackage{dvipsnames,svgnames}{xcolor} \usepackage{xkeyval,tkz-base} \usetikzlibrary{arrows,calc} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...

4

Just for fun, you can reduce the number of foreach loops as follows % arara: pdflatex % !arara: indent: {overwrite: yes} \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x [evaluate={\xi=int(\x-4);}] in {0,...,3,5,6,...,8} { \fill (\x,0) circle (2pt); \ifnum\x<4 \node[above=2pt] ...

4

The append after command key appends nothing after drawing the node. It appends material to the current path where the node entry appears. Here is an example to illustrate its usage. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw (0,0) -- (1,0) node{A} -- (2,0); \draw[red] (0,1) -- (1,1) node[append after command={-- ...

4

You can use \tkzSetUpPoint[<options>] to customize the attributes for points. An example: \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \tkzSetUpPoint[fill=black] \begin{document} \begin{tikzpicture} \tkzDefPoint(0,0){A} \tkzDefPoint(4,0){B} \tkzDefPoint(2,3){C} \tkzDrawPoints(A,B,C) % want them filled ...

4

Here is a solution using minipage alignment, baseline option of TikZ picture and the special node current bounding box. \documentclass{scrartcl} \usepackage{tikz} \begin{document} \begin{figure} \begin{minipage}[t]{.5\linewidth} \centering \begin{tikzpicture}[baseline=(current bounding box.north)] \draw [fill=black] (0,0) rectangle (1,1); ...

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