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)

5
votes
1answer
995 views

Pgfplot barplot with cluster of stackedbars

How can I create a pgfplot that have two stacked ybar for each "point in x axis" ? I wan't something like this: I already have a graph that have one stacked bar for each x point. Some hint on how ...
1
vote
1answer
101 views

TikZ compiles fine with pdfLaTeX but all labels are placed at origin with pdfTeX [closed]

I have the following code that works just fine when I compile with pdflatex, but does not work right with latex. In the second case, the lines are fine (at least to my eyes) but all labels are written ...
9
votes
1answer
583 views

How to draw tangent lines at control points of a path in TikZ?

I'm drawing smooth paths by using the \draw plot[smooth, tension=.7] coordinates ... command. Now I would like to draw tangents at the specified coordinates. I alreade tried Jake's answer, but I ...
4
votes
2answers
382 views

Vertical line in middle of a binomial tree (lattice)

This is a really tough problem that I have no idea how to solve. I wish to have a dotted veritcal line in the middle of my binomial tree, with a $\tau$ underneath.. The kind of thing I want is as ...
2
votes
1answer
280 views

Making 1 skinny column in TikZ binomial tree

I have a binomial tree with arrows pointing backwards. I currently have short arrows pointing towards the left-most node (which is invisible). This first colum is taking up very little visual space, ...
1
vote
2answers
172 views

correcting kerning for tikz shapes as accents in mid-word

I'm trying to place arrow shapes above certain letters in a text. I tried compensating for the extra space of the tikzpicture in mid-word, using execute at begin picture and its end pair. The results ...
4
votes
3answers
833 views

Highlighting some nodes of a TikZ binomial tree

In this binomial tree I have 4 columns of nodes. I want the entire last column to be highlighted with light blue, and perhaps a border around this highlighting. Something like a opaque blue-ish ...
3
votes
1answer
482 views

Problem with pgf-pie and \newcommand use

I am currently using pgf-pie package and I face a problem when I write the pgf-pie content using \newcommand instruction. The following MWE \documentclass{standalone} \usepackage{pgf-pie} ...
13
votes
1answer
581 views

TikZ: decoration - random steps: how to get twice exactly the same shape?

I'm creating a beamer presentation, in which I use TikZ. I am making a figure, on which I would like to highlight something (using \only<> command). My figure contains an ellipse that is ...
6
votes
2answers
328 views

How to use option fill (fill=white) in a postaction decorate text path?

I use this command to draw some text along a circular path. But this text overlaps a vertical line (for example). Will I wish that the text appear “in front of” and what is behind the text is thus not ...
8
votes
1answer
158 views

Partway calculation along a bend

I apologize if this question has been asked. I think it should be fairly simple, but I've looked around a bit and I can't find anything that does what I'm looking for. I know you can calculate, ...
3
votes
0answers
237 views

*** glibc detected *** error from texmaker in tikzpicture environment [closed]

I am facing a very strange problem. Texmaker quits with an error under a very specific condition, which has nothing to do with compilation, but rather what I type. Say for a minimal working example, I ...
3
votes
1answer
240 views

Error in start node of path

Getting a strange error where any path from a certain node starts in the incorrect place. The red paths are identical in code. The image on the left is what I expect, but the image on the right is ...
10
votes
4answers
762 views

How to randomly shuffle a sliced image?

I have no idea to shuffle the following grids of a sliced image. How to do this in (La)TeX or PostScript level? \documentclass[pstricks,border=12pt]{standalone} \usepackage{multido} ...
5
votes
1answer
1k views

Ground symbol from circuits.ee.IEC library

I wish to draw a ground symbol in a circuit diagram using the circuits.ee.IEC TiKZ library. The example in the PGF Manual (pdf) on page 311 shows exactly what I want. However, when I try to draw it, ...
12
votes
1answer
397 views

How this shading effect would be applied to an mdframed environment?

I'd like to apply the following shading effect proposed in " Fake sheet effect " as a background for a mdframed environment. How can this be achieved?
2
votes
2answers
540 views

