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)

14
votes
2answers
3k views

Shift line connecting anchors

How can I shift a line the endpoints of which are defined by anchors like this? \draw (i0) -- (i1); The following approach does not work: \draw[xshift=2pt] (i0) -- (i1);
7
votes
2answers
1k views

vertical week list in TikZ calendar

I read about week list in the PGF/TikZ manual, but I couldn't find an example that arranges the days of the week vertically: June 1997 M 2 9 16 23 30 T 3 10 17 24 W 4 11 18 25 T 5 12 19 26 ...
2
votes
1answer
419 views

How to use tikz package with devanagari, in miktex 2.8

I have to use tikz graphics with my PDF file, written in MiKTeX 2.8 LaTeX. When I write \usepackage{tikz} with \usepackage{devanagari}, LaTeX produces an error l.264 catcode '\"=12
4
votes
1answer
619 views

TikZ: “Inline” pgfonlayer? [duplicate]

Possible Duplicate: “Z-level” in TikZ When using layers in tikz I usually do the following: \begin{pgfonlayer}{background} \draw[red] (0,0)--(1,0); \end{pgfonlayer} Is ...
2
votes
0answers
389 views

Wireframes for Webdesign with tikz [closed]

I am searching for information about using tikz to draw wireframes for websites. Is there any particular workflow around? Does somebody know some sort of packages I can use? Here is a link to explain ...
4
votes
1answer
3k views

Using [midway] to label a curved path at its centre

I am trying to label two curved paths connecting two nodes with labels placed at their centres using the node[midway] option. This is something that should be very simple but I have not been able to ...
23
votes
1answer
2k views

How can I improve this family tree in TikZ?

To answer a question about how to draw family tree on LaTeX-Community.org, I created an example: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} ...
2
votes
1answer
702 views

Referencing externalized pgfplots with subfig and cleverref

I use pgfplots to produce a vast amount of images in my document. Due to limited LaTeX memory, I am forced to use \tikzexternalize. Moreover, I also use the subfig package to group several pictures ...
5
votes
3answers
738 views

How to show the current coordinates for mark=text?

In the following example I'm using the library plotmarks to set a text on the given path. Now I am interested in showing the current coordinates of the marker instead of p. ...
5
votes
1answer
292 views

What program can display PDF tooltips on a Linux system?

I am trying to put in some text tooltips in some tikz graphic. I have found an example using pdfcomment, but after I have used pdflatex and opened it with Evince, I don't see any tooltips. What am I ...
3
votes
1answer
716 views

pgfplots: shadow for markers

I was wondering if it's possible to add shadows to markers within pgfplots. I tried the circular drop shadow option (from TikZ) which unfortunately had no effect at all. I also read that one can ...
11
votes
5answers
4k views

How to make a tikz node, top-aligned with the rest of the text?

If I write before-text \begin{minipage}[t]{5cm} line1\\line2\\line3\\ \end{minipage} after-text I get a box, whose top is aligned to the top of "before text". I would like to have the same, when ...
2
votes
1answer
220 views

Stretching text in a node in a tree

I'm trying to make a try, similar to the one visible here. As it is seen in the example, the writer wrote Bag 1 $4W, 3B$ and got it in two different lines. I don't want that; I want the lines to ...
53
votes
5answers
5k views

What are the relative strengths of TikZ and Asymptote?

I want to compare TikZ and Asymptote for their abilities in 2D & 3D functional plot and other general purpose, simple drawings. What are the strong aspects of TikZ over Asymptote?
20
votes
3answers
4k views

How can I show coordinates by grid in TikZ automatically?

I have the following TikZ code which draws a grid and shows the coordinates. To display the coordinates I am using the loop foreach. \documentclass[12pt]{article} \usepackage{tikz} \begin{document} ...
78
votes
5answers
7k views

How can we display fireworks?

Soon we can celebrate the New Year. How can we use TikZ for drawing fireworks? For example like this, photographed by Kurume-Shimin, found on Wikipedia: Click on Image search for getting further ...
8
votes
2answers
833 views

While loops in TikZ?

