Questions tagged [tikz-shape]

For questions concerning node shapes in PGF/TikZ.

Filter by
Sorted by
Tagged with
29
votes
4answers
4k views

TiKZ: “hand-drawn” explosion

Is there an elegant way to simulate a handdrawn explosion as shown in the following image using tikz?
14
votes
1answer
796 views

Tightly fit a circle around points

When using \node[circle, fit=(A) (B) (C)], the resulting circle is too big and doesn't touch the corners of the C node: \documentclass{article} \usepackage{tikz} \usetikzlibrary{fit} \begin{document} ...
13
votes
1answer
216 views

Passing special characters to “shorthand” x+y options in TikZ

Update: this is now a bug report on sf.net. I think I understand the rules for special characters in pgfkeys key arguments: If it contains any of {,, =, ]}, it must be protected by putting the entire ...
11
votes
1answer
529 views

Tikz - Filling a node with random smooth, closed shapes

I am trying to create the following illustration. Using Tikz, I managed to achieve a partial effect as shown below (please ignore the dimension mismatches). The code I used (MWE) for arriving thus ...
9
votes
2answers
4k views

Defining a new node shape for an electronic multiplexer

I found this question which suggests making a multiplexer symbol with this path: (0,0) -- (1,-0.5) -- (1,-1.25) -- (1.3,-1.25) -- (1,-1.25)-- (1,-2) -- (0,-2.5) -- (0,-1.75) -- (-0.3,-1.75) -- (0,-1....
9
votes
1answer
349 views

How can I draw my own parametrized shapes?

I would like to create some nodes having a parametrized shape to create some schematic vehicles shown in the picture below. The picture shows a hierachical representation of a vehicle chassis platform....
8
votes
1answer
718 views

Easy way to draw ribbon

I would like to get ribbon like the one shown in the picture, with text inside it . Is there an easy way to do this using Tikz or other latex packages, thanks in advance.
8
votes
1answer
2k views

Concentric Cylinders with tikz

I am trying to draw two concentric cylinders with tikz to show the change in volume with respect to radius, while the height remains fixed. The left ilustration below is the first drawing, where the ...
7
votes
2answers
1k views

How to create a rectangle with a transparent hole [duplicate]

I have an issue involving filling a rectangle, although, this is probably quite a simple problem, this has compeletly stumped me... I know how to draw a rectangle for a given colour and a circle ...
7
votes
1answer
317 views

Shape missing using pic in TikZ

Why the shape (sB) is unknown in the following code ? How to avoid this ? \documentclass[]{standalone} \usepackage{tikz,xparse} \usetikzlibrary{calc} \tikzset{pics/.cd, % Marque croix Cross/....
7
votes
1answer
520 views

How to position a custom anchor in a custom TikZ shape?

I want to draw a "system dynamics" flow chart, roughly looking like this random image. The dark grey valve-like boxes are for rates, while the grey rectangles are for levels. I managed to define a ...
6
votes
11answers
2k views

How do I make a square and label each corner with a number?

I am trying to make a square to demonstrate how reflections and rotations work, so I would like a square with each interior vertex labeled with a number.
6
votes
4answers
530 views

Set endpoint of arrows in tikz

I have the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{chains,shapes.multipart} \usetikzlibrary{shapes,calc} \usetikzlibrary{automata,arrows,shapes,snakes,automata,...
6
votes
1answer
111 views

How to adjust arrow head size of arrow-node?

I am trying to use single arrow node from shapes.arrows TikZ library. The problem is with the proper adjustment of the arrow tip span - with the argument single arrow head extend. MWE: \documentclass{...
6
votes
1answer
146 views

TikZ node shape depends on inside text

In one of my previous answers, my first proposal \documentclass[tikz]{standalone} \usetikzlibrary{quotes,angles} \begin{document} \begin{tikzpicture} \draw (0,-4)--(0,4) node[above] {$Im$} (-4,0)--(...
6
votes
2answers
613 views

Why triangle's corners are sticking out instead of aligning perfectly with adjacent triangles?

So I drew a few isosceles triangles aligned to each other with one being upside down but that upside down triangle created unwanted behavior (its corners started sticking out of line). All these ...
5
votes
3answers
134 views

Colorize sides regular polygon

To illustrate what edge-coloring is, I'd like to colorize a regular polygon. I want to generate the shape using TikZ, then colorize the sides (edges) of the polygon separately, for instance by doing ...
5
votes
1answer
774 views

tikz drawing a partitioned rectangle

I would like to draw the following figure, but I don't even know where to begin. This goes far beyond my tikz expertise. If anyone can help, I would appreciate it very much. Here is a skeleton code to ...
5
votes
1answer
322 views

How to make triangle tightly (no space) enclose other triangles using “fit”?

I am trying, so far with negative result, to enclose a couple of triangles in a bigger triangle without leaving any space between them. Output (dashed green line I drew by hand; this is where I need ...
5
votes
1answer
151 views

Hexagonal Card creation from what level up?

I am trying to build a base on which to create hexagonally shaped cards, there a few questions I've found here that have been helpful but I'm searching for my own answers, while more importantly ...
5
votes
1answer
2k views

LaTeX TikZ: arrow shape

I am facing a problem I can't solve on my own. The goal is to draw an arrow with a "breaking" line like this (BUT with an arrow): \documentclass[tikz,border=2mm]{standalone} \tikzset{ext/.pic={ \path ...
4
votes
3answers
468 views

How to draw a request response message in tikz?

I am pretty new to tikz. I need a request response message in tikz. I have attached the image. I need the image should be generated as shown in the attached figure. I have tried a lot, but struck in ...
4
votes
2answers
194 views

hrule into tikz circle node

I am struggling with inner node layout with Tikz. Basically, I want to add a line under the first text line inside a node, splitting it unevenly. Here is a try: \documentclass{standalone} \...
4
votes
3answers
791 views

tikzpicture: “rounded corners” and “west arc=none”

here's my MWE: \documentclass[a5paper]{book} \usepackage{tikz} \usetikzlibrary{positioning,shapes.misc,calc} \begin{document} \begin{tikzpicture}[overlay,remember picture] \node[ ...
4
votes
1answer
599 views

fill polygon with image / crop image by polygon

I would like to have an arbitrary polygon filled with an image (jpg, png, pdf, ...) for it to be included in a beamer frame. I was thinking this may be possible using tikz, but I couldn't figure it ...
4
votes
2answers
122 views

How do I draw and define two right triangles next to each other?

My goal is to draw a figure exactly like this The best I could do coding this was: \documentclass{article} \usepackage{amsmath,amsfonts,amssymb} \usepackage{tikz} \usepackage{float} \begin{document}...
4
votes
2answers
140 views

TikZ: Coordinate on shape vertices

I know that I can draw a rectangle with tikz using \draw (0.0,0.0) rectangle (1.0,1.0);. Is there a possibility to determine all 4 edge coordinates directly from the shape? I do can save the lower ...
4
votes
2answers
109 views

Flowchart in tikz

I am completely new in tikz package and try to built a flowchart as on the picture. I made some attempts but with no succes. Could you give me a hint how to start to produce such flowchart? Thanks ...
4
votes
2answers
595 views

problems with ellipse TikZ

I'm working on a mac, I use the package TikZ and it works. But I have problems when I want use ellipse or diamond ex : \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} ...
4
votes
2answers
457 views

Multipart shapes, left/right align text in node

Please, consider the following MWE: \documentclass[preview,border=3mm,tikz]{standalone} \usetikzlibrary{shapes.multipart} \tikzset{% base/.style args={#1/#2/#3}{% shape=rectangle split, ...
4
votes
1answer
162 views

How to correctly use the .is if handler within \pgfdeclareshape

There is an update, see below I'm designing mosfet symbols, which should be able to be flipped. The important thing about flipping is that the relative positioning with the positioning library should ...
4
votes
1answer
90 views

Adding introspection to TikZ/pgf shapes

After digging into the output of \tracingmacros=1 during a while, I'll ask here... I am trying to add a bit of introspection to pgf shapes. The idea is to be able to "extract" a \savedmacro of a shape....
4
votes
1answer
1k views

Trapezium size issues Tikz

I have a code that generates a flow chart. It's not entirely complete, it just needs arrows which is besides everything. This issue I have is the process nodes, trapeziums, aren't the same size even ...
4
votes
0answers
474 views

Arrow box aligment

I have to align vertically "arrow boxes" in the picture below? So I have two questions: How to read "inner sep" register value and bounding as well connecting lines thickness register values of ...
3
votes
3answers
709 views

Split rectangle with gaps

The rectangle split from the shapes.multipart can produce rectangles tightly stacked. \documentclass[tikz]{standalone} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture} \node[ ...
3
votes
2answers
670 views

Drawing a quarter closed contour in tikz

I am trying to draw the below: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[decoration={markings, mark=at position 0.5cm with ...
3
votes
2answers
340 views

Name of shapes defined in an array

I am trying to use labels defined in an array using tikz for drawing a path between two shapes. I have tried to use pgfmathparse but it seems not well defined for string. My syntax is probably wrong. ...
3
votes
2answers
434 views

Matching the text background color in tikz with the background color of a presentation slide

I created a polygon using tikz package. I need to change the background color for my text to match with the background color of the slide. I'm attaching the photo. \begin{figure} [H] \begin{center} \...
3
votes
1answer
957 views

Are there “draw split” keys for other split shapes besides the rectangle split?

The TikZ rectangle shape has a draw split key "/pgf/rectangle split draw splits=boolean" but in the TikZ manual there is no reference of similar keys for the: circle split, ellipse slipt, circle ...
3
votes
2answers
100 views

tikz: positioning of ellipse

please consider the following mwe: \documentclass[tikz, margin=3mm]{standalone} \usetikzlibrary{positioning, shapes} \begin{document} \begin{tikzpicture}[ node distance = 3mm ...
3
votes
1answer
690 views

How can I draw an “arrow box” with curved arrows in tikz?

Tikz has a special shape called "arrow box". It is a box with arrows going out of it directly. But how can we change the direction of arrows in this shape? In fact, I need to draw an "arrow box" with ...
3
votes
1answer
54 views

Custom tikz shapes: High level alternative to \pgfdeclareshape

So I've been researching making own shapes in TikZ. As most things in LaTeX, I've come to learn, it seems to have an extremely deep rabbit hole. So I was wondering - is there an easy way out? Is it ...
3
votes
1answer
76 views

TIKZ make trapez shape with text with a fixed size

I try making a simple trapez like shape using the TikZ shape library. The text inside the shape differs from its length. However, the shape should be as big as the shape with the longest text so all ...
3
votes
1answer
225 views

Draw a balance with a pivot and two pans

I am going to draw a balance with a pivot (the triangle) and two pans (the T bars), as shown in the figure below. However, I was only able to draw the triangle, following this post. How to draw the ...
3
votes
1answer
165 views

Animation with math crossed out or circled

I'm trying to make an animation to show how to find the median of a small list of numbers. As I would incorporate it into a presentation, I used beamer frames, but I'm open to alternatives. I used ...
3
votes
1answer
237 views

Shape of walking man in tikz

Does TikZ contain some library with arbitrary shapes of men? I need something like that I was downloaded SVG from here and try to use \usetikzlibrary{svg.path} but unfortunately it divided into three ...
3
votes
1answer
75 views

Defining a tikz-shape for block mode diagrams

What I want to do I want to draw diagrams of operation modes of block ciphers like this one of the ECB mode. I did this before without defining shapes for particular parts of the diagram. However, ...
3
votes
1answer
1k views

Tikz, no shape named is known error

I am trying to compile following MWE \documentclass[border=9 pt]{standalone} \usepackage{epsfig,graphicx,tikz} \usepackage{standalone} \usetikzlibrary{intersections} \usepackage{pgfplots} \usepackage{...
3
votes
1answer
539 views

Load custom TikZ nodes from an SVG file?

I want to use custom nodes in TikZ, with shapes loaded (or otherwise converted) from an SVG file because I don't have enough time to learn pgf to draw the shapes I want. How can I do that?
3
votes
1answer
71 views

Moving axis onto diagram

I'm trying to draw a light cone diagram and would like for a time axis and a spatial axis to be overlaid over the top of the diagram I already have. I'd also like to add directional arrows on both ...