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
7k 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 ...
4
votes
1answer
1k views

tikz - node covering several columns

Is there an easy way to stretch a node in a matrix environment in TikZ over several columns? In the following example I want to merge the three nodes in the second row as one wide node. Any idea? ...
5
votes
1answer
428 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 ...
8
votes
1answer
1k views

Contour plot labeling applied to ordinary 2D plots

I was trying to obtain the effect that I manually created below,shown with the letter n. Now, I know that this is customary to do in contour plots, hence I've checked the manual and saw that it is ...
9
votes
1answer
14k 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} ...
3
votes
1answer
844 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 ...
6
votes
1answer
447 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 ...
12
votes
1answer
15k 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 ...
12
votes
1answer
837 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: ...
0
votes
2answers
183 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
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 ...
5
votes
2answers
3k views

Drawing network protocols

I want to produce network protocols, a very simplified example of which is depicted below: The protocol has two parties, each of which does some computation and then communicated with the other. I ...
2
votes
1answer
958 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?
6
votes
1answer
11k 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} ...
6
votes
2answers
11k views

How to plot f(x)=sin(x), k(x)=cos(x) and u(x)=x² with TikZ

How can we plot the following three functions f(x) = sin(x) k(x) = cos(x) u(x) = x² for x ∈ [0,1] on a single plot with the help of TikZ?
11
votes
1answer
3k views

TikZ crop image

Is there a way to crop everything outside the bounding box? I made some periodic pattern in TikZ but I wanna crop it outside some box. Just making a bounding box helps for the alignment but the ...
21
votes
2answers
2k views

tikzmark to have different behaviour if first run (and mark locations not yet available)

The macro \tikzmark has been incredibly useful to me, but do not like the default behavior upon first run. So, I would like to be able to determine if this is a first run (where there coordinates of ...
10
votes
3answers
2k 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 ...
12
votes
1answer
2k views

How to combine a timeline with a calendar

I'm using the pgfgantt package to create a timeline. This is what I've got so far: \documentclass[landscape]{article} \usepackage[dvipsnames,usenames]{xcolor} \usepackage{tikz} \usepackage{pgfgantt} ...
3
votes
1answer
958 views

pgfgantt: Change Link style

I'm using the pgfgantt package to draw Gantt-Charts. Everything works except for one things: I can not change the style of the links. The documentation shows on page 29 the following example: ...
27
votes
3answers
5k 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 ...
6
votes
1answer
418 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 ...
0
votes
1answer
1k 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 ...
11
votes
3answers
9k 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
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 ...
6
votes
1answer
556 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 ...
5
votes
2answers
1k views

Problem with preview package (and standalone class) with tikz

I updated MacTeX recently with TeX Live Manager and I installed the last tikz/pgf CVS (02/12/2011) and I got a problem with the standalone class. The size of the picture seems fine but nothing is ...
3
votes
2answers
444 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 ...
2
votes
1answer
128 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 : ...
21
votes
4answers
5k views

Override TikZ externalize “up-to-date” flag

I am currently using the TikZ external package in order to avoid recompiling all figures in my thesis. There are more than 50 figures, relying on large data, and a full build without externalizing ...
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": ...
1
vote
0answers
118 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 ...
5
votes
1answer
2k views

pgfplots axis cs nodes inside a scaled tikzpicture

I would like to join a node inside a pgfplots axis to a node belonging to a different tikzpicture. I can do this with an overlay from inside the axis. However, if I scale the tikzpicture that encloses ...
5
votes
1answer
782 views

How to shift error bars along with data bars?

I am trying to create a figure with two bar graphs with bars grouped two by two. I use bar width and bar shift to separate the bars. My problem is that I want to add error bars to these plots but I do ...
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
352 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 ...
11
votes
4answers
8k 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 ...
16
votes
5answers
1k views

TikZ Grid Without Edges

I have a TikZ grid \draw[step=0.5cm,color=gray] (0,0) grid (3.5,3.5); But I'd like to draw the grid without edges, or with half of the edges cells missing, so that it appears to be a small section ...
6
votes
1answer
497 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 ...
8
votes
1answer
845 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 ...
13
votes
1answer
5k 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 ...
6
votes
3answers
2k views

Plot a matrix of real values with TikZ/PGF like imshow in matlab

How can I plot a matrix of real values with TikZ/PGF such that it looks like plotted with imshow in MATLAB? \addplot3 does something similar, but I'd like to have that in a color-coded 2D plot.
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. ...
7
votes
1answer
1k 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} ...
7
votes
1answer
168 views

How to make a vertical/horizontal line cap independent of how the paths lies?

Is it possible to make the line cap in TikZ always be vertical (or horizontal or a 90 degree edge)? Maybe as an option to line cap or even better as an arrow tip. I imagine a type vertical resulting ...
12
votes
2answers
865 views

Status of TiKz with ConTeXt MkIV

Whats the recent status of TiKz support in ConTeXt MkIV? I'm asking because in pgfmanual 2.10 on page 25 it says: Note that pgf/TikZ is not supported by recent ConTEXt versions (like mark IV, the ...
19
votes
1answer
4k views

Inline TikZ - vertical centering

If I inline a bounded line segment like this: the distance \tikz{ \draw [|-|] (0,0) -- (5ex,0); } overarching the activities how can I make the line appear vertically centered on the line ...
4
votes
1answer
2k views

RGB Colors in TikZ and conversion with ghost script to PNG

Since a few days I am trying to find a solution for the folowing problem: I am creating a Tikz picture with a simple rectangele and fill the rectange with a special RGB color. The code looks like ...
6
votes
1answer
9k views

Creating double arrow / parallel arrows with tikz

I just spent a couple of hours trying to figure this out, using google etc. but I couldnt find the answer. I made this diagram and the only thing I want are two parallel arrows that go from node A ...
6
votes
1answer
850 views

What is the correct way to pass array elements to TikZ styles?

I'm trying to use styles to generate TikZ figures that have repeated, regularly spaced elements by looping through an array, but am perplexed by the results I'm getting. For example, if I define the ...