Is it possible to have while loops in TikZ, or some equivalent loop which only terminates after a certain condition?
29
votes
5answers
2k views

Generate Mandelbrot images using TikZ?

In my thesis that I'm writing on, I'm using a Mandelbrot generator to test an application I've written. To explain a certain problem discussed in the report an actual generated image need to be ...
6
votes
1answer
701 views

Declaring an arrow for chemical equilibrium (steady-state arrow)

I tried to create an steady state arrow with pgfarrowsdeclare and pgfsetinnerlinewidth which seems to have no effect, when placed in the arrow declaration. So the following code shows my solution, ...
5
votes
1answer
430 views

Use a loop to generate a list for another (foreach) loop

Is it possible to use a loop to generate a list for a foreach loop? More specifically I want the following: Consider the following answer to a question I asked some time ago: ...
6
votes
1answer
4k views

How to draw a curve in tikz? [duplicate]

Possible Duplicate: Easy curves in TikZ I want to draw an equivalent of the following pstricks picture with tikz. \documentclass{article} \usepackage{pstricks} \usepackage{pst-plot} ...
4
votes
1answer
464 views

Relative positioning in 3D

I am trying to position a node in 3D according to the (x, y) coordinates of a node previously defined on another z level. However, I can't figure out how to make it work: \documentclass{article} ...
8
votes
2answers
2k views

TikZ: How to rotate and then shift?

I'm trying to rotate a node and then shift it along the X axis. If I do [rotate=90, xshift=-20pt], the node will first shift and then rotate.
83
votes
8answers
7k views

Simulating hand-drawn lines

I am working on a project that will have some vector graphics, perhaps using TikZ (or a similar tool). All of the graphics consists of lines, in shades of gray. However, the lines from TikZ appear too ...
4
votes
2answers
1k views

Coordinates A, B: compute |B-A| and angle between +x and (B-A)

