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
8k views

How to put text in an existing figure/image (maybe with tikz?) [duplicate]

Possible Duplicates: Drawing on an image with TikZ How to superimpose LaTeX on a picture? I was wondering if it's possible to have an existing image (possibly in a figure environment) and ...
6
votes
2answers
903 views

Insert a separate mark inside a pgfplots graph

First of all, let me apologize if the title is not enough clear, but I didn't know how to explain myself better. I have a graph consisting in three different curves that are covering almost the same ...
6
votes
4answers
894 views

Drawing a Zero Pole plot

I'm trying to draw a zero-pole plot for use with some filter design. Since i couldn't find any standard way to go about this, I tried using the polar library of PGFPlots. I'm having some trouble, ...
6
votes
2answers
461 views

Keeping the same style inside a scaled plot

I have a graph with three different curves, two of which are very small compared to the other. I therefore decided to add a magnification of such curves inside my graph, in the following way: ...
9
votes
1answer
1k views

Shrinking text to the width of a node within a tikzpicture

I would like to be able to scale text to the width of a TikZ node. Using \widthof within tikzpicture as a starting point, I've arrived at somewhat of a solution, except it has incorrect spacing, and ...
7
votes
2answers
283 views

Big quotes drawn with TiKz does not compile

My problem Sorry to give such a long code but my problem appears in it. I don't see why the first long code given below does not work : more precisely, the problem comes from the big quotes drawn ...
5
votes
1answer
441 views

Hiding a part of a plot

Is there a way to hide a part of a plot, possibly by specifying the interval numerically? I have a plot with xmin, xmax, ymin and ymax defined and I need to move it from the y axis without using ...
2
votes
0answers
575 views

Tikz: Smooth spline enlargment [closed]

Give that my previous idea may be too difficult TikZ Region bounded by points is it possible to draw a smooth(but "programmable") spline that intersects(or almost intersects) a group of ordered ...
7
votes
2answers
577 views

How to put environment text inside node?

Consider a simple environment in the documentclass as \newenvironment{abstract}{ \node (tbl) { }; } The content of \begin{abstract} Content \end{abstract} will goes ...
21
votes
2answers
4k views

Highlight a table row with a rectangular overlay

I am trying to highlight the row of a table by drawing a rectangle over that row. A wrinkle is that the code for the table is pre-written from external statistical software and then included in the ...
14
votes
2answers
594 views

Error with \foreach in TikZ

In the MWE below \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \i in {0, 1, 2, 3} \draw (\i, 0) rectangle +(0.5, 0.5); % \draw (\i, 1) rectangle ...
4
votes
3answers
2k views

Alignment of the bar labels of ganttbar

The labels of \ganttbar in pgfgantt are right aligned by default (at the border of chart). Is it possible to have it left aligned?
4
votes
2answers
5k views

Drawing simple edge, no arrow

I have \begin{tikzpicture}[->,auto,node distance=3cm, thick,main node/.style={draw,font=\bfseries}] \node[main node] (111) at (0,1) {$X_{1,1}^{(1)}$}; \node[main node] (121) at (0,2) ...
9
votes
2answers
11k views

Missing number, treated as zero

