TikZ is a higher-level drawing language built on top of the PGF graphics framework. For questions specifically about the PGF layer use {pgf-core} instead. Both tags are possible on the same question. The tag {diagrams} is also compatible with this tag.

learn more… | top users | synonyms (3)

1
vote
0answers
772 views

How do I add a soft/fuzzy/gradient drop shadow to a node? [duplicate]

Possible Duplicate: Faded drop-shadow using tikz-based rounded rectangle? I would like to add a soft drop shadow to this node (holding text): ...
9
votes
3answers
444 views

Why doesn't ellipse (\p and 1) work?

\documentclass{article} \usepackage{tikz} \begin{document} % DOES NOT WORK %\tikz \foreach \p in {1,2,...,3} \draw (\p,0) ellipse (\p and 1); %WORKS \tikz \foreach \p in {1,2,...,3} \draw (\p,0) ...
30
votes
4answers
12k views

Node shapes in TikZ

I want to draw a block diagram for a software app and I need two shapes which I couldn't find on the Internet. The shapes are a parallelogram and a rectangle with double side margins. One is for data ...
11
votes
3answers
13k views

Left alignment in TikZ

I'm not able to align the text left. \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning} \newcommand{\altura}{.45cm} \begin{document} \begin{tikzpicture}[x=1cm, y=-\altura, node ...
9
votes
1answer
2k views

TikZ chains etc: modify automatic node placement

I’m trying to draw a chain, roughly like: The catch: I want to manually specify the vertical placement of node C, but I still want to use TikZ’s default horizontal placement. Currently, I can only ...
4
votes
1answer
2k views

Accessing individual table elements with pgfplots?

I want to create a plot using a non-standard plot-style that I don't see in the pgfplots manual. It would be nice if I could take advantage of the \pgfplotstableread function and then somehow loop ...
2
votes
2answers
517 views

Is there a reason \pgfmathresult doesn't work as a yshift value?

Here's something mystifying: I've been trying to use a for loop to create several copies of essentially the same picture stacked vertically on top of one another. But when I use \pgfmathresult in the ...
28
votes
4answers
24k views

Define a variable in TikZ

I guess this is a very simple question, but I couldn't find the answer... How can I define a variable in TikZ? I want to have something like, for example: \draw[->] (x1,y1)--(x2,y2); Such that ...
12
votes
4answers
6k views

TikZ (finite) grid with character in each cell

The code \begin{tikzpicture} \draw[step=0.5cm,color=gray] (-1,-1) grid (1,1); \end{tikzpicture} gives me a nice finite 4x4 grid. Now I want to center one character in each cell, how to do this? By ...
11
votes
1answer
909 views

Can I add tikzpictures to pages included with pdfpages

I would like to decorate pages of some pdf documents with tikzpictures. My idea was to include them with pdfpages, and then draw a tikzpicture overlay on top of the page. ...
10
votes
2answers
2k views

Visualize connection between two slanted TikZ scopes

Using TikZ is it possible to draw a connection between the two green rectangles? The idea is to show that the lower green grid is a more detailed view of the upper one. I'm also open to other ideas ;D ...
11
votes
1answer
4k views

Squiggly arrows in tikz

Is it possible to get a path in tikz that looks like \rightsquigarrow?
12
votes
3answers
7k views

TikZ add frame to a picture

I want to add a frame to a picture. i start to draw the picture by tikz. after drawing, it is the time adding frame. now, how can i know the following two points to add the frame, assuming that ...
2
votes
1answer
2k views

Bad math delimiter in tikz tree

I'm trying to diagram an extensive form game using TikZ trees. The following code generates errors at compile time. Specifically, it complains about missing $'s and a bad math delimiter. I've been ...
10
votes
3answers
3k views

How can I save the bounding box of a TikZpicture and use in other TikZpicture

I need 2 different TikZpictures with the same bounding box (the one of the first TikZpicture) because I need a perfect vertical alignment of the subfigures side by side. Please, how can I handle ...
8
votes
3answers
4k views

TikZ change reference point

