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)

12
votes
1answer
1k views

How to jam the axis of a pgfplots plot?

I need to have some kind of jump on the axis of the plot in pgfplots package. Something similar to the following figure where some part of the scales are jammed. It would be interesting to have ...
28
votes
1answer
23k views

Comprehensive list of TikZ style options?

I'm aware that one can use \tikzstyle{every label}=[...] to apply styles to every label within a tikzpicture; or \tikzset{mystyle/.style={...}} to apply style specs to a specific type of node mystyle (...
9
votes
1answer
1k views

Help for one simple diagram about genetic algorithmic

I would like to produce the following diagram. Thanks to the following comments and one example from TeXample.net, I have done the following code. There is some problems. How can I fix them ? \...
12
votes
2answers
2k views

Create diagrams in LaTeX with TikZ

I am relatively new to the concept of generating diagrams in LaTeX, and do not know if LaTeX is capable of generating the diagram i wish to create. The diagram looks like this: I was hoping someone ...
6
votes
1answer
654 views

Why such rotate in tikz doesn't work?

\begin{tikzpicture} \node [draw=black, anchor=south west] (label) at (0,0){\includegraphics[width=300mm]{th.jpg}}; \coordinate (ZX) at (157mm,104mm); \coordinate (YB) at (249mm,39mm); \coordinate (YY) ...
1
vote
1answer
571 views

Debugging TikZ and PGFPlots compatibility issue

I just tried to compile an old TikZ code (which as far as I recall compiled perfectly in the past and was not changed in the meanwhile) and I faced some serious compilation issues related to TikZ. ...
8
votes
1answer
2k views

How to make all nodes same size in mindmap?

