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)

7
votes
1answer
7k views

How to position the labels of the path in automata?

This is my tikz code : \documentclass[a4paper,10pt]{article} \usepackage{verbatim} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage{graphicx} \usepackage{amssymb} ...
6
votes
1answer
367 views

TikZ: Random characters with tikz, fontenc and input

I am getting random characters displayed in my TikZ images: I have just noticed this recently. I am not sure what this might be caused by. I am using the latest TikZ build from TeXample. I only ...
4
votes
1answer
503 views

Define “block” and “connector” commands in TikZ?

How can I define two commands, block and connector in TikZ so that I could use them the same way as umlpackage and umlimport in uml-tikz. E.g. I want to be able to say something like: ...
8
votes
1answer
8k views

Change bend angle and swap node position on arrow

I'm trying to draw an automata as follows: \begin{tikzpicture}[>=stealth',shorten >=1pt,auto,node distance=2.8cm] \node[initial,state] (q1) {$1$}; \node[state] (q2) [right ...
5
votes
1answer
369 views

putting a box over an image in beamer presentation

In a Beamer presentation, I want to put a box over a graphic file. For example, in one slide, I want to put a graphic file: And, in the next slide, I want to put a box on the image: This style of ...
4
votes
1answer
516 views

how to draw tree with a specified width between nodes

Below is what picture i want Words of level 1: Rule Words of level 2: Length Pattern Arcs Words of level 3: T1 T2 A1 Words of level 4: term_index term ...
0
votes
2answers
160 views

tikz doesn't work with L7x encoding in beamer

In my beamer document I use L7x encoding and I want to import tikz picture, however, it doesn't work, so what's the best way to import it in my presentation? My idea is to make a printscreen of this ...
5
votes
1answer
341 views

Is there a way to change styles in imported EPS files?

I know how to replace simple textual tags in imported EPS files using psfrag; but to ensure a consistent appearance for graphics in my documents, I would like to also be able to make substitutions to ...
7
votes
1answer
514 views

Linking the columns widths of two tikz matrices

I have two figures containing a tikzfigure with a matrix. Both matrices are related, i.e. have the same columns, and I would like tikz to assign them the same column widths, just as if I had all rows ...
5
votes
1answer
1k views

LaTeX Cartooning

Are there any Latex packages (or any other text based methods) to assist in cartooning i.e. creation of simple images representing real-life objects. Something as simple as the images on xkcd is good ...
3
votes
1answer
659 views

How to draw communication based diagram in tikz?

I want draw such a diagram. Is there any tikz package for drawing such thing? Is there any example tex code for the same? How do I draw such diagrams? I have tried drawing it. My tex code is as ...
5
votes
1answer
8k views

How to reduce font size in tikz nodes?

This my tex code. \documentclass[a4paper,10pt]{article} \usepackage{tikz} \usepackage{verbatim} \usepackage[margin=15mm]{geometry} \usetikzlibrary{shapes,arrows,fit,calc,positioning} ...
5
votes
2answers
535 views

Foreach loop with command inside Tikz matrix

This question is directly related to Foreach inside a TikZ matrix. But I can't expand it with a macro inside, such that: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} ...
13
votes
1answer
988 views

Automatically set file name of externalized graphics equal to the file name of the tikz/PGF file

As the title says, is it possible to set some options for the externalize library in order to for the filename of the externalized graphics to be equal to the filename of the TikZ-file without using ...
4
votes
2answers
600 views

Kiviat diagram with axis labeled and different sizes

I am trying to use the package tkz-kiviat to draw a kiviat. The following example produces the image below: \documentclass[]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
24
votes
2answers
936 views

Drawing a flag with TikZ

I am trying to create a flag in TikZ but aesthetically it's not the best. Here is my MWE: \documentclass[letterpaper]{article} \usepackage{fullpage} %\usepackage{amsmath,amssymb,amsthm} ...
5
votes
1answer
317 views

How to change the spy connection path

Is there a way to change the spy connection path to looks more like these in red on the picture beneath? Thx in advance. \documentclass[frenchb,11pt,a4paper]{report} %Type de ...
13
votes
2answers
5k views

Change linestyle within a plot to add dashed trendline?

I'd like to add a dashed line to the end of a plot to indicate a future projection as opposed to real data. I can do this by adding a second plot, as in the example below. However this isn't really ...
10
votes
3answers
7k views

How to draw curved arrows in tikz?

I am getting something like this: This certainly doesn't look good. Curved arrows cross the blocks. Is there any better way of drawing curved arrows or any other solution? I am putting my code: ...
5
votes
1answer
368 views

commutative diagram having drawings as objects

I need to draw a commutative diagram having drawings as objects, like in this link which is also shown below. I have some problems: xy-pic "slants" the objects; "matrix" library in TiKZ is not ...
2
votes
1answer
724 views

How to update pgf 2.0 to 2.1?

I have installed TikZ/PGF using Synaptic Package Manager. Still it contains version 2.0. Now How do I update it?
9
votes
1answer
403 views

Alignments by means of the tikzmark macro

This is a follow up of my previous question Issues and potentiality of the tikzmark macro: dynamic box adaptation. I thought should have been better to ask two questions although they are related to ...
11
votes
2answers
991 views

Issues and potentiality of the tikzmark macro: dynamic box adaptation

Since I discovered the tikzmark macro I've been enthusiastic about it. I think that it is possible to distinguish at least two versions of the command: a basic one (two examples: ...
9
votes
3answers
1k views

TikZ multipart nodes: How to set text attributes (opacity) for some/all parts

I am using TikZ with the rectangle split multipart node (detailed on pp 450ff in the PGF 2.1 documentation). I need to influence the text opacity of all parts, but whatever I try seems to work only on ...
0
votes
1answer
767 views

How to draw a diagram for packets scheduling in networks or task scheduling?

I would like to draw a diagram for packets scheduling in networks similar to the this one: The same type of diagram (or very similar) can be used also for tasks scheduling. Can you please indicate ...
6
votes
1answer
427 views

How can I vertically align the labels in a tikz diagram

I have drawn the above diagram with diagonal arrows in TikZ, but the labels look like they have been placed on a curve instead of next to each other. I think I understand why they are placed like ...
2
votes
1answer
121 views

how to use “count” feature?

I want to draw something like this. But I am not able to get x1,x2, ..., x5 labels. What I am getting is as follows: So, I included count feature. My code is as follows : ...
3
votes
2answers
366 views

Some issues in positioning arrows and labeling them

I want to draw something like this. But I am able draw this things: So there are three problems: Input and output arrows not positioned properly. I want a rectangle above 5 X 1 MUX text. I am ...
21
votes
4answers
5k views

Is there a way to control whitespace around a TikZ picture?

When I draw a tikzpicture that includes paths, I get quite a bit of extra whitespace added around the elements of the picture. Depending on the elements the figure contains, this can work out in some ...
10
votes
2answers
661 views

Horizontal alignment within an equation using Tikz

I am trying to center horizontally the first terms of a system of equations inside the alignat environment. I don't know if Tikz is the right way to go, but as I might have to add some other ...
14
votes
2answers
593 views

Optimizing code for dimension arrows (CAD) in TikZ

In Engineering it is customary to denote small dimensions with arrows as shown below (in binding correction and trim top): Variants exist such as Currently they are all hardcoded as for ...
8
votes
1answer
1k views

Using of \usetikzlibrary in an expl3 package fails

In the example below I provided a small test package mytestpackage.sty which uses the syntax of expl3. If I use the command \usetikzlibrary inside the package I will get the error: Runaway argument? ...
5
votes
2answers
1k views

How can I make labels (or other elements) rotate with a node using TikZ?

Is there a way to get label text to rotate with the TikZ node to which it is attached. I can rotate the node and its text; but labels do not rotate along with the node, and instead remain "level": ...
5
votes
2answers
297 views

Unexpected result for child nodes: why they seem to be typeset in bold?

I was trying to draw something similar to: without the border around nodes and where arrows should have a line (with a given width to be visible) connecting the tail and the tip. My code is: ...
4
votes
1answer
1k views

Dates as xticklabels ; number formated dates provided

I would like to plot temporal data and have dates as tick labels. I have seen chapter 4.20 Symbolic Coordinates and User Transformations from pgfplots manual but it does not correspond to my situation ...
1
vote
0answers
105 views

How to take out two arrows from the same line? [duplicate]

Possible Duplicate: List of available TikZ libraries with a short introduction Multiple arrows between nodes I am new to tikz. I want to know how to draw this kind(given in the figure) of ...
6
votes
1answer
2k views

How to draw a series of paths in a TikZ chronology diagram?

I am a beginner in LaTeX, trying to use it (and now to promote its use...) for industrial documents. I want to provide diagram relating the chronology of introducing LaTeX in an engineering group. I ...
8
votes
1answer
270 views

problem with Shorthand for Scope Environments

I try in this in this question to use some shorthands with the library scopes. I discover some difficulties and I can't explain why I get problems. (I use pgf 2.1 cvs) The main code comes from the ...
9
votes
4answers
5k views

Multiple arrows between nodes

How do I draw multiple arrows between two nodes? Currently I am able to draw only one between two nodes. And how do I draw curved arrows? How to align them properly? I want to draw something like ...
6
votes
1answer
441 views

How to improve a tikZ diagram?

I am a beginner in LaTeX, tentatively trying to use it for industrial documents. I am trying to show graphically some of the drawbacks (vs LaTeX) of a solution using a professional publishing ...
7
votes
1answer
180 views

how to prevent combine ends of arcs of tikz-dependency

How to prevent the arcs from combining with tikz-dependency, like two arcs starting from "had" are separated from each other. but in the picture generated by the following code, below they are ...
8
votes
1answer
627 views

Creating a fraction graph in TikZ

Ok, so I was helping a friend of mine with a fraction problem on how to represent fractions so that they are easy to compare for children. We were thinking of a ruler and separate the ruler into ...
11
votes
1answer
3k views

How to specify a Tikz coordinate relative to a node?

is there a simple idiom (one not using the calc library) to specify a Tikz coordinate relative to a node? Something like \coordinate (x) [right=of A]; instead of \node (x) [draw=none, right=of ...
19
votes
2answers
754 views

TiKZ calendar: Easter related holidays

I wrote some code for finding the date of Easter. Now I want to use it with the TiKZ calendar to mark the Easter related holidays. Here's what I have so far: \documentclass{scrartcl} ...
8
votes
3answers
2k views

Surface plot with coordinates in pgf

Is it possible to draw a three dimensional surface using coordinates instead of formulas? MWE so far: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
8
votes
4answers
8k views

How to draw graphs in LaTeX?

I need to draw simple graph (for example Petersen Graph) in LaTeX. I am using Kile in Ubuntu. I exactly don't know that which package should I use. Any suggestion with example is highly expected.
10
votes
2answers
2k views

Two labels, one edge

Assume that I have a figure like the next one. How can I put two labels on the edge? For instance, here I would like to name the edge a and keep some auxiliary info associated with the edge. ...
5
votes
3answers
1k views

Phasors with tikz

This afternoon I was looking for a way to draw phasors with tikz (you know the thing which is represented in the complex plane as r*exp(i \theta) or simply x + iy) For me, the first representation ...
11
votes
1answer
716 views

Highlight a column in equation or math environment

While explaining the idea product of two negative numbers I wanted to highlight a vertical part of the display to emphasize on the factors that are being multiplied by: ...
6
votes
1answer
923 views

Sum and Difference on the number line using TikZ

I am trying to replicate the idea of sum and difference of real numbers on the number line and have been successful in some way. For example, the code: \documentclass[letterpaper]{article} ...