# Tag Info

## New answers tagged decorations

3

This went a little too deep then I initially intended to. I can't see how to wrap up the required changes in a coherent patch-y way so I propose to add the postaction=decorate to another location instead of the obvious place that you found out that it won't work. So if we add \tikzset{mydeco/.style={pic actions/.append ...

8

There are two paths used by the angle pic: one to fill the background of the angle and one to draw the arc. And if a pic text is given an additional node will be placed inside the angle. But only the arc path should be decorated. The arc is drawn by the command \tikz@lib@angle@foreground (see the tikzlibraryangles.code.tex file): ...

7

knot and double don't work together because the double mechanism is how knot overwrites any underlying paths: it uses double with the sidelines set to the background colour and the central colour the main colour (this is opposite to how double is intended to be used). If you want the main path to itself be doubled then you need to draw the path three times: ...

4

The knot style makes the path a "doubled" path, only unlike a usual doubled path then the outside part is set to the background and the inside set to the desired colour. This is what allows a knot path to "punch through" another path. As this is not the usual way of using the double style, the arrow head is picking up the wrong colour (and thickness) from ...

1

Another solution with tikz, as requested. The problem with the linked answer is that the arguments to the atan function in the pgf low-level layer have been reversed. Switching the arguments inside the wavy semicircle definition solves that issue. Code for the styles borrowed from here. \documentclass{standalone} \usepackage{tikz} ...

2

run with xelatex \documentclass{article} \usepackage[svgnames]{pstricks} \begin{document} \begin{pspicture}[showgrid=false](-0.11,0)(1,5) \psset{linecolor=IndianRed,doubleline} \psecurve(0,0)(0,1.99)(0.2,2.4)(0.5,2.7)(0.8,2.7)(0.9,2.49)(0.9,2) \psecurve[border=1pt](0.9,3)(0.9,2.51)(0.8,2.3)(0.5,2.3)(0.2,2.6)(0,3.01)(0,5) \psline(0,2.01) \psline(0,3)(0,5) ...

6

Just for fun, with feynmp and egreg's feynmp-auto. If on MikTeX or TeX Live 2012 or earlier, compile with --shell-escape (or --enable-write18) as command-line options. All manual positioning (\fmfforce commands) is done to match your sample, but the positions can be computed automatically by leaving these out. \documentclass{standalone} ...

6

I can propose a solution (more or less accurate) in pstricks but it should not be difficult to adapt it to tikz-pdf, as the code is simple. It's based on the fact that the curve you want is close to a strophoid and that one can plot it using its polar equation. \documentclass[11pt, a4paper,svgnames,pdf]{article} \usepackage[utf8]{inputenc} ...

6

An alternative method, which is much slower and leads to much less appealing results than JLDiaz's Poisson sampling is the brute force one from tikz: Distribute evenly and randomly circles. The only advantage is that this doesn't require lualatex. \documentclass{standalone} \usepackage{tikz} \begin{document} \def\xlist{4} \def\ylist{4} ...

9

You can use the poisson disc sampling library (you can get it in this answer). You need to copy/paste the content of poisson.sty and poisson.lua from that answer into two files with these names. You need also a working lualatex to compile. Then, using it, you can compile the following code (this one requires PGF=>3.0, see later on for other examples that ...

12

Another possible solution is the use of clip techniques and patterns from tikzlibrary. Addendum: To make them automatic, one can define a macro with two arguments,say, #1=lines pattern, #2=color. Same ideas apply to inwards macro. \newcommand\outwards[2]{ \begin{scope} \draw (axis cs:1000, 500) -- (axis cs:2750,500) -- (axis cs:2750, 2000) -- (axis cs: ...

8

It's not hard to use TikZ decorations for this: \documentclass{standalone} \usepackage{pgfplots} \usetikzlibrary{decorations.pathreplacing} \begin{document} \begin{tikzpicture} \begin{axis}[ % axis equal image, xlabel = {$x$}, ylabel = {$y$}, grid, xmin = 0, xmax = 3000, ymin=400, ymax = 2200, ...

2

Run with xelatex \documentclass{standalone} \usepackage{pstricks-add} \begin{document} \psset{unit=5} \begin{pspicture}(-1.1,-1.1)(1.2,1.2) \psaxes[Dx=0.5,Dy=0.5]{->}(0,0)(-1.1,-1.1)(1.1,1.1) \psparametricplot [plotpoints=100,algebraic,linecolor=red, linewidth=2pt]{0}{Pi}{cos(3*t) * cos(t) | cos(3*t) * sin(t) } \multido{\rA=0.34+0.50}{6}{% ...

Top 50 recent answers are included