Questions tagged [decorations]

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

Filter by
Sorted by
Tagged with
6
votes
1answer
455 views

Text decoration in TikZ when the text is longer that the path

I have a couple of questions about text decoration in tikz when the text is longer than the path to decorate: Why doesn't the decoration begin at the beginning of the line (whereas it is correctly ...
2
votes
1answer
101 views

Adjusting arrow head to swallow a path

I'm making a network diagram with shaped arrows that go the whole length of the path, rather than just being a line with an arrow on the end. Because the bend option is so easy to use, I chose to do ...
4
votes
2answers
548 views

Using path options to set color for a custom shading

I'm using a custom shading to make cylindrical bars. The shading uses a color that is defined in the color list. I can change the color by using a \colorlet expression. But I'd like to be able to ...
4
votes
3answers
178 views

Setting order of decorations on a path

I'm trying to make paths that are shaded to as to appear as cylinders with spherical ends. I've found a way to do this with decorations. I use vertical shading on rectangles for the path segments, ...
7
votes
1answer
857 views

Custom line style with custom decoration

I want to create a flanged version of 3D pipes that look like the picture in the original post. My "brute force" attempt goes as follows: \documentclass[tikz]{standalone} \begin{document} \begin{...
1
vote
1answer
165 views

Annotating picture using tikz; decoration disappears above certain picture width?

I'm trying to annotate a picture using tikz. Somehow though there's some behavior that I do not understand. I draw a decoration at the end of the annotation line that is no more than a circle. The ...
2
votes
0answers
324 views

Integral too big [closed]

Integral become too big. Code: \documentclass[10pt,a4paper]{article} \usepackage{cmap} \usepackage[T2A]{fontenc} \usepackage[utf8]{inputenc} \usepackage[russian,english]{babel} \...
6
votes
1answer
693 views

How to decorate a segment of a filled path in TikZ?

I would like the straight segment be a zigzag decoration: Here's my mwe: \documentclass[tikz, preview=true]{standalone} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{...
0
votes
1answer
3k views

Draw a decorative line thin - thick - thin [duplicate]

Does anybody know how you can draw a line, that starts very thin and then gets thick to the middle and then thin again? I hope this is clear because I cannot produce a minimal example here. I think ...
2
votes
1answer
447 views

TikZ - Style for arrow with midpoint decorator

I am creating a kind of commutative diagram with different types of arrows. So far, I have defined different line styles for my different types of map, like this: \tikzstyle{map}=[->,>=stealth',...
3
votes
1answer
223 views

How can I have decorations also appearing in the legend?

I am trying to use decorations to add markers to some lines. The reason for using decorations, rather than simply markers, is that the data points I'm plotting are very dense: filtering them ...
3
votes
2answers
1k views

Truncate tikz snake decoration without changing frequency

I would like to draw a diagram of a wave penetrating a body, well several bodies. Or in some cases appear to go through a hollow cylinder. Since all of this is projected onto a 2d plane, this effect ...
5
votes
1answer
998 views

How to draw path of contour integral enclosing imaginary axis

I have practically no experience with Tikz but was able to piece together this diagram of a contour integral enclosing the imaginary axis. It was produced with this code. \documentclass[tikz,...
3
votes
1answer
217 views

decorations.markings: hiding the path behind

I am drawing a chain (of the metal type) using the decorations.markings library but have a couple of problems: I'd like to remove the path behind the chain. I can't set the color of the path to hide ...
6
votes
2answers
835 views

Tikz decorations inheriting styles?

Is there any way to control whether the paths drawn by tikz path replacing inherit the styles of the original path? In trying to answer this question, I noticed that the thickness is (by default) not ...
5
votes
0answers
571 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 ...
4
votes
2answers
893 views

Draw a line under a figure that match the figure lentgh

I am using a line under a figure to make it more aesthetic. I am having a problem with matching the line length with the figure length. Here's a MWE. \documentclass{article} \usepackage[utf8]{...
0
votes
2answers
2k views

Fit decoRule to picture lentgh

I am using decoRule to draw a line under my figure and before the caption. I would like to have this line with the same lenght of my picture. the code I am using is the following: \begin{figure} \...
17
votes
4answers
3k views

Rectanglar cloud shaped node in TikZ

I am trying to make an automatically scaling rectangular cloud shape around a node in TikZ. The first attempt below gives a cloud shaped like an ellipse, but I don't like that. I would like it to be ...
2
votes
1answer
91 views

Tikz decoration.tex library broke my plots

I have an plot like this: \documentclass[]{standalone} %\usepackage{tikz} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{decorations.text} \usetikzlibrary{intersections} \begin{...
6
votes
1answer
518 views

How to match the corners of a decorated rectangle in tikz

This may look duplicate but I'm trying to draw a specific bump-decorated rectangle for an invitation card on the basis of the following picture: So, I've been using the decoration library of tikz, ...
1
vote
2answers
148 views

parallel tables and in-between lines

How can I create the following table? Actually, it includes 2 tables and some lines connecting to cells each time. \documentclass{standalone} \usepackage[english,greek]{babel} \usepackage{ucs} \...
1
vote
1answer
203 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
541 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
91 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
920 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. ...
4
votes
2answers
296 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
1answer
178 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
186 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 (...
5
votes
1answer
527 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
283 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/...
4
votes
1answer
582 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 ...
1
vote
1answer
535 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[paper=...
1
vote
0answers
85 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} \...
2
votes
1answer
157 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); \...
3
votes
1answer
883 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 ...
2
votes
0answers
173 views

Problem with decorations in a small TikZ picture [closed]

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 too ...
2
votes
1answer
193 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, ...
7
votes
2answers
653 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={...
8
votes
1answer
461 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
363 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={...
11
votes
2answers
604 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 ...
7
votes
1answer
1k 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
171 views

Is there any tutorial on writing custom tikz decorations? [closed]

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?
73
votes
4answers
3k 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
334 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} \begin{...
1
vote
1answer
99 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
619 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
195 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
366 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 ...