part of the tikz/pgf bundle: the decoration libraries define a number of (more or less useful) decorations that can be applied to paths.

learn more… | top users | synonyms

1
vote
1answer
55 views

How to get random-steps decorated tables?

I use tikz's decoration={random steps} a lot in a document for boxes and separator lines. In the same document I have tables set as tabularx, but the cell backgrounds / lines in those tables are ...
4
votes
2answers
131 views

Decoration of (relative) segments of Bézier curves

I would like to modify a bezier curve in tikz, e.g. \draw (0,0) .. controls +(87:2.3) and +(50:-0.7) .. (1,1); in such a way, that a part in the middle is draw with dots (instead of a full solid ...
1
vote
0answers
73 views

How to make the arrow more natural?

I have no idea to put the arrow into natural way. The source code is like the below \begin{tikzpicture} \draw [decorate,decoration={coil,segment length=7.2mm,aspect=1,amplitude=2mm},->,>=...
5
votes
1answer
104 views

Aligning text along a sector of a circle

How can I align text along the circumference of a circle like this using TikZ? Please ignore the icons. I tried using paths and decorations, but I don't know how to constrain the text to each sector. ...
5
votes
2answers
73 views

Decorate a TikZ node with black corners

I want to decorate a rectangular node with little black boxes in the corners: So far, I was able to put a black box in the lower left corner using the decorations.markings TikZ library: \tikzset{ ...
6
votes
0answers
57 views

Why does the pic option get passed through to the entire object?

Description This question follows from the question Why is the decoration marker off center? where we found what was causing the problem, but not why it was being caused in the first place. It seems ...
7
votes
1answer
67 views

Why is the decoration marker off center?

Description I am making a graph and am using a decoration marker to make square nodes between the circular ones. That had been working fine until I wanted to add a decoration between T_t and I_t (...
4
votes
1answer
37 views

PGFplots: decorating plot but not legend

Using PGFplots, I would like to apply a decoration to a plot but not to the corresponding legend entry. Is there a way to do this? Here is an example: I'd like the legend image to be just the line, ...
5
votes
1answer
63 views

Can't use xshift with decorations.markings in tikz

I am using the library decorations.markings to mark the middle of a plot with a \node: \documentclass[a4paper,11pt]{article} \usepackage{tikz} \usetikzlibrary{decorations.markings} \tikzset{midmark/...
3
votes
1answer
48 views

“perpendicular shift” for paths

I am trying to draw several parallel arrows between the same nodes, to get roughly this result: What I would need is a hypothetical perpendicular shift key, which would shift the edge along its ...
2
votes
1answer
61 views

Line with intervals using tikzpicture [duplicate]

I have used following image as inspiration for my line. In my case there are 10 instances with different intervals. With some (ok a lot) help I have so managed to make this code \documentclass[...
1
vote
0answers
39 views

How to prune nodes in a tree using graph syntax

I want to indicate that nodes have been removed from a tree. Lets say the code looks like this: \documentclass{article} \usepackage{tikz} \usetikzlibrary{graphs} \usetikzlibrary{graphdrawing} \...
3
votes
1answer
39 views

Hide C label from the vector

I have this code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.markings,arrows} \begin{document} \begin{tikzpicture} \coordinate (B) at (1,2); \coordinate (A) at (3,4); \...
0
votes
0answers
61 views

Any package for creating curlicue decorations in latex?

How does one create customizable curlicue dividers and decorations in latex short of hard-coding them using tikz?
3
votes
1answer
231 views

How to draw a real corkscrew

I would like to draw a real screw like in image below. Any codes in tikz, asymptote or pstricks are welcomed! In order do not confuse with my linked question about laser who as well is based on ...
4
votes
0answers
79 views

Problem with decorations in a small TikZ picture

When working on yesterday's update on my answer to the december challenge (a dcorated tree), I encountered a problem: if I choose the picture's dimensions to small, then it fails with Dimension ...
2
votes
1answer
72 views

Decorations on multiple paths

I am trying to re-orient the decorations on two paths so that the arrows on the bottom one face the other way. I name the paths as follows \begin{tikzpicture} [decoration={markings, ...
6
votes
2answers
140 views

Change angle of decoration or pattern along a path independently

I want to give the impression of a wall, but the diagnals i drew cross each other. I just want them to follow around the corner like pictured on the left \begin{tikzpicture}[ media/.style={...
4
votes
1answer
151 views

How to add snow to this tikz drawing of a mountain?

I edited Elena Botoeva's tikz example to draw a mountain. Here's what it looks like: The picture is intended to be more symbolic than realistic. Here's the LaTeX/tikz code for drawing it: \...
2
votes
2answers
74 views

PGFPlots: Math, commands and braces in text along path

Following my question here about how to plot a text along a path another question came up. How can I add math or commands with \command to the text along the path? This here works: postaction={...
12
votes
2answers
191 views

Decorate path at points specified by function

I know that I can decorate a path at evenly spaced intervals using mark=between positions 0.1 and 0.9 step 0.25 ... etc. Is it possible to specify the points at which to draw decorations using a ...
3
votes
1answer
168 views

Drawing abstract region with partitions using tikz

I want to draw an abstract region with five partitions, where each partition is shaded and labeled differently. An example region (without the shading) would be as follows:
1
vote
0answers
61 views

Is there any tutorial on writing custom tikz decorations?

I'd like to code a new decoration for TikZ. Is there any tutorial, howto, manual or anything on the web, or should I just study the source?
52
votes
4answers
1k views

How can I add stippling to elements of my tikz diagrams?

Okay so I think everyone knows how to draw a sphere in Tikz \tikz{ \fill [black] (-1,-1) rectangle (1,1); \shade [ball color=white] (0,0) circle [radius=1cm]; } But how can I add to it this effect ...
2
votes
1answer
116 views

Tikz - decorations.markings marks location problem

Why blue and red lines don't fit the black line, and why are they overlap each other ? \documentclass[tikz,margin=5pt]{standalone} \usetikzlibrary{calc} \usetikzlibrary{decorations.markings} \...
1
vote
1answer
65 views

How to correct tikz '\draw' location by hand?

I want to make a brace to the right of two nodes but I don't want it to be attached to but I want some extra space. For the starting location my solution seems to work well but for some reason the ...
1
vote
2answers
296 views

Drawing a picture in texmaker showing decorations errors

Here is the code that I want to use in Tex Maker. \documentclass[12pt]{report} \usepackage{amssymb} \usepackage{amsmath} \usepackage{tikz} \usepackage{pgf} \usetikzlibrary{decorations} \begin{...
3
votes
1answer
98 views

Additional parallel paths and “shorten”

A while ago, I have stumbled upon a very nice solution for parallel paths drawn with TikZ, which can be found here: Draw additional parallel paths in TikZ. However, when trying to use this for my ...
1
vote
0answers
126 views

TikZ: correct position for arrowhead when using partway modifiers

My question is a more complicated case of this one. I am trying to make the arrowhead of an arrow decorated with snake be well-centered, but using the solution suggested in the other question causes ...
2
votes
2answers
133 views

How to get decoration text to be right side up instead of upside down

I am drawing arrows in a block diagram and using decorations.text to label them. Arrows going left to right are fine: the labels are upright. But arrows going right to left are appearing upside down. ...
1
vote
0answers
62 views

enumeration lists with special decorations

Within an enumerated list, I would like some "meta"-level annotations: Mark a single, specific item in boldface, or another colour, or have an arrow point at it from the left margin, or surround it ...
4
votes
1answer
488 views

Chapter title with decorative separator [duplicate]

Where can I find the decorative separator pictured here? I want to add it to the (nearly complete) chapter title below. Note: the program I use (Latexian) has the most common packages installed, ...
2
votes
1answer
136 views

drawing snake decoration in a box tikz

I am trying to draw some snake decorations in a box using tikz library but couldn't achieve what I want. Why there is mis-alignment between the actual markings and the snakes. I am using the following ...
3
votes
2answers
168 views

Adding arrows to rectangles in TikZ

Is it possible to decorate rectangles with arrows? I used: \node [draw,rectangle,minimum width=4cm,minimum height=4cm](r){}; But then it is really difficult to line up an edge so that it's level ...
9
votes
1answer
426 views

TikZ decoration to draw a winding or twisting ribbon

I enjoy TikZ styles and decorations a lot, but I still dabble with them. I know how to draw ribbons with a style, if they aren't meant to twist. But I'd like to define a style that has a twist of the ...
6
votes
1answer
466 views

Pgfplots: plot text along function

I want to illustrate a material model, especially the identical loading and unloading path, which are illustrated via arrows that follow the material model in the following picture. I want to put ...
2
votes
1answer
60 views

How can I use a variable from xstring with the text along path decoration from tikz?

Issue How can I get proper text expansion for text=\somevariable in a tikz text decoration. I think I have an expansion problem here. Set \releasedate Extract year from \releasedate in \...
2
votes
1answer
1k views

How can I set the position of text along path in tikz more precisely?

Explanation It seems that nodes can be carefully placed on paths using pos=.25 (i.e. 25% from node BEGIN to node END) when using -- syntax (see Example A). Problem I cannot have the same precision ...
5
votes
1answer
261 views

How to add arrows near the plot path and fill the area under this path?

I'd like to draw a closed plot path filled with pattern and surrounded by arrows: When I used @Jake's solution to add arrows (Decorate a path with little arrows parallel to it) then the pattern ...
1
vote
0answers
99 views

Solved: border decoration produces an additional but displaced arrow tip [closed]

I would like to use decorated paths with arrow heads. But if I use the border decoration, something happens with the arrow tip positioning: \documentclass{article} \usepackage{tikz,amsmath, amssymb,...
-1
votes
1answer
335 views

Fractals in TikZ [closed]

How to draw a shape like below using fractals in tikZ?
2
votes
1answer
168 views

A random, smooth ellipse in TikZ

I've tried to do a random, smooth ellipse in TikZ with decorations and I came up with something similar like this, but the endpoints don't match: \documentclass{article} \usepackage{tikz} \...
7
votes
3answers
723 views

Position arrow decoration by center, not by tip

I have lots of curves, each of which I would like to decorate with an arrow precisely at the centre. Here is a simple attempt to do this with TikZ: \documentclass{article} \usepackage{tikz} \...
4
votes
1answer
349 views

TikZ crosses-decoration does not work

When trying to compile the examples from the manual like \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \tikz \fill [decorate,decoration={crosses}...
5
votes
1answer
173 views

How do I use the `every character` key in tikz decorations?

Assuming I have the following MWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.text} \begin{document} \begin{tikzpicture}[node distance=5cm] \node[draw, rectangle] (a) ...
3
votes
2answers
137 views

\texttt in decoration causes LaTeX to hang

I have the following code: \documentclass{standalone} \usepackage{tikz} \begin{document} \usetikzlibrary{decorations.text} \begin{tikzpicture} \path [->,decorate,decoration={raise=-5pt, text ...
4
votes
1answer
190 views

Beamer uncover decoration bug

\documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{pgf,tikz} \usepackage{tikz} \begin{document} \frame{ \usetikzlibrary{decorations.pathmorphing} \tikzstyle{kringel}=[decoration={random ...
4
votes
1answer
296 views

outline a plotted graph?

To outline a path in white, one usually the draw the path larger and fill it in white, then copies the original path filled in black over it. This is to better separate it from the background. But ...
2
votes
2answers
2k views

draw round/rectangular bracket embracing nodes in tikz

I know how to draw a curly bracket with the following code: \draw[decorate,decoration={brace,amplitude=5},-] (0.8,-0.75) -- (0.8,0.75); But now I want to draw a round bracket, or a rectangular one. ...
1
vote
2answers
222 views

mdframed, TikZ and zigzag decoration [duplicate]

I would like to have a zigzag decoration around a box created with mdframed. Minimal example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \usepackage[...