Questions tagged [pgf-decorations]

{pgf-decorations} concerns the capability to decorate (sub)paths in the TikZ-pgf package

Filter by
Sorted by
Tagged with
5 votes
2 answers
320 views

How to evenly substitute each side of a regular pentagon with five circles?

This is an extension of the question. Thanks for the tips from the user Qrrbrbirlbel. I would like to evenly substitute each side of a regular pentagon with five circles. I decided to use decorations,...
licheng's user avatar
  • 773
2 votes
2 answers
99 views

Decorate path and its edges with pathmorphing decoration

I'd like to define a TikZ style that applies a path morphing decoration to a path as well every of its edges, just like the dashed style is applied to all edges. Here's my code: \documentclass[tikz]{...
Andi Bauer's user avatar
1 vote
1 answer
99 views

pgfplot: Fill between while including decoration function

I am trying to fill between area for a specific plot within a groupplot environment. I have already tried to follow the pgfplot manual which is pretty clear with respect to the name path abd \path[] .....
otiuuaugusto's user avatar
1 vote
1 answer
249 views

Remove ticks from axes and draw arrows on arcs

Question: Once you compile my codes, you will find the output like above pic. My question is whatever I made change manually with red color, How can I achieve that? Second question how to remove ticks ...
Math-Man's user avatar
  • 2,713
10 votes
3 answers
484 views

Adding small arcs to a path in specific places

I have a path consisting of a series of straight lines and arcs, and now I would like to modify that path by replacing some segments of the line/the arc with another small arc whose centre is on the ...
Manuel Eberl's user avatar
0 votes
1 answer
117 views

How to set default decorator options in e.g. a tikzset?

I am putting labels on top of photos. Some labels are curved, to follow features in the image. I am calling the labels from a tikzset, as I am using the same photo multiple times. The example below ...
user2821's user avatar
  • 230
1 vote
2 answers
97 views

How to decorate 2 paths in the same graph?

There is a graph made of two addplot commands But the arrows must be in the same direction (the way of the top one), and the axis are gone (or made transparent). The two sections are two separate ...
riccs_0x's user avatar
  • 1,087
1 vote
2 answers
169 views

Decoration for self crossing lines/curves

Is it possible to define a decoration/postaction, for drawing a double line so that a self intersecting line will draw on top of itself? To show what I mean see these spirals: \documentclass[tikz, ...
hpekristiansen's user avatar
1 vote
1 answer
61 views

Decoration combining random steps and normal vectors

I am trying to decorate a path using random steps and direction, and also draw normal arrows on each segment. I am facing multiple problems: The random part alone works well, but in order to draw ...
user408672's user avatar
5 votes
2 answers
562 views

Plot decorated arrows in pgf?

Problematic I'd like to display a simple continuous graph and a set of vertical arrows whose height follow the shape of a function. The following diagram of flows in TikZ has this decoration \...
JeT's user avatar
  • 2,808
1 vote
1 answer
153 views

Fill under a fractal curve

I am creating a class that I will use for my notes and, as the front page, I intended to have a fractal running through the diagonal of the page and the two parts created by the path, filled with ...
gjkf's user avatar
  • 585
1 vote
1 answer
122 views

Plot the difference between two bezier curves

I have the following code to plot two parabola-like "functions": \begin{tikzpicture}[ remember picture, overlay ] \tikzmath{ \w = 4; \yVs0 = 2; \yVsl = 1; \yVsf = 3; \...
space_voyager's user avatar
2 votes
1 answer
109 views

PGF decorations not working

I am trying to use the following custom pgfdecoration to draw bonds with varying length of the double bond while using chemfig. The code was obtained from the following link: How to alter the bond ...
scorpionwars's user avatar
2 votes
2 answers
287 views

Tikz: name path gets lost when using markings decoration

I am trying to draw an arrowhead inside a curved path named uu that is crossed by a vertical line named vert, and two nodes placed at the intersections of these two paths. Here is my minimal example: ...
user8268's user avatar
  • 259
2 votes
2 answers
1k views

TikZ: How to decorate one or more rectangle sides?

How can I change the left and the right line of a rectangle to 'zigzag'? \documentclass[margin=5pt, tikz]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} \...
cis's user avatar
  • 7,857
3 votes
1 answer
151 views

Why is standalone ignoring tikz decorations.text?

Consider this example: \documentclass{standalone} %\documentclass[margin=1cm]{standalone} ...
Viesturs's user avatar
  • 7,795
1 vote
1 answer
365 views

centre text exactly on an exactly specified point on path

I would like to place text exactly centred over an exactly specified point on a highly complex path as shown in this Figure: I have developed my example by specifying the point at 0.1 from the ...
Viesturs's user avatar
  • 7,795
2 votes
1 answer
527 views

place mark on a specified point along path

I would like to place a mark on a highly complex path: The mark should be at exactly 0.1 from beginning: I try: \documentclass[border=1cm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations....
Viesturs's user avatar
  • 7,795
3 votes
1 answer
117 views

Dimension too large in pgfplots when using decoration

I have a set of points that are not evenly distributed. I found this post that's supposed to do exactly what I want, but when I try to use it for my problem I get a Dimension too large error and I don'...
aaragon's user avatar
  • 3,041
6 votes
1 answer
313 views

Tikz: ugly decorations on closed objects at merge point

When I use a decoration on objects that are closed, the merge point is usually ugly. The same problems also appears with arrows, even with the pre option: sometimes the zigzag stops "close" to the ...
tobiasBora's user avatar
  • 8,381
3 votes
1 answer
129 views

tikz-decoration: How do I use "is input segment is closepath=< options>"?

In the answer to this question TikZ decorations: How to draw a closed path little by little? @marmot uses this option of the decoration automaton in a way that I don't understand very well but that ...
AndréC's user avatar
  • 23.8k
8 votes
2 answers
574 views

Shortening and decorating a path

Placing an arrow as decoration on a path which has been shortened leads to a misplacement of the arrow. This is potentially emphasized if the looseness key has been used. In this other question (and ...
Axel Krypton's user avatar
  • 1,083
3 votes
2 answers
153 views

How do I make a separation mark in Turkish proofreading?

I am making a proofreading mark. MWE \documentclass[12pt]{article} \usepackage{amssymb,mathtools} \begin{document} Electricheater % to be separately written Electri$\underline{c}$/$\overline{h}$...
Özgür's user avatar
  • 3,270
4 votes
0 answers
70 views

No decoration is dropped when the total length of the decoration list exceeds the length of the input path (a possible bug)

Just want to run this by the good people of tex.stackexchange before I submit this as a bug. Consider the following LaTeX manuscript featuring a pgf picture of a 2cm long horizontal line that is ...
Evan Aad's user avatar
  • 11k
1 vote
1 answer
148 views

What is an 'input segment' in the context of PGF decorations?

Regarding PGF decorations, consider the two dimensions with the catchy names (p. 1001 of the TikZ & PGF manual for version 3.0.1a) \pgfdecoratedinputsegmentremainingdistance ... The remaining ...
Evan Aad's user avatar
  • 11k
13 votes
3 answers
1k views

Making custom Koch decoration with angle parameter in Tikz

So I'm trying to draw a fractal similar to the Koch Snowflake, so I want to define my own decoration that does the same thing but lets you specify the angle. For example in this picture the angle is ...
base12's user avatar
  • 133
1 vote
1 answer
210 views

Disappearing lines and misplaced rotated arrowheads

The issue is illustrated in the below MWE (and the full preamble we have used is in the comment at the end). When the curly brace decorations have been added, the original lines disappeared and their ...
ajeh's user avatar
  • 2,562
7 votes
0 answers
823 views

balance pre-length and post-length

In Can TikZ dashed lines emulate PSTricks dashed lines?, @Dominic asked if one can balance the dash pattern so that an ant living on the curve cannot distinguish the two ends. Same problem arise ...
Symbol 1's user avatar
  • 36.8k
3 votes
1 answer
2k views

PGFplot: Adding a single marker to a graph (while keeping the marker symbol in the legend)

What I want: I want a single marker per graph. EDIT: .. and I want it in the legend, too, of course. I've got my plots, however, for the plots that include several graphs (that are colour-coded at ...
pogo-otter's user avatar
4 votes
2 answers
744 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 ...
kromuchi's user avatar
  • 2,177
7 votes
1 answer
199 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 ...
Brett's user avatar
  • 276
7 votes
1 answer
298 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 (...
Brett's user avatar
  • 276
7 votes
2 answers
659 views

TikZ/PGF decoration that adds noise only to y coordinate

I'm trying to come up with a PGF decoration that adds pseudo-random noise to the y coordinates of a path, while leaving x coordinates the same. The idea is that if I'm drawing a function y=f(x), this ...
user3188445's user avatar
9 votes
1 answer
2k 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:
Shambo's user avatar
  • 201
5 votes
2 answers
195 views

How can I access the value of `\pgfdecoratedpathlength` for use later in the document?

Is there anyway that during the decoration process I can save the value of \pgfdecoratedpathlength to some macro (via xdef or some other mechanism)?
A.Ellett's user avatar
  • 50.4k
3 votes
1 answer
216 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 ...
carsten's user avatar
  • 2,956
6 votes
1 answer
718 views

Putting repeated symbols along a path with decorations?

I have a drawing of a curved-plate capacitor: \documentclass[]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[ ...
Rmano's user avatar
  • 40.3k
5 votes
1 answer
157 views

Ignoring rotation in pgf decorations

Edit: I am interested in how this problem could or could not be solved using pgf decorations, not in how to draw this specific shape. I am trying to use pgf line decorations to draw dotted lines, ...
Brian's user avatar
  • 619
7 votes
4 answers
2k views

Horizontal brace above another brace + node in TikZ

In the following MWE, I've put a brace over the subordinate clause that he knows with a node Subordinate clause above the brace. Now I want to put a brace over the full sentence (the main clause) with ...
Sverre's user avatar
  • 20.7k
2 votes
1 answer
814 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} \...
Turion's user avatar
  • 4,592
14 votes
4 answers
3k 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} \...
Jamie Vicary's user avatar
2 votes
1 answer
299 views

How to improve a path with tikz decorations?

I am a beginner in LaTeX, trying to draw a series of sketches, close to engineering drawings, in order to illustrate the equations governing the constriction resistance of two pieces of metal pushed ...
Yves's user avatar
  • 2,825
5 votes
1 answer
265 views

pgf path decoration with corners awareness

I try to create pgf decoration that will be able to tell in each segment whether the its start is a sharp corner on the input path, but I can't figure how to do this. Take for example the following ...
Ido H.'s user avatar
  • 75
4 votes
1 answer
2k 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}...
oarfish's user avatar
  • 1,419
5 votes
1 answer
498 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) ...
oarfish's user avatar
  • 1,419
8 votes
1 answer
3k views

Tikz path with changing color and arrow decorations

How does one draw a path that is changing color as a function of the path length and is decorated with arrows at the same time? Basically, I want to combine these to figure into one: The code for the ...
Daniel's user avatar
  • 493
3 votes
2 answers
370 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 ...
oarfish's user avatar
  • 1,419
3 votes
1 answer
1k views

TikZ : let ... Could not parse this coordinate?

I don't understand why ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{% alamain/.style={% decoration={show path ...
Tarass's user avatar
  • 16.9k
4 votes
1 answer
412 views

How to append style with decorations.pathreplacing?

\documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{alamain/.style={% decoration={show path construction,% lineto code={ ...
Tarass's user avatar
  • 16.9k
3 votes
1 answer
1k views

TikZ decorations.pathreplacing and lineto curve ignored

Why the decoration option is ignored ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing} \tikzset{alamain/.style={% decoration={% lineto code={ \...
Tarass's user avatar
  • 16.9k