In TikZ, picture is drew based on the point (0,0). if my whole picture is based on the point, e.g., (20,0)? how can i draw it easily? it is better to transform the reference point from (0,0) to ...
9
votes
2answers
2k views

\tikzexternalize doesn't work with lua code

The following code from the pgf manual compiles fine with lualatex --shell-escape \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzexternalize \begin{document} A simple image ...
1
vote
1answer
3k views

Use TikZ decoration in a scope

Rather than define a single decorator for all lines at the tikzpicture level, I'd like to use scopes to selectively apply certain decorations to certain parts of my drawing. As a minimal example: ...
8
votes
2answers
2k views

Using reference with externalized pgfplot figure

I am currently writing a document with a lot of plots. I draw them with pgfplots. which uses a lot of ressources. To manage that, I use the externalization feature of TikZ. In the file myarticle.tex, ...
4
votes
1answer
1k views

TikZ matrix positioning voodoo with column sep

I have tried many different things and I just can't wrap my head around how to work around the fact that the column sep option to TikZ's \matrix command changes the positioning of the matrix on the ...
18
votes
3answers
7k views

Large braces over several items in an itemize with text by the brace

This question is related to this question: Adding large brace next to body text, but is not a duplicate. I have an itemize in a beamer presentation. I want to put a brace over some of these items. So ...
7
votes
2answers
2k views

TikZ counter and logical comparison

Does TikZ have counter that is similar to for loop in c language and logical comparison? e.g., \foreach \x in {0mm,11.200000mm,...,33.600000mm} { counter++; <== is this possible in tikz ...
4
votes
1answer
1k views

Easy way to do several line styles on one path using TikZ?

I'm drawing a lot of 3D pictures for school using 3D-plot for TikZ. I like it when the lines that are inside or behind an object, eg. the ones that shouldn't be visible to be thinner than the lines ...
5
votes
1answer
1k views

Styling tikz-timing signal lines

I'm using the tikz-timing package and would like to apply either snakes type of styling, or say the double for double lines to signal lines. Consider the example below: \documentclass{article} ...
12
votes
1answer
2k views

Tikz - move/reposition arrow decorations (arrowhead length/size)

I'm trying to build a 'dimension line' macro for Tikz: \documentclass{article} % note: with \documentclass{minimal}, this example fails with: % ! Undefined control sequence. % ...
2
votes
1answer
3k views

Drawing graphs with multiline labels for vertex/edge?

I have been using tikz-graph to draw graphs representing two-part protocols. Now I'd like to add comments to some nodes of the graph (multiline text, to the side of the vertex). I'm not sure how to do ...
7
votes
4answers
3k views

Customizing pdfLaTeX for a particular file with AUCTeX?

I'm trying to use the TikZ 'external' library, available as of PGF 2.10. This requires running pdfLaTeX with the option -shell-escape. I usually run pdfLaTeX from AUCTeX with the option ...
2
votes
1answer
560 views

TikZ option for command or environment

I am learning TikZ. I am wondering where I can find information about options of command or environment. For example, for \draw, you can use \draw[step=0.5], but it also has ...
10
votes
2answers
2k views

TikZ copy command

Does TikZ have a copy command? the copy command means, e.g., I draw a rectangle first, then I draw whatever e.g., circle, writing text etc. in the rectangle. let me define a source object that ...
22
votes
1answer
4k views

TikZ \foreach loop with macro-defined list

I have a small problem with the TikZ \foreach loop whenever the list, over which we loop, is defined my a macro. The following code example will show my problem: \documentclass{scrartcl} ...
4
votes
2answers
1k views

Add label to flowchart nodes

I need to add a "label" to nodes in a flowchart with tikz, preferably in the top left corner. See picture: the text in red is where I need it. This is because each block should have a "label" so I ...
5
votes
2answers
2k views

Calculate maximum of lengths

How can I calculate a maximum of lengths? I am aware of pgfmath's function max(x_1,x_2,...) \documentclass[a4paper,draft]{article} \usepackage{tikz} \pgfmathparse{max(3,4)} \begin{document} ...
6
votes
2answers
1k views

Unable to use external PostScript pictures generated by TikZ

I'm using external EPS from TikZ figures following the suggestions found in "Export eps figures from TikZ". Images are correctly created but when I get the PS of the main document with dvips I can't ...
36
votes
8answers
14k views

What is the easiest way to draw 3D cube with TikZ?

I'm trying to find the easiest way to draw a 3D cube (it's for my UML diagram) with TikZ. Could you please give an example? Like this:
34
votes
6answers
5k views