A follow-up question to this one Aligning subcaptions with tikz pictures vertically This is the code I am using, worked to a pretty minimal scenario: \documentclass{article} \usepackage{float, ...
6
votes
1answer
723 views

Symbolic coordinates with commas

How can I use symbolic x coords={} with commas as decimal separators? For example, I need to use symbolic x coords={0,1.5,1.3}, which gives full stops as decimal separators. Using use comma does not ...
4
votes
1answer
3k views

Plot and label data from file with PGFPlots

Given some data from a file, I would like to use the first two columns as coordinates, and the second two columns as label for every point. The data is given in this form: x y ...
4
votes
1answer
358 views

Typesetting one symbolic coord differently than the others

In my plots, I have one bar (labelled dummy below) whose tick label needs to be typeset differently. Here's my current attempt (and minimal example), which doesn't quite work yet: ...
1
vote
0answers
52 views

TikZ in (sub)section title [duplicate]

Possible Duplicate: How to add a tikz/pgf command to section command I would like to add a tikzpicture to a section title using: \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ ...
3
votes
1answer
1k views

tikz, tikz circuits, relative coordinates

I am trying to draw a dimensioned line, <---- 2 cm ---- > in the x, and y directions on a circuit diagram. Using absolute coordinates, there is no problem. However, the display is faulty using ...
6
votes
1answer
630 views

Is there an siunitx number formatting option equivalent to pgfplots's “fixed relative”?

I need to typeset a table with units, so I'd like to use siunitx for that. However, I don't want scientific notation, but a given number of figures. pgfplots has the fixed relative option for that ...
6
votes
1answer
251 views

Usage of a saved dimension in another saved dimension in a \pgfdeclareshape command

I have a question about \saveddimen usage inside of a \pgfdeclareshape command. My code is as follows: \documentclass{article} \usepackage{tikz} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % ...
1
vote
1answer
370 views

How can I assign a node name while wrapping minted environment?

I was thinking how can I frame particular pieces of minted environment for beamer slides. I had a choice either to use overlays and split code across several blocks ( Beamer vs. Minted: overlays ) or ...
5
votes
2answers
704 views

Position tikz pictures at left margin of a listing code block

I'm trying to finish my attempt at having good looking unlimited line annotations for the listing environments, using tikz. The original problem was that indentation caused shifts in the positioning, ...
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 ...
9
votes
1answer
2k views

TikZ: Omit {} after \node declaration for unlabelled node?

This may seem a bit trivial, but I am writing TikZ code with an enormous number of unlabelled nodes. It frustrates me that I have to type {} at the end of every node declaration. Is there some ...
38
votes
3answers
16k views

Add more anchors to standard TikZ nodes

I frequently find myself needing more than the standard anchors TikZ nodes provide, i.e. north, north east, east and so forth. I usually use coordinate calculations for this, as in the example below, ...
2
votes
1answer
2k views

TikZ/PGF bounding box too large

I have a pdf graphic that needs to be inserted into a TikZ environment (where I can annotate it). However, the bounding box that is placed around the image includes unnecessary whitespace. The command ...
3
votes
1answer
555 views

Using a macro for the coordinate in \coordinate

It seems that the two lines in the following code are not equivalent: \documentclass{article} \usepackage{tikz} \def\coord{(0,0)} \begin{document} % \tikz \coordinate at \coord; \tikz ...
5
votes
2answers
611 views

Calculations and undefined control sequence with TikZ

I already produced several figures with TikZ, but I can't see what's wrong with this snippet: \documentclass[a4paper,10pt,twoside]{scrbook} \usepackage[utf8x]{inputenc} \usepackage{tikz} ...
26
votes
1answer
11k views

No room for a new \dimen when including TikZ [duplicate]

Possible Duplicate: No room for a new \dimen I have a fairly large document which uses 30 or so packages. I was going to add some TikZ graphics, so I added the following to my header file: ...
12
votes
3answers
3k views

'Standalone' TikZ pictures

I want to create a TikZ picture in an external PDF file, which then can be included in my main document via \includegraphics. However, compiling a document with a TikZ picture in it produces a whole ...
4
votes
1answer
773 views

TikZ-equivalent of bordermatrix with automatic alignment of labels

I would like to create a TikZ matrix (containing pictures in the cells) and annotate rows/columns of this matrix is the same manner as \bordermatrix allows. This is (approximately) a picture of what I ...
7
votes
1answer
500 views

How to use pgfkeys with “to path”

I'm not sure if the title is correct but I'll try to explain my problem correctly. I always work on the pgfvectorian package and I try to add some useful macros. One of these macros is to place an ...
3
votes
3answers
1k views

Drawing a collaboration graph or tree with TikZ

I'm trying to draw a collaboration graph for C data structures. originally I got dot files from Doxygen which I tried to convert using dot2tex with varying degrees of success, though none produced ...
3
votes
1answer
519 views

Name tikz circuit symbol node

Consider the following minimal example in with TikZ circuit library \documentclass{article} \usepackage{tikz} \usetikzlibrary{circuits.ee.IEC} \begin{document} \begin{tikzpicture} [circuit ee ...
17
votes
1answer
2k views

Background coloring with overlay specification in algorithm2e + beamer package

I want to highlight some portion of my pseudo codes in my slides during the course of presentation. It's easy in powerpoint and I've made a sample slide: However, I couldn't manage to get a similar ...
9
votes
1answer
2k views

tikz: Bigger arrowheads, merging lines

I'm trying to add arrows between equations using TikZ and I'm having some issues. First, I can't figure out how to make the lines thicker and the arrowheads bigger. Second, I can't figure out how to ...
8
votes
2answers
1k views

Plot TikZ items with respect to 3D position, not the order of appearance in the code

I have a big bunch of polygons plot in 3D with TikZ. The code is generated by a program, so it's hard for me to print the "foreground" polygons last, so that they are well printed in space. In other ...
8
votes
2answers
4k views

lines with variable width in TikZ (to convert handwritten Xournal files to tikz)

I am trying to convert handwritten text or handdrawn sketches to TikZ. Usually the thickness of a pen stroke varies when the writer applies more or less pressure to the surface. I am looking for a ...
1
vote
2answers
757 views

tikz Multi-segment Line of Varying Thickness

I'm drawing a multi-segment line with TikZ as below: \begin{figure*} \center \begin{tikzpicture} \draw[->] (0.25,0) --(0.75,1.2) -- (1.25,1.5) -- (1.75,0.7) -- (2.25,1.1) -- (2.75,0.5) -- ...
13
votes
1answer
1k views

3D Arrow Tips for TikZ/pgfplots

I really like the arrow tips shown in How to get rid of the viewer's (incorrect) axes in an Asymptote 3D graphics and am wondering how to produce this in pgfplots: I admit I have not tried ...
15
votes
3answers
6k views

Transforming coordinates, so (0,0) from tikzpicture is put in the desired place of the page

In tikz I can perform absolute positioning, e.g. (current page.center), but how I can specify/transform the coordinates, so (0,0) within tikzpicture will end in well-defined place like center of the ...
3
votes
1answer
825 views

How to exploit externalized images runtime-wise?

Thanks to the valiant efforts of @zeroth, I got TikZ' externalization running with todonotes, TikZ images pieced together by environments and macros and my homebrew compilation script. In particular, ...
2
votes
1answer
361 views

Scaling tikzpicture with Babel spanish package

I have the following code: \documentclass[a4paper,10pt]{article} \usepackage[utf8x]{inputenc} \usepackage{tikz} \usetikzlibrary{matrix,shapes,arrows,positioning,chains} ...
21
votes
5answers
3k views

Outlining (filling) glyph outline with text in TikZ

Original question Is there any automated or semi-automated way of tracing outermost outline or whole path of letters in TikZ? That I would be able (e.g. by using positioned nodes) to draw a letter ...
6
votes
2answers
2k views

Graph of polynomial, scaling y-axis

I'm new to TikZ and to this site, so forgive me if a similar question has already been asked. I'd like to graph the polynomial function f defined by f(x) = x3 - 6x2. I want the y-axis scaled so that ...
3
votes
1answer
988 views

Introducing a (sub)node within a part of a split rectangle (with tikz-pgf, for displaying memory data structures)

I'm trying to put a node (or, say, a chain) within one of the nodeparts of a split rectangle shape. So far I've been unable to make it work. Essentially I'm trying to represent a simple data structure ...
8
votes
3answers
2k views

Cut-off cone in TikZ

How would I draw the following cone using TikZ? I have no clue how to incorporate the "cut-off". I want to draw a picture of the cone given by the points (y, t) for y in R^d and t in (0, infty) such ...
5
votes
1answer
376 views

Embed text in pgfplots or tikz generated pdf files

I generate data plots in my LaTeX documentation using a combination of TikZ and pgfplots. Many of the plots are generated using script files which can also include the raw data if data is being ...
6
votes
2answers
965 views

How to import ASCII coordinates to TikZ

I have a long file of Brazil coordinates like: (-3.43,-0.56) -- (-3.44,-0.56) -- (-3.44,-0.55) -- (-3.50,-0.55) -- (-3.52,-0.55) ... and I want to import then into a tikzpicture environment to use ...