Drawing a complex figure in Tikz

I want to draw this figure in Tikz (apologies for poor image quality): However, I can't quite figure out a good way to go about it. The only way I know how to draw this is as follows: Declare a ...
5
votes
1answer
1k views

Create custom colored PGFPlots ybar with consistent spacing

I am trying to create a ybar graph that has consistent spacing between a set of columns. I have obtained the color scheme I need in the following example, based off guidance from this question on ...
9
votes
2answers
1k views

Node positioning relative to 2 other nodes

I'm wanting to align/position a node relative to 2 others. Basically I'd like everything to be in rows and columns (whose is determined by the largest member). In this specific instance, I'd like node ...
8
votes
2answers
1k views

Workflow diagram

I would like to make a workflow diagram like this: I found TikZ, but the sequence diagram example seems a bit obscure…
9
votes
1answer
760 views

Node spacing based on node boundaries [duplicate]

TLDR: Is there a way to get the nodes to space based on their 'tips'. Thus avoiding the x-scale=#cm all over the place to get things just right. I am in the process of converting a bunch of visio ...
3
votes
1answer
630 views

Plot marks filled and drawn, but not the path

Is it possible to have it so that the plot marks would be filled and drawn, but the actual path wouldn't be drawn? Here is example where it is otherwise the way I'd like, except those dots' should be ...
9
votes
1answer
2k views

TikZ: turning edges into arrows using “child” notation

I'm using TikZ for the first time to draw a simple Kripke model, and I'm using the child notation to produce new nodes. How can I turn my edges into arrows? \begin{tikzpicture} \node [circle,draw] ...
2
votes
1answer
98 views

TikZ: lineto to a just created node

Often, when drawing diagrams with TikZ, I’d like link nodes by edges just as I draw them. But when doing it the naive way, e.g. \draw (0,0) node {A} -- (1,0) node {B}; the line intersects with the ...
18
votes
2answers
338 views

Does a zero-length line with an arrow make sense? Is it a bug?