This question has two parts: why is the angle computed always 0 (should be 45) what is a straightforward way to compute distance between coordinates (there is How can I compute the distance between ...
15
votes
2answers
4k views

Tikz: Arrowheads in the center

For arrows I have gone through options like ->, ->>, <-, <<- but havent found one for making the arrowhead appear in the center of the line of the curve (something like ->-) How do I do it in ...
7
votes
1answer
2k views

LaTeX probability tree

Please could you tell me if the Probability tree posted on 2006-12-14 by Kjell Magne Fauske can be done with three branches instead of just two.
3
votes
1answer
858 views

Multiline table header

Is it possible typeset a table with \pgfplotstabletypeset and change the style of 1 column header to be multiline? This code doesn't work and can't compile: ... columns/errorRelC/.style={ column ...
12
votes
1answer
632 views

Define TikZ macro for hatched rectangles in local coordinate system

I would like to define macros for functions defined on beams in structural mechanics course: I am trying to cook up some macro which would draw each segment where the function is constant (perhaps ...
2
votes
1answer
644 views

Plotting area in the plane where two inequalities in two variables hold

I would like to plot the area in the plane where two inequalities hold, both involving two variables. I would like to do it the way Wolfram Alpha does it, but within a LaTeX document. I have looked ...
1
vote
1answer
1k views

Drawing Mass Spring Damp Systems in TikZ [closed]

I'd like to draw a Spring-Mass-Damping system by TikZ. I found the example in Drawing Mechanical Systems in LaTeX But I have problems compiling it. If I delete the damper code \draw [dampener] ...
152
votes
11answers
22k views

How can we draw a Christmas tree with decorations, using TikZ?

I would like to use TikZ for drawing a christmas tree. Here's a start, I used the lindenmayersystems library for drawing a tree: \documentclass{article} \usepackage{tikz} ...
18
votes
2answers
2k views

How to change the level distance in tikz-qtree for one level only?

I am trying to draw a tree for a game theory problem. The problem is that the label p1=0.5 crosses label I. I would like to adjust the level distance of the first level, but the \tikzset{level ...
13
votes
2answers
4k views

Need to do some changes to pgfplots axis

I am still in the habit of learning TikZ, barely started using pgfplots to create my images Although I am still not sure what the best way to do so is, I need to create the image below. My problems ...
2
votes
1answer
267 views

Wrong area plot

I'm trying to draw a plot from this table: ip Min Std 0 19.86764349 97.20356138 16 19.86764349 250.079659 22 19.86764349 168.2253117 23 19.86764349 169.2514577 33 ...
29
votes
1answer
10k views

Tikz: use opacity for fill, yet leave draw (lines) untouched

When I use the tikz key opacity for a polygon in a tikzpicture, it applies to the drawn fill as well as to the draw lines. I would like to have it this way that the lines remain untouched by the ...
23
votes
1answer
4k views

How to draw a decorated rectangle with rounded corners?

As the title says, I was trying to draw a rectangle with rounded corners, and then decided it needed decorating. Well, the result looks awesome, but isn't really what I had in mind. a) What happened? ...
9
votes
2answers
363 views

How can I globally set pgfmathsetlength?

How can I declare a length via pgfmathsetlength global? The example results in 20pt -- 5pt -- 20pt But I had expected: 20pt -- 5pt -- 5pt \documentclass[10pt]{article} \parindent0pt ...
3
votes
1answer
928 views

Error when using both minted and TikZ externalize with xelatex

See the following MWE. \documentclass{article} \usepackage{minted, tikz} \usepackage{fontspec} \setmainfont{Arial} \usetikzlibrary{external} \tikzset{external/system call={% xelatex ...
20
votes
5answers
3k views

Best way to denote an angle in TikZ?

What is the best and simplest way to denote an angle, with an arc and a label telling its name? I wish to be able to control (obviously) the vertices on which the angle lays, the name of the angle and ...
4
votes
1answer
418 views

Prevent tikz to calculate

I just played with an answer to a question I asked here some time ago: Divide a rectangle into n times k equal cells. I wanted to be able to generate the list of points in a separate macro, however ...
4
votes
1answer
2k views

Problem using matlab2tikz

I'm trying to get matlab2tikz to work. I want to use it for prettyfying output of Matlab's image() command. In Matlab I tried imagesc(rand(100)); xlabel('X'); ylabel('Y'); title('Random Colors'); ...
2
votes
2answers
761 views

Source code for examples in TikZ/PGF manual

I am starting to learn TikZ. I was wondering if the source code for all examples in the TikZ manual (2.10 version) is available somewhere for download?
23
votes
4answers
4k views

How to place a node in the middle of an arc?

I think it is a simple question, but I didn't find the answer yet. The code I'm using is the following: \draw[->](1,0) arc(0:-30:1) node[midway]{$30$}; But in this way the node is placed at the ...
18
votes
2answers
4k views

How do I add an image in the upper, left-hand corner using TikZ and graphicx

This is perhaps a simple question with a simple answer, but I'm stumped as a tikz novice. What would be the best method to add an image (logo) file to the upper left-hand corner of my document? ...
5
votes
2answers
819 views

Drawing a simple line with tikz and remove the additonal horizontal space

In the following example I want to draw a simple line with tikz. It seems that the line produced a additional horizontal space left and right about .5\pgflinewidth. I tried outer xsep=0pt but with no ...
13
votes
2answers
3k views

Image with axis

I need to plot some data in a file (10000 records of 2 points each one) but PGFPlots is very very slow rendering it. So I'm trying to use MatLab to plot the data, capture the image without axis and in ...
14
votes
3answers
5k views

Scaling a TikZ figure from an external file

I would like to insert figures which were created with TikZ to my LaTeX document. I suppose that if I create the TikZ figure inside the document, that wouldn't be a problem - I'd just play with the ...
6
votes
1answer
214 views

Adding a TikZ figure to a document

I really hate to post "what's wrong with my code" questions, but I'm a bit clueless and couldn't find a good guide about it. Anyway, I'm trying to add a figure which was created by TikZ to my ...
8
votes
1answer
1k views

Arrows and nodes in TikZ

I wish to draw arrows not necessarily at the end of the line, nor in the middle. I would also like to write a node directly above (or below, or to the right, ...) the arrow. I saw this question, but ...