Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-shape]

For questions concerning node shapes in PGF/TikZ.

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?
13
votes
1answer
765 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
200 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
494 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
333 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
696 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
1answer
101 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)--(...
7
votes
2answers
931 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
312 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
502 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
481 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
2answers
607 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
2answers
163 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} \...
5
votes
3answers
115 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
2answers
110 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}...
5
votes
1answer
743 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
291 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
2answers
417 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, ...
5
votes
1answer
148 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
445 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
3answers
757 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
563 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
111 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
99 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
86 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 ...
4
votes
2answers
534 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
1answer
156 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
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
461 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
687 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
188 views

Ellipses aligned on the same boundary point

I want to create a cascade of ellipses in TikZ. However, with my code, I get the ellipses to have the same center. But what I instead want, is that the ellipses have a common point on their boundary (...
3
votes
2answers
643 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
337 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
397 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
930 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
1answer
662 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
71 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
199 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
158 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
393 views

Text has been reflected in 3D plot

It seems that the text xz on the x-z plane of the 3D figure below has been reflected. How to make it normal, just like yz on the y-z plane? Editable Read-only code on ShareLaTeX \documentclass{...
3
votes
1answer
205 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
68 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
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 ...
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
502 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
229 views

Using \pgfpointanchor in the background path of a circuit symbol shape

I have tried to create a circuit symbol for general sources as used in physics textbooks for high schools: \documentclass{article} \usepackage{tikz} \usetikzlibrary{circuits.ee.IEC,shapes.gates.ee} \...