\documentclass[pstricks,border=12pt]{standalone} \usepackage{pstricks-add} \begin{document} \multido{\i=0+30}{12}{% \begin{pspicture}(-2,-2)(2,2) \pscircle{1} \pnode(1;\i){R} ...
7
votes
3answers
844 views

Draw only part of a rectangle in Tikz

How can I draw only parts of a rectangle? I want to omit a small part of the rectangle to put some text in. As I'm using various complex rectangles, I do not want to construct own "open rectangles". ...
2
votes
3answers
200 views

Macro to check if an element is a member of a list, and access associative lists

Inspired from Macro to access a specific member of a list. I want to have a macro implementing the lisp functions (member item list) and (assoc id alist). The first checks if an item is contained in ...
13
votes
2answers
1k views

Path to midpoint of other path

I would like to end a path at the midpoint of another path. My inclination has been to try and end the path at an offset equal to half the node distance from d.north, but any thing I seem to try will ...
3
votes
1answer
291 views

Is tikz the easiest way to draw a model like this?

I'm losing my fingers drawing this figure: Does anybody knows whether tikz is the best way to do that?
2
votes
1answer
605 views

TikZ change matrix cell color background

I have a TikZ code that generates this: using something along the lines of the following snippet. The full code corresponding to this snippet can be obtained from the answer to question ...
41
votes
5answers
3k views

3D helix torus with hidden lines

How can I generate the above image using TikZ (possibly other methods will work if they produce better looking results)? I would like to have a nicely shaded (not so dark image) without gridlines ...
8
votes
3answers
1k views

Improved Unit Circle Animation

I'm trying to improve the sine/cosine animation provided on texample.net to suite my needs. I wanted to add a plot of the sine and cosine part and tried using pgfplots for this, as it can evaluate and ...
3
votes
1answer
372 views

How to connect two childs? [duplicate]

Possible Duplicate: How two connect any arbitrary nodes of tree in tikz Hello everyone I'm new to latex. And just started using the tikz package to draw. I have here a code below, which is ...
4
votes
0answers
67 views

Rotate the fill pattern with the shape in tikz [duplicate]

Possible Duplicate: Moving tiles of the pattern in TikZ I have a rotated rectangle filled with a pattern, and I would like to also rotate the pattern by the same amount. In this MWE, the ...
7
votes
1answer
898 views

TikZ in LyX: Package tikz error?

I am trying to compile a document that uses the tikzpicture and pgf packages, but I am getting this error UPDATE Code: \begin{tikzpicture} \begin{semilogyaxis}[ ...
17
votes
1answer
2k views

TikZ two-blocks matrix

I would like to get a plot like the one I sketched below, basically two blocks of the same matrix with arrows going up and anti-diagonally for the red block and arrows going up for the green one. The ...
1
vote
1answer
180 views

tikz matrix keep spaces in text

I have a tikz matrix row1 & a b c & d e f \\ row2 & 1 12 16 & 34 2 55 \\ .... and I need to keep the spacing correct(basically use a monospaced font) for correctly ...
3
votes
1answer
220 views

Tikz matrix with header row

How can I create a tikz matrix where the first row is a header row with nodes that are centered and all other rows after that have the text left aligned H1 H2 H3 adfsf 34993 ddddd ...
6
votes
1answer
295 views

Positioning of rotated nodes in a matrix

I'm trying to create a tikz drawing similar to this picture: In the code below I have used matrix nodes for both of the "parts" but I can't get the phases (in the picture above the rectangles with ...
7
votes
1answer
1k views

Draw outside axis with pgfplots

I have the following diagram, and would like to extend the red line so it crosses the axes and goes on for a bit at the start and the end like in the second picture, but I would like the red and blue ...
4
votes
2answers
1k views

Fixing a circuit diagram

Making some electric circuits in tikz for the very first time, and need to replicate the following image Not a very complicated circuit. Now here is what I have done so far ...
10
votes
2answers
868 views

TikZ marking several blocks in a matrix

I would like to mark a few blocks in a matrix and I followed directions from other similar questions but I get a weird TikZ behavior .. seems that I can not have more than one marked block in a ...
5
votes
1answer
2k views

Snake decoration does not work with decorations.pathmorphing in tikz

I have simple example that works fine \documentclass[a4paper,12pt,oneside,titlepage]{report} \usepackage{tikz} \usetikzlibrary{snakes} \begin{document} \begin{figure}[H] ...
6
votes
1answer
554 views

Animated Merge sort example

I would like to create a merge sort example like this one on Wikipedia:Merge Sort. Can someone help me? here is what I've done so far, but it doesn't work properly and effects are not like in ...
9
votes
3answers
610 views

How do I make a script to make inkscape TikZ more human readable

When I export a svg file from inkscape to TikZ, the result is often huge, and not very human readable. I would like to write a perl script for post processing the output. The script should be able to: ...
7
votes
1answer
220 views

Layers don't work in an `overlay` picture

I have the following two tikzpicture, where the second needs the overlay. However, with that option, the line drawn from A to C goes through B, despite the \begin{pgfonlayer}{back}…\end{pgfonlayer}. ...
6
votes
1answer
641 views

Making the y-axis range of a plot have more values in some parts

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{pgfplots} \begin{document} \begin{figure}[H] ...
6
votes
2answers
1k views

Tikz realistic 3D grid

I need to draw a 3d isometric grid/lattice using tikz that is not visually confusing. It needs to be at least 6x6x6 but possibly bigger. I sort of would like to have it fade into the background or ...
1
vote
1answer
468 views

TikZ Compatibility [closed]

Is the TikZ package incompatible with other LaTeX packages? The preamble of my code is as follows. When I load the TikZ package, I cannot compile my file. Any help would be much appreicated! ...
6
votes
1answer
488 views

Plotting a straight line to the peak point of a graph

For the MWE below: \documentclass{report} \usepackage[left=2.5cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage[T1]{fontenc} \usepackage{pgfplots} ...