How can I invert a 'clip' selection within TikZ?

I wish to draw an arc for a reflex angle on the outside of a triangle with coordinates (A), (B) and (C). If I wanted to draw the arc inside the triangle I could use something like \begin{scope} ...
4
votes
1answer
598 views

Figure in the table with Tikz

How do I align a figure Tikz item at the top of the table? Its my result. I need the second alignment.
2
votes
5answers
978 views

Strange problems in 3D-Plots TikZ: Missing parts and axes

compiling the following example in newest MikTeX or TexLive results in strange problems: Have a look at the plot: There are some missing parts and only the z-axis is drawn. Please try to help. ...
18
votes
2answers
854 views

Modifying `*` and `o` style tikz arrows so that they are centered at the end of line

I would like to use tikz * and o arrows to indicate included/excluded endpoints in plots of piecewise functions, like for example the following one: However, it seems that tikz always aligns the ...
4
votes
1answer
600 views

Are there any Windows-based Graphical editors for \pgfdeclareshape

On TeXample, Martin Scharrer contributed an excellent d-flipflop example that simplifies circuit drawing to a two step-process of Place the part: % Place FFs \foreach \m in {0,...,\N} ...
7
votes
1answer
1k views

TikZ reversed arrow wrong placement

When I place reversed arrow heads as decorations I can do it in two different ways. The two ways place then at different positions, none of them is correct. In the following code I use both of them, ...
4
votes
1answer
848 views

Subcaptions for TikZ pictures

I'd like to put (sub)captions under the diagrams on the right hand side of the equation in the following code. For example, I'd like to label them (a) through (e). Thanks in advance for any help! ...
2
votes
1answer
586 views

Can I have automatically adjusted plates in a graphical model?

I have an existing graph with some nodes and edges, written with TikZ/pgf, and I need to add a couple of plates to them to make it a hierarchical model (similar to those in ...
5
votes
1answer
1k views

How to change the height of just one nodepart in TikZ?

I want to change the height of one part of the node to the minimum possible. How can I do this? \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} ...
27
votes
3answers
5k views

Drawing random paths in TikZ

I am looking for a way to draw with TikZ something that looks like a random path. Here is an inspiration: Is it possible to have TikZ generate something that would be similar to a random path ...
1
vote
1answer
1k views

How to install tkz-2d in TeXLive 2010?

How to install tkz-2d in TeXLive 2010? My directory is /usr/local/texlive/2010 but i do not know which folder to place and even how to active.
10
votes
1answer
4k views

Insert a TikZ picture from an external file

I tried to search a bit, but i guess my poor English prevented me from finding the answer. I made a few tikz pictures that i want to use in my report. I made the tikz pictures in separate tex files ...
3
votes
1answer
1k views

Can't replicate this graph using TikZ

I'm having trouble replicating this graph I know it's silly to do a graph with so little info, but my teacher demands it.. go figure... I can't seem to make the bars stick together. It's my first ...
7
votes
1answer
4k views

Vertical alignment of tikzpicture with text?

I have some text, and a corresponding tikzpicture, both of which are to be part of a test question, and which are thus included as part of an \item in an enumerate environment. Like this: \item ...
14
votes
2answers
1k views

Are boolean operations on TikZ shapes possible?

The Situation Many vector graphics editors (for instance, Inkscape, Adobe Illustrator and Microsoft Visio) permit the synthesis of new shapes by union, difference or intersection operators. A ...
24
votes
5answers
4k views

Drawing stars/similar with Tikz

I'm writing a review for a book at the moment, and I thought I'd be clever and show off what LaTeX is capable of by adding a x-out-of-y stars graphic. Tikz can do many things so I would have thought ...