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)

10
votes
4answers
2k views

How do I shade an area in pgfplots?

How do I create a shaded area in a polygon created by plot intersections? In this case, up to the solid line without circle marks. \documentclass{article} \usepackage{pgfplots} ...
3
votes
1answer
331 views

draw a randomly fluctuating function

I wanted to draw the following My approach is to start from a sin^2 and then change the frequency with rand. My solution up to now looks like \documentclass[border=5mm]{standalone} ...
7
votes
1answer
853 views

Graph showing functions over the same x and y ranges

I want to draw functions and have used this code. But I don't like to give every function a separate domain, I want to say this function has ymax=4 and ymin=-3. Who can help me? ...
4
votes
3answers
331 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 ...
9
votes
2answers
880 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
389 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 ...
5
votes
1answer
835 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 ...
5
votes
1answer
290 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 ...
1
vote
0answers
167 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 ...
5
votes
1answer
279 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 ...
6
votes
1answer
2k 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 ...
4
votes
1answer
294 views

Using \phantom in subscript with the bayesnet TikZ library

I'm using the bayesnet TikZ library to draw a graphical model. Node variables might have different size, say $v_0$ and $v_{N-1}$ and the result is that some bubbles are bigger than others. I am trying ...
4
votes
1answer
478 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 ...
3
votes
1answer
260 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
2k 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} ...
2
votes
1answer
170 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?
4
votes
1answer
224 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$, ...
3
votes
1answer
262 views

Representing Equivalence Relations with Nodes, Loops, and Edges

I've never used TikZ for illustrating equivalence relations, but I thought I'd try it out. What I'd like to produce is something like this: What is the general method for connecting points to ...
6
votes
2answers
300 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:
3
votes
1answer
319 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
407 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: ...
2
votes
3answers
351 views

Representation of Cross Product: A tikz Approach

How can I produce the following graph in tikz:
13
votes
1answer
736 views

Table with rounded corners

I've taken an example of a very cool table from here and I've made some changes to suit my needs, the problem is that the table it's not correctly rounded: Unfortunately it doesn't seem to exist a ...
9
votes
1answer
331 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
689 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) ...
7
votes
1answer
416 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 ...
1
vote
0answers
202 views

Drawing recursive randomized structures with TikZ

After I learned earlier today how to draw nice randomized trees (Draw randomized tree in TikZ) , I discovered that I'm not quite satisfied with how the results look like - because the structure I want ...
8
votes
2answers
355 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}, ...
7
votes
3answers
518 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 ...
7
votes
1answer
462 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 ...
4
votes
1answer
187 views

TikZ and PGF — Design considerations and approach to sizing pictures?

The first pages of the TikZ/PGF manual specifies that measurements are in points, centimeters, or are relational to other lines/objects, but I don't understand how to determine that up front. I have ...
4
votes
1answer
1k views

Multipart nodes with multipart subparts — style issue

I want to typeset multipart nodes that have multipart sub parts — similar to the following diagram (from Miller and Ranum) I have tried using TikZ horizontal split rectangles inside vertical split ...
3
votes
2answers
132 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. ...
5
votes
1answer
259 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 ...
2
votes
1answer
488 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
797 views

Packages to plot functions such as the logistic function (or “S-shaped function”)?

Is it possible to plot the graph of an S-shaped function in LaTeX? If yes, then how? Which packages should I use for that?
1
vote
1answer
344 views

Packages needed for Latex from sagemath

I'm trying to export sagemath graphs using these commands: sage: M = Matrix ([ [0, 1, 1], [1, 0, 1], [1, 1, 0] ]) sage: # (the order is the number of edges) sage: G = Graph(M); G.order() sage: ...
6
votes
1answer
601 views

Problems with \pgfplotstableread and relative paths

I have this folder structure in my project: main.tex mystyle.sty tex mytex.tex img myimg.tex dat mydat.dat And the following files: main.tex: \documentclass{scrartcl} \usepackage{mystyle} ...
1
vote
1answer
244 views

How to create a Labeled Hierarchy using Tikz?

how would I create something like this? Is this tikz? What is the most user-friendly tutorial to starting tikz?
5
votes
1answer
241 views

tikz diamond node white space

I wonder how I can remove the white space between the diamond node and the link in the following MWE. \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{positioning,shapes,arrows} ...
6
votes
1answer
382 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 ...
6
votes
2answers
327 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. ...
6
votes
1answer
331 views

Different marker at specific intervals using pgfplots

I have a number of large data files with x rows in the range of 0 to z. Is there an easy way to set a different marker at specific intervals using pgfplots/TikZ? How can I produce a figure such that ...
5
votes
1answer
193 views

Alter font used for every pin in a plot

In some scatter plots I'm producing, I want to label each point using a pin. I achieve that by adding \node elements after the \addplot but within the axis environment, and using the pin property: ...
8
votes
1answer
737 views

Why does a tikz spy specified as a chamfered rectangle show up as a simple rectangle?

I'd like to use a tikz spy shaped like a chamfered rectangle. The code runs without complaining, but the result is a plain rectangle. "rounded rectangle" works as expected, as does ...
10
votes
1answer
537 views

TikZ- best practice for line starting on a circle's edge?

I'd like to know how I can achieve the best seamless crossover between a node (in this case, a circle) and a line starting on that node. I would like the line to only touch the circle's edge. So far I ...
3
votes
1answer
1k views

Drawing selected borders of a node [duplicate]

Is there a way to draw only selected borders of a node? The node shape I have in mind is rectangle. The \node[draw]... syntax draws all four borders of the node. But what if I want to draw only the ...
5
votes
1answer
304 views

Add a gaussian curve in a specific location in a tikz diagram

I'd like to put a gaussian curve in a specific location in a diagram I am creating with tikz. I found the question Bell Curve/Gaussian Function in TikZ/PGF, and I can use this to add the gaussian ...
0
votes
1answer
223 views

Problems with xelatex and arc in tikz

When I use \setdefaultlanguage{thai} and arc command, output not smooth. How to set my XeLaTeX code? I think this ploblem about thai scale, or not. \documentclass{article} \usepackage{polyglossia} ...
10
votes
2answers
387 views

Drawing an envelope in tikz

How could I define and evelope shape like for example this one in Tikz? If possible it would be great it there was an option to write inside the upper triangle (and so the shape should be able to ...