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)

8
votes
4answers
599 views

How to draw a circle whose radius is a multiple of the distance of two points in TikZ?

The following is the MWE for my figure: \documentclass{article} \usepackage{caption} \usepackage{pgf,tikz} \usetikzlibrary{arrows,shapes,calc,intersections,through,backgrounds} \begin{document} \...
5
votes
1answer
344 views

Clashing multirow with tikz

In order to get a diagonal line in a cell, I picked up a piece of code from Diagonal lines in table cell The code adapted to my situation works fine until I decide to use multirow. Here is the MWE. ...
7
votes
2answers
412 views

Using boxes (from \savebox) across beamer frames

I'm trying to use \usebox on different frames but it doesn't work as (I) expected. On the following example, I expected the second slide also containing one second ellipse. \documentclass{beamer} \...
1
vote
1answer
506 views

Including a tikz figure with a reference to a table on file, problems with folder structure

I am trying to include a tikz figure in the chapter 6 of my thesis. I am using separate folders and .tex files for each chapter, as you may notice in the example. This means that in my main document I ...
4
votes
1answer
711 views

TikZ fit nodes with non-regular shape

I am seeking a better way of doing the following: fitting nodes with a non regular shape, like it is in the MWE. So that I can give a label to the fitted nodes. \documentclass{standalone} \...
4
votes
1answer
509 views

Positioning one tikz with regard to another tikz nodes

I have two tikzpicture within a figure and I would like to place one tikz relatively to the other tikz nodes. I tried below of= with no success. The two tikz have different arrows and layouts. Here ...
1
vote
0answers
664 views

Trouble with 3D axis in pgfplots [closed]

I have texlive 2012 and have drawn a curve in three dimensions with pgfplots. That has not been a problem. The axes occurs in a way not appear well suited. In the code I indicated that ymax = 1.5, ...
2
votes
0answers
36 views

Is there a way to explicitly state what the ticks on a TikZ/pgfplots picture should say (ie 10.000 rather than 10)? [duplicate]

I'm trying to show that my graph has 5 significant figures on the y-axis. But I can't seem to get TikZ/pgfplots to show the trailing zeros though. I tried to get TikZ/pgfplots to show the extra zeros ...
7
votes
3answers
642 views

How to allow labels' anchors in TikZ to be affected by rotations without rotating the text itself?

I usually write macros when I need to draw many times a kind of figure. In the final document, I call the macro and then I always apply two transformations : a scale transformation to fit in the space ...
11
votes
2answers
385 views

How to create commands for automating the commenting process on some zones of a picture

