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)

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
557 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 ...
8
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 ...
20
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
1k 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 ...
34
votes
8answers
12k 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
4k 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
587 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
962 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
754 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
593 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
813 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
574 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} ...
26
votes
3answers
4k 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 ...
22
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 ...
9
votes
2answers
796 views

Intersection with rays in TikZ

can anyone tell me how to calculate intersections of rays and objects in TikZ? Normally the syntax is intersection of p1--p2 and p3--p4, but I would like to intersect the line segment from p1 to p2 ...
35
votes
1answer
9k views

Bell Curve/Gaussian Function/Normal Distribution in TikZ/PGF

Can anyone tell me how to plot a gaussian function/bell curve using TikZ/PGF? I'm basically looking to implement something like PSTricks's \psGauss command.
7
votes
2answers
5k views

How to draw inside a TikZ node, using node style?

I would like to define a node style, so that the node will look like the LaTeX symbol \oplus, i.e. a circle with lines from north to south, and east to west. (I also have more complicated examples in ...
25
votes
4answers
6k views

Faded drop-shadow using tikz-based rounded rectangle?

Background Epigraphs are in a box with rounded corners. The boxes have a drop-shadow. Example Picture #1 shows a shadow, while Picture #2 shows a shadow that fades out (soft blur): Problem ...
6
votes
1answer
918 views

Online searchable manual for TikZ?

Having used psTricks for years, I'd though I'd drag myself into the modern era and start using TikZ. So far, I like it very much. However, the only manual I can find is the 500+ page PDF manual, ...
6
votes
2answers
2k views

TikZ Diagrams in Math Mode

I've attached a picture which shows what I want to be able to do. I have been making simple Hackenbush diagrams as follows: \begin{tikzpicture} \node[hackennode] (Bottom Blue) at (0,0) {}; ...
4
votes
1answer
1k views

TikZ: Controlling new circuit symbols questions

I have created a new circuit symbol for battery source (var battery). There are two problems and one question: I would like for minus to be always horizontal. I would like to control how plus and ...
2
votes
2answers
2k views

Tkz-fct Package Error — I can't find file `tikzlibrary'.

I tried to install and use the new Tkz-fct package. The installation was OK, MikTex Package Manager says that I've successfully installed the package but if I try the most easy example from the ...
23
votes
9answers
4k views

TikZ: changing colour of a path half way along

Here's the problem: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} [scale = 3, foo/.style={line width = 5pt}] \draw[foo,red] (0,0) -- (0,1); \draw[foo,blue] (0,1) -- ...
7
votes
2answers
2k views

CircuitTikZ - Combine Tripoles with resistors

I'm just learning how to use CircuitTikZ to draw circuits, and I am trying to draw a good looking BJT biasing circuit. But I am having making the resistors across from each other look even, and since ...
21
votes
1answer
1k views

Beamer reflections with pgf/tikz

I want some nice reflections in my slides. Something like the ones seen in Jobs Keynotes. Suppose you have multiple elements in the tikz picture and you want to reflect the whole thing with fading. ...
11
votes
1answer
1k views

Z-Order of plots pgfplots

Simple question: I can’t seem to control the z-order (i.e. which comes in front, which comes in the back) of the plots in a 2D axis. MWE: \documentclass{article} \usepackage{pgfplots} ...
5
votes
1answer
868 views

Missing footer on first Beamer slide of TikZ example [duplicate]

I'm having problems with this particular TikZ example: http://www.texample.net/tikz/examples/prims-algorithm/ When I change the theme, for instance: \usetheme{Madrid} the footer is not working on ...
10
votes
3answers
6k views

Restrict function plot to a range of x values using pgfplots.

I want to create a plot of two functions using pgfplots and LaTeX. I want one of the functions only in a certain interval, I'll give an example: \begin{tikzpicture} \begin{axis}[ axis x ...
2
votes
1answer
1k views

Putting a rectangle around matrix nodes?

I built up a simple UML diagram, where one of the class boxes has an union containing a number of elements. I want to show that those elements are part of an union. But how can I do so with tikz? I ...
5
votes
1answer
1k views

Tikz mindmap problems

I am trying to run the TikZ example on http://www.texample.net/tikz/examples/scientific-interactions/ but I am running into some problems. I can run the simpler example ...
11
votes
2answers
5k views

Cylinder shading with PGF/TikZ

I'm trying to create a cylinder with 3D shading effects. The cylinders in the picture are standing vertically, and have a body and an end. I'd like the body to be shaded so that it varies uniformly ...
7
votes
1answer
8k views

TikZ Library Not Found

I am new to TikZ and reading through the manual working out the first example which happens to use the intersections library. When I try \usetikzlibrary{intersections} LaTex spits out the following ...
12
votes
3answers
1k views

Any way to get neato-like node placement in a TikZ graph?

I'm interested in drawing molecular connectivity graphs in TikZ. Using \node and child without any positions I am able to draw a tree diagram which is semi-useful as I can easily illustrate the ...
3
votes
1answer
603 views

drawing package in tex

I just want to learn how to make graphics in TeX. I have looked through this site and tried some TeX source file. But I am confused by the TikZ and tkz packages. Do they have any relation or are they ...
7
votes
4answers
694 views

What's the best way to draw loop invariants in LaTeX?

I want to draw a picture similar to this one for divide part of Quicksort. What's the best method to do so? Is there a package for it or should I use Tikz to do it? If Tikz can you point me to some ...
4
votes
1answer
966 views

How to get more information to the y-axis, and a grid to the background

I need a grid in the background and more values on the y-axis. Can you help me out? \begin{tikzpicture} \begin{axis}[width=14cm,height=6cm,title={Entwicklung},ylabel={Wachstum in Prozent}, ...