Is there a way to force all the nodes in a mindmap to have the same size regardless of their hierarchy in the tree? \begin{figure}\label{fig:HadoopVersion} \centering \begin{tikzpicture}[...
4
votes
1answer
865 views

Drawing a tree with text on the edge concisely using TikZ

I am new to TikZ and am trying to draw a tree with text only on the edge (action/line). I have managed to do it as seen below but I was hoping there was a more concise/legible way. \documentclass{...
12
votes
1answer
4k views

Difference between \newcommand and \pgfmathsetmacro used in TikZ \coordinate

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \newcommand{\MA}{4} \pgfmathsetmacro{\MB}{4}; \coordinate (V11) at (0,0); \...
13
votes
1answer
3k views

tikz: placing nodes relative to the bounding box coordinates

I have a tikzpicture,in this case a blue rectangle, that will produce a bounding box, here visualized by the green background. I would now like to place a node in the top left corner of the bounding ...
6
votes
1answer
266 views

Labeling precisely-positioned “tree” nodes

I'm working with TikZ and am basically drawing a tree, but my needs require that the nodes be precisely positioned on the coordinate space and precisely sized. For this purpose, I've found that using ...
5
votes
1answer
2k views

Automaton backedge arrows running into other states

I am trying to draw a finite-state automaton using the automata package in TikZ and am having trouble getting an edge to "clear" the other states (that is, not run into them). Having read this answer,...
5
votes
1answer
345 views

Arrowheads every two points in Tikz

I have a file data.dat with the following lines: -1.200000 0.000000 -1.200000 -0.728000 -0.728000 -0.728000 -0.728000 0.614172 0.614172 0.614172 0.614172 1.231670 which ...
5
votes
0answers
446 views

How to create a fancy badge (award graphics) in LaTeX? [closed]

Is it possible to create fancy badges in LaTeX? Are there any packages for this? Below are some examples:
0
votes
0answers
87 views

TikZ how to draw lines to/from nodes correctly? [duplicate]

Possible Duplicate: Tikz: purely vertical arrow from nodeA.south to nodeB.north I need to draw some diagrams for my thesis. I normally use PGF/TikZ for this purpose. I have often the problem ...
1
vote
1answer
1k views

Clash between TIKZ and French Babel [duplicate]

Possible Duplicate: tikz declare function and babel french option I'm working on a document requiring both tikz and [french]Babel. There is a clash between [french]Babel, and TIKZ: No ...
3
votes
1answer
4k views

3-input logic gate on circuitikz

How can I draw a 3-input logic gate with circuitikz? Is there a way to do so? For example, \begin{circuitikz} \draw (0,0) node[and port](myand){} (myand.in 1) node[left]{A} (myand.in 2) node[...
3
votes
2answers
584 views

Vertical whitespace inside tikz node

I have a tikz node that looks like this: It was generated using the following code: \documentclass[a4paper,10pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[align=center]...
5
votes
1answer
2k views

How do I include data files in a TikZ drawing?

I would like to include the following data which is now in a separate doses.data file 0 1 10 1 11 1 12 1 0 2 1 2 4.8 2 into my TikZ drawing. Right now I'm importing the file, but I want ...
2
votes
1answer
4k views

How to draw a plot from .xls file in pgfplot?

I want to read .xls format file in pgfplot to draw a graph. I couldn't find how to do that. Is it possible to do that? I have attached a small .xls file here for which I want to compute plot. http:...
3
votes
1answer
567 views

tikz - Multiple nodes with same content

I would like to know how to place multiple nodes with same content in TikZ. I've made a macro for it, but I think that it could have a different approach. \usepackage{tikz} \usepackage{bm} \...
12
votes
1answer
567 views

draw a many edge from a node- Tree - tikz

i want to draw the tree in the following picture : i have write : \documentclass{article} \usepackage{tikz} \usepackage{color} \definecolor{red}{rgb}{1,0,0} \begin{document} \begin{...
6
votes
1answer
180 views

Make boxes extend backwards one on top of the other

I don't know how to word this, but I want that 1..n effect where you can tell that there are boxes behind the top one and it is assumed that they are all the same. Perhaps this picture will help (I'm ...
3
votes
0answers
104 views

TikZ: centre drawing at origin [duplicate]

Possible Duplicate: Centering a TikZ picture around an area I'm drawing 3 circles within each other with the same centre point, each circle represents a region for the project I'm doing. I've ...
3
votes
1answer
188 views

TikZ - Put two draws in the same TikZ environment and vertical spacing

In the following code, I would like to put the two lists displayed in the same environment with one vertical specified spacing. How can I do that ? Code \documentclass{article} \usepackage{tikz}...
8
votes
1answer
509 views

TikZ: “Zig-Zag” lines

How to obtain easily the following red line in the code given just after? Is it possible to only give the start and end positions so as to obtain the two kinds of paths? The question is more about ...
16
votes
1answer
4k views

Headers and page numbers in external borders

I am trying to recreate in *TeX the same aspect that you can see in the following picture showing a document that I created a while ago with MS Publisher. As you can see, page numbers are rendered ...
6
votes
1answer
2k views

standalone: varwidth option limits output width?

It seems, that the varwidth option for the standalone class limits the output width. The problem is produced in the following example: \documentclass[10pt,crop,varwidth]{standalone} \usepackage{...
18
votes
2answers
7k views

Package PGF Math Error: Unknown operator `o' or `of'

I am getting a weird error while trying to place a node above another node using the below= syntax. \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[] (node1) at ...
9
votes
3answers
228 views

tkz* commands vs draw/path

I am learning TikZ and am confused about two apparent completely different ways to go about things, although they seem completely compatible and intermixable: \begin{tikzpicture} \draw[color=black] (...
4
votes
1answer
694 views

Multi axis plot problem with appearance

I have a problem with the appearance of a mutli axis plot... Currently I have the following: However I do not want the arrow in the right y-axis but from the documentation I read that the * in the ...
5
votes
1answer
1k views

Matrix of nodes over multiple columns in tikz

I want to create a diagram with tikz in which entries overdraw more than one column. I solved this problem already with the fit package. But now there is a problem with the look of the nodes within ...
10
votes
2answers
1k views

A Tunisian flag on Tikz using a macro “m-grams”

I tried to represent the flag of my country. I typed this code. But I believe that the position of stars, circles, ... is not so respected. In addition I have a left margin "white band" I want to ...
9
votes
2answers
2k views

Text tree using tikz-qtree is too wide, don't know how to break lines and make the tree compact

I want to make a tree like this one: It doesn't need to be exactly the same, but I want to translate the text, so I need to rebuild it, I'd also want to add a node, but that's easy. My first try: ...
9
votes
1answer
739 views

Placing two nodes by relative positioning in TikZ

I want to draw something like this: So I did the following: \begin{tikzpicture} \node[draw] (node1) {Long long long box}; \node[draw, below left=of node1] {short} edge[->] (node1); \node[draw, ...
7
votes
1answer
411 views

TikZ arrows for displaying sorting algorithms

I would like to add some arrows like in the following picture from the code just below. Output excpected Code \documentclass{article} \usepackage{tikz} \usepackage{xstring} \tikzset{ ...
4
votes
3answers
705 views

Remove indentation from a colored box made with tikz

I have a document which looks like this: Code is like this: \documentclass[10pt]{memoir} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{shapes,backgrounds,patterns} \tikzstyle{box} = [...
24
votes
1answer
1k views

Help with the design of an eye in TikZ

In my attempt to create an eye icon to illustrate something in my notes, I came up with the following: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.25] \...
36
votes
1answer
2k views

Elliptic Moebius map on sphere using Tikz

I'm trying to adapt this example from texample to produce a sphere with arrows indicating the effect of a elliptic Moebius map. In fact, I'm trying to redraw the spheres below, but for a while I'm ...
11
votes
2answers
300 views

Can I rotate a marker with a scatter source?

I'd like to be able to use pgfplots to show a skier going down a ski slope. Here is what I have done so far. \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \makeatletter \...
6
votes
1answer
583 views

Displaying genetic algorithms on data

It is useful for explaining how a genetic algorithms works to display things like in the two following pictures. In those pictures, it could be useful to have two more features. Display dotted ...
5
votes
1answer
610 views

How do I draw a projection of specified length, parallel to another line, between two sides of a triangle in TikZ?

I am trying to draw something called an "Ossanna circle" in PGF. Here is my MWE. Forgive its size -- you need all the intermediate points to get the points that we need for this question: \...
4
votes
1answer
192 views

beamer: grouping elements together

I am using beamer for creating my presentation. Sometime I create elementary objects (like geometrical shapes and arrows) by using tikzpicture and I place them in the slide by using textblock. I ...
6
votes
1answer
774 views

Typesetting classical data structures in tikz

During this discussion an example image generated with TikZ was given by Christian R. but no code was provided: It would be great to have the code snippet that implements it, because I think it has ...
16
votes
2answers
3k views

TikZ: Defining and reusing complex objects?

(How) Is it possible to save some complex TikZ objects for reusing them (in the same and in different pictures)? I know it's possible to define own styles, but I'm not sure if it's the right thing I'...
4
votes
1answer
430 views

How to linebreak when using \rotatebox inside a tikz node?

I would like to know how I can get a linebreak inside a rotated node using tikz. I tried to use the align=center option together with \rotatebox{}{}, but i get an error. Here is an example of a ...
9
votes
1answer
378 views

Macros and pgfmath within put in picture environment

I am trying to put some TikZ pictures into a Beamer slide to enhance readability. The position of the TikZ pictures on the slide will depend on how much text comes before. Since there will be many ...
8
votes
1answer
196 views

TikZ doesn't fill when node coordinates are used

Can someone please explain me why the following code doesn't result in a fill? And why, sometimes, I get such "very thin lines" artifact (that's visibile in my picture)? \begin{tikzpicture} \node (A)...
16
votes
3answers
4k views

Shifting a line joining nodes in TikZ

Consider these squared nodes: \begin{tikzpicture} \node [draw] (A) at (0,0) {demo text}; \node [draw] (B) at (0,-2) {demo text}; \end{tikzpicture} I'd like to link them with two offset lines. If A ...
9
votes
1answer
455 views

Sum up rows from different data files

I've a certain amount of inputfiles (.txt) for the final definition of the y-data of my axis environment. The x-data come from a different file. The goal is to sum up each row of the input files (...