I have a lot of comments to make on different pictures, I can do it with the following command for ex: \begin{tikzpicture} \node[anchor=south west,inner sep=0] (image) at (0,0) {\...
4
votes
3answers
395 views

Vertically and horizontally centering a matrix bigger than margins

This question is a follow-up on a previous question: positioning of a matrix bigger than margins That question dealt with positioning a pgf matrix that exceeded the horizontal margins of the page (...
5
votes
1answer
607 views

Is it possible to use commands defined in DTLforeach as conditions in a tikz environment?

I have been tearing out my hair with this one all afternoon and was hoping someone could help me. Essentially the problem I have is that I'm using a DTLforeach loop to iterate over values in a .csv ...
5
votes
1answer
2k views

Circuitikz place text above and below component

Lets say I create a component like this (0,0) to [R, l^=$R1$] (0,2) How can I make it so that the value, R1, is say, on the right hand side, and the resistance, say, 1kohm is on the left hand side? ...
9
votes
2answers
1k views

remove drop shadow from one node

I have a beamer document with many complex trees, so I set defaults for colors, shadows, and so on. Is there a way to remove the drop shadow from a single node? E.g., in the following tree, suppose ...
6
votes
1answer
571 views

No tick labels and adding title to groupplot generated plots

I am generating an array of plots using pgfplots and more specifically the groupplot environment. Here is an example: \begin{tikzpicture} \begin{groupplot}[group style={group size=2 by 2,horizontal ...
19
votes
2answers
1k views

Using tikzlibrary spy without magnifying line width and/or mark size

I am having two set of data and am trying to create an inset to show, where they differ. Therefore, it does not help me to simply magnify the area in a "canvas style" thus magnifying also mark sizes ...
6
votes
2answers
1k views

Alignment problem of empty cells when doing multirow/multicolumn cells in TikZ matrices

This is a question which has been discussed here and here. One of the solution discussed is to use fit to cover empty cells. However, while trying it, it displayed an alignment problem between the ...
5
votes
1answer
408 views

Custom T shape in TikZ

I would to define a new "T" shape (i.e. the red and green shapes in the following image) so that I can then draw with TikZ the diagram below. Unfortunately I cannot figure out how to do. To be ...
5
votes
1answer
1k views

Tikz automaton placed too far to the right

So I'm having a bit of trouble drawing an automaton that I've created. I've been looking around for a while to no real avail, so I decided to just ask the question myself: when I make an automaton (I'...
5
votes
1answer
454 views

Splitting circular nodes in tikz

I'm trying to reproduce the attached figure using the tikz package, but am having a hard time splitting the node with the {X,x} in it. Any suggestions? Here's what I've come up with so far, but it'...
1
vote
0answers
199 views

TikZ externalize and number of pages changing

I am trying to create a small animation at the bottom (odd pages only) of my PhD thesis (a walking pacman). Therefore, I have change the fancyfoot so it display a tikzpicture. Every thing works ...
4
votes
1answer
672 views

How to avoid shading of connection bars in TikZ mindmap

I am trying very hard since a while to draw a mindmap where shading of connection bars is avoided and where the connection bar's color is specified by me. For instance, I would like to draw two green ...
8
votes
0answers
428 views

Incompatibility with TikZ and Mac OS X Preview [closed]

I was quite suprised to find that some TikZ documents render incorrectly under Preview (on Mac OS X), despite working fine in Adobe Reader (on Mac OS X) and Evince (on Linux). This is Mac OS X version ...
8
votes
1answer
3k views

TikZ current page.north west shifted ~4pts?

I'm trying to draw a background grid on a page, but current page.north west is shifted down and to the right ~4pt. Anyone know how I can get the exact north west corner of the page? Here's an ...
2
votes
1answer
205 views

node on top of Gauss distribution

following this thread: gauss curves inside minipage and node I have the following working example with a very specific problem. I want to include the sigmas above the double arrows, but without the ...
5
votes
1answer
782 views

How to set a default parameter for all edges

Question How do you set all edges in an automaton to have the additional parameter double? This should be easy, but I can't find the solution here or in the tikz/pgf manual or anywhere else. ...
2
votes
1answer
233 views

mod() function in PGF/TikZ has strange behavior for negative values

It seems that the mod() function in PGF/TikZ has problems with negative values. The code \draw [domain=-5:5, samples=100] plot (\x, {exp(mod(\x+1,2)-1)-1.5431}); will produce this: Any ideas?
3
votes
1answer
337 views

TikZ - Why is the outer line of the grid way more bright than the grid itself?

Why does the outer line of the triangle grid (= the dark gray one) look so much more bright? It seems to get the same colour when I change draw=gray to draw=black, but that doesn't make much sense to ...
9
votes
2answers
3k views

TikZ: position text along path

I'm trying to position a piece of text at a certain position along a multi-part path. Here's what I have been trying so far. \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{...
4
votes
1answer
258 views

Enlarge graphic axis

I have a function ploted with pgfplots: \documentclass{standalone} \usepackage{pgfplots} \usepackage{helvet} \usepackage{sansmath} \begin{document} \begin{tikzpicture} \begin{axis}[ xlabel=$X$, ...
6
votes
2answers
468 views

Object Formatting: Graphics as In-line Symbols

I'm trying to create an in-line symbol that is a specific shape. I'm wondering how I can have something like this in my document:
7
votes
1answer
652 views

Draw randomized tree in TikZ

I am trying to draw a randomized tree using TikZ, that is, I'm looking for a macro \randtree{NN}{x} that attaches a randomized tree of maximum depth x to a node named NN. The nodes need not be visible ...
3
votes
1answer
381 views

Arrow alongside table

Long time listener, first time caller. I've got a table \begin{center} \begin{tabular}{cc} And two columns of pictures displaying results with a particular parameter increasing. I am trying to ...
7
votes
1answer
474 views

tikzpictures inside pgfplots' axis

When having a tikzpicture inside pgfplots's axis environment strange effects can be observed which I guess stem from the fact that the corresponding coordinate systems are interfering with each other: ...
7
votes
1answer
442 views

Transparency group and decoration markings

How can I set the transparency so that the arrow belongs to the same transparency group as the path? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{...
8
votes
2answers
637 views

TikZ: using the pos = x in a node

Why doesn't the pos = x option work when the node is used in the plot command? \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw plot[domain = 0:2, samples = 100] ({\x}, {(...
2
votes
3answers
484 views

Representation of Cross Product: A tikz Approach

How can I produce the following graph in tikz:
1
vote
1answer
312 views

Combine tikz external with pgf layers to “split up” a huge tikzpicture?

I have a huge tikz picture (consisting of up to several 10k elements, mostly rectangles and arrows) and want to "split up" the file using externalization to avoid expanding tex's main memory size (or ...
5
votes
1answer
337 views

Special daily calendar for whole year needed

I need to print out a special daily calendar sheet for every day of 2014. The solution here: Page a day calendar problems no longer is available, the link to mattjy.me is dead. The whole daily sheet I ...
9
votes
1answer
534 views

Why does coordinate (X) [midway] doesn’t work, while coordinate [midway] (X) is fine?

Why doesn’t the coordinate see the options if they are behind the name? With nodes it makes no difference wether the options follow or precede the name. \documentclass{article} \usepackage{tikz} \...
3
votes
0answers
831 views

includegraphics inside a TikZ node with XeLaTeX is incorrectly positioned when width or height is given [closed]

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} a\includegraphics[height=100pt]{example-image-10x16}b \begin{tikzpicture} \node[anchor=south west] at (0,0) {...
4
votes
1answer
950 views

Model Railway planning

As there are so many fancy things which are able to do with LaTeX, is there a possibility to create layouts for model railroads? I know only special (mostly Windows) programs, to do that, e.g. http://...
8
votes
1answer
539 views

double foreach for color shifting nodes

I want to draw the bottom series of circles: Here is my code: \documentclass[margin=.5cm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[every node/.style={circle}] \foreach \...
2
votes
1answer
735 views

TikZ edge between multiple source nodes and single target node

I'm trying to achieve something like the following: (Please ignore the node styles, I've sorted that part, it's the edges I'm struggling with!) My diagrams can have undirected edges that join ...
3
votes
2answers
162 views

How to add label to a 'copy shadow' of an object?

I use the following MWE which produces a stack of 4 squares with the top one marked by '0' label. What I want is to add labels '1', '2' and '3' to corresponding squares behind the top one. \...
6
votes
2answers
436 views

positioning of a matrix bigger than margins

A document I'm working on has a table that was complicated enough for me to try and make it using a pgf matrix of nodes. However, the resulting matrix ended up being slightly too big for the page. I'...
7
votes
1answer
246 views

White space creeping in when I place a tikz picture inside another tikz picture

I'm trying to design a seating chart for my classroom. I've done this using pstricks. I wanted to try it in tikz. What I'm doing is drawing a rectangle to represent each desk. Since the desks ...
6
votes
1answer
485 views

TikZ: showing a plane moving in 3 space

I have 2 identical planes a distance of \Delta t apart. I want to show that first plane is being pushed in the direction of the second plane. I was thinking maybe some randomly placed arrows tangent ...
2
votes
1answer
4k views

Enabling “--shell-escape” on TeXworks under MiKTeX

After resolving the problem on my previous question, I applied to finally install Gnuplot 4.6; and after a successful installation I had to allow the --shell-escape option on TeXworks, so I added a ...
5
votes
2answers
435 views

Overriding hyperref in TikZ/pgfplots

Is it possible to override the hyperref instruction of showing the references in a specific colour but only within the context of TikZ and pgfplots? The problem is that I am using legend to ref and \...