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)

2
votes
0answers
9 views

TikZ: Unexpected difference between \draw and — vs \path and edge

While modifying this answer, I encountered something unexpected. In my experience, using \draw (1) -- (2) is equivalent to \path (1) edge (2). However, adding the option to draw or edge suggested in ...
1
vote
0answers
19 views

What is the easiest way to accomplish textual data visualization in tikz?

Consider the following simple PV-diagram: The code below created it and the output is fine. I used kind of a workaround with an array to get the right tick labels on both of the axes. That works ...
7
votes
1answer
42 views

How to improve on this “twolines” decoration?

I'm typesetting an article on graphical calculus in tensor categories in TikZ and I wanted to define a decoration that draws two parallel lines at the same time. Here is my first try: ...
2
votes
1answer
14 views

style odd and even nodes near coords differently

I'm using this style definition in the preamble: \pgfplotsset{ base/.style={ ymin=0, xtick=data, nodes near coords, } } \pgfplotsset{ random/.style={ ybar=3pt, bar ...
4
votes
1answer
47 views

TikZ: computation in node name

I want to place a variable number of nodes on a page, but I also want to be able to give these nodes a (integer) name. However, I run into the problem that only certain kind of commands can appear in ...
5
votes
1answer
53 views

TiKZ generates unneeded whitespace

Edit: I did compile this document: \documentclass[DIV14,parskip=half-]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage{tikz} ...
2
votes
2answers
76 views

Optimized creation of text nodes

I have created a block diagram with several nodes with text and I need to optimize the node creation and hopefully use the \foreach construct to automate the creation of each node with its associated ...
3
votes
1answer
35 views

Alter location of edge in graph in tikz

So I have the following: \begin{tikzpicture}[shorten >=1pt,node distance=1.75cm,thick] \node (A) {$A$}; \node (B) [below left of=A] {$B$}; \node (C) [below right of=A] ...
2
votes
2answers
64 views

Creating Multiple-State Models (rectangular nodes)

I would like to replicate the following image for my work: I now have the following MWE: \documentclass[12pt]{article} \usepackage[margin=2cm]{geometry} \usepackage [english]{babel} ...
2
votes
1answer
27 views

Tikz externalization: Latex dvi/ps produces a4paper boundary-box around figure

I am successfully using tikz in combination with externalization and pdflatex for some time now. But now I need to switch to latex->dvi->ps. I followed the instructions from the tikz documentation ...
5
votes
1answer
85 views

Rotate only the shape

Is it possible to rotate only the shape, keeping the anchors and text inside the same? \documentclass[12pt,a4paper,preview,multi={tikzpicture},border=0pt]{standalone} \usepackage{tikz} ...
0
votes
0answers
17 views

Using tikzscale along with correct references in externalized tikzpictures

It is not advised to use tikzscale package along with mode=list and make based on Patrick's comment here: http://tex.stackexchange.com/a/89595/24167 However, the references (e.g. \cite) does ...
1
vote
0answers
38 views

Creating graph with shading and modified axis in Tikz / pgfplots /asy/ pst-plot? [on hold]

I am interested in a constructing a graph that is beyond the scope of my ability to code. I prefer pst-plot, but I realize pgfplots is more common. I am trying to create this drawing. Any help would ...
5
votes
1answer
90 views

How can I remove the white space within a cloud in TikZ?

I am trying to produce a figure which contains a cloud drawn around a set of images. The code I have so far is: \node [draw, cloud, cloud puffs=20, aspect=2, inner sep=0cm] (pathways) ...
2
votes
0answers
49 views

Custom tikz pattern: hatchangle

In PSTricks there exist the fillstyles vlines, hlines, crosshatch which have counterparts in tikz patterns library. However, in PSTricks they can be modified by following options: hatchwidth, ...
0
votes
0answers
31 views

Can I make an alias for a node argument in TikZ

When I am drawing illustrations with TikZ, the most common mistake I make is incorrectly writing the relative position of a node. I would for example write "left above" in stead of "above left". It is ...
3
votes
1answer
36 views

Undefined control sequence \draw and \end{tikzpicture}

I am trying to draw a picture in LaTex. When I compile the file it gives me an undefined control sequence error. I tried to compare it with my other documents but I can't find where the error is. I am ...
2
votes
2answers
94 views

How do I draw shapes inside a tikz node?

I know how to draw different shapes using tikz, like this: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) ellipse (1 and 1.5) (0,2.5) circle (1) ...
2
votes
1answer
39 views

Why does \resizebox around tikzpicture gives me undefined control sequence }?

As indicated in Scale tikz figure to a percentage of \textwidth I was expecting this to work: \documentclass{memoir} \usepackage{tikz} \usetikzlibrary{matrix,positioning} \begin{document} ...
4
votes
1answer
62 views

Making tikz draw go almost all the way

I have by looking at examples at this site got quite far with tikz but not all the way. I know this might be considered a bad question -- but since I got this far by looking at similar question this ...
4
votes
1answer
64 views

Tikz fill double line with pattern not with color

I'd like to fill the inner of a double line path with different patterns: hatch, random dots, Poisson discs, grid. Consider following hexagon, where I would like to fill the inner of the edges. ...
4
votes
1answer
50 views

Custom draws in matrix nodes in tikz v3 with referencing

With tikz v3 the matrix behavior has changed slightly. The great example at http://www.texample.net/tikz/examples/BER-measurement/ doesn't seem to compile any longer. The problem is that the default ...
3
votes
1answer
254 views

How to simplify path?

I have the following MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); ...
0
votes
1answer
59 views

Combination Function with Factorial - Not correct result - Pgfplots

\begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = $Number of Elements$, ylabel = {$Combinations=\frac{(n)!}{(n-r)!(r!)}$}, ] %Axis \addplot [ domain=2:10, samples=100, color=red, ] ...
1
vote
1answer
42 views

Using TikZ to label a Commutative Diagram with a Picture

I'm writing a beamer presentation and having some diagram troubles. Is it possible to label an arrow in tikzcd with a tikzpicture? For example, the code \begin{tikzcd} S^1 \arrow{r}{ ...
4
votes
2answers
68 views

representing a null child in a binary tree using `ground` symbol

I'm using ground symbol to represent a null child in a binary tree. But the ground symbol has arrows in it. How do I remove them? \documentclass{llncs} \usepackage{llncsdoc} \usepackage{tikz} ...
1
vote
1answer
50 views

PGFPlots - trying to combine legends

I have an interesting problem. I am trying to create two graphs using the groupplots environment, side-by-side, that show different sets of data elements with different legend entries and different ...
6
votes
1answer
51 views

Overcome 'Dimension too large' when using the forest package with a lot of nodes

I am drawing a genealogical tree with the forest package in which I have approximately 50 nodes. I have reached a point where I get the message "Dimension too large" when I try to add another node. I ...
3
votes
1answer
34 views

Centering / horizontal alignment of text inside tikz boxes

I am facing a problem with centering the text inside the boxes: \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook} ...
5
votes
1answer
70 views

Change node style in a tikz picture

I'm trying to change the node style so a node looks like a cylinder with a variable height. currently i'm using this code \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{tikz} ...
2
votes
0answers
42 views

Why is there a compilation error? - moderntimeline

I am using article class to prepare my CV. When I went through this, I found that moderntimeline package can be used only with moderncv. So I took only the TikZ code answered by Jake.But I get ...
6
votes
1answer
92 views

Aligning both tikz pictures and their captions

I am using two tikz pictures in subfigures. The baseline parameter allows aliging the subfigures via the nodes, however the caption (b) is much above the caption (a) in such case. If I don't you ...
3
votes
1answer
141 views

How can I draw an ellipse with a rainbow color?

I need to draw a rainbow-colored (hue colormap) ellipse in tikz. Something like this but then in an ellipse shape, and in tikz. I've thought about drawing to ellipses, one with rainbox filling, the ...
3
votes
1answer
90 views

Using tikz to create fancy Table of Contents

I am trying to create a fancy thesis style and I am stuck in the table of contents. I am adopting Pluton's idea from How to customize the table of contents using TikZ? but I get an error stating that ...
4
votes
0answers
59 views

Plot 3D stacked squares with shadow

This is an image I draw with tools. But I need to draw it with Tikz. And The 3 squares in the middle, I need to make them looks like 3D stacked with shadow. And the fonts on it, like 'a1', 'a2', ... ...
0
votes
1answer
54 views

Add a horizontal line to a PGFPlot and add it to the legend

I have a PGF Plot with some computational results from a CSV file. At the time the CSV file was generated, there was a value that was not known. That value needs to be on the plot also, however. What ...
3
votes
0answers
46 views

Getting a value, which has been given to a TikZ key

I'm trying to write a package based on TikZ, and this is the problem i'm currently stumbling upon. Let's assume, that I have a key, for example /tikz/circuit symbol unit, which executes some code. ...
3
votes
1answer
72 views

How do i get the coordinates (east, west, north) of an ellipsoid? (code does work for rectangulars)

\documentclass{report} \usepackage{tikz} \tikzset{add reference/.style={insert path={% coordinate [pos=0,xshift=-0.5\pgflinewidth,yshift=-0.5\pgflinewidth] (#1 south west) coordinate ...
4
votes
0answers
84 views

Draw background lines dashed in TikZ-3dplot depending on view position

In the graphic the red line is partly covered (in the background) of the 3d-object. Is it possible to draw the background parts of the lines dashed (or calculate the "intersection" points)? After ...
4
votes
1answer
143 views

Using TikZ to draw array figures

I am new in LaTeX and even more on TikZ. I want to use TikZ to draw the kind of figure described in the below picture. I looked for some tutorial or particular topics that deals with that but never ...
4
votes
1answer
44 views

tikz edges too long, how to control the distance of nodes

I have in a beamer class document the following graph: \begin{center} \begin{tikzpicture} [auto] \tikzstyle{every node}=[font=\small] \tikzset{ inst/.style={draw=black, rectangle}, ...
17
votes
4answers
779 views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} ...
1
vote
1answer
62 views

PGFplots - single legend in a group plot [duplicate]

I have a group plot and when I try to add a legend it repeats on all subgraphs. I want a single common legend line at the top of the whole graph. \documentclass{standalone} \usepackage{graphicx} ...
1
vote
1answer
47 views

PGFplots multiple ylabels

I want to have multiple y labels in a group plot. Now I have 4 different values for ylabels:Range1, Range2, Range3 and Range4. I want to add a common ylabel say "throughput". How do I do that? ...
2
votes
0answers
35 views

pgf Error: Arrow end type ``latex''' unknown

The following document: \documentclass[]{article} \usepackage{tikz} \usepackage{tikzscale} \usetikzlibrary{trees} \usetikzlibrary{calc} \begin{document} \tikzset{ block/.style = {draw, fill=white, ...
8
votes
2answers
106 views

Arrow tip center with TikZ (and pgfplots)

The arrow default behaviour is shown on the left picture part. How can I achieve that the “circle” arrow tips (see the picture below) end at their center, as drawn in the right image, but without ...
4
votes
1answer
51 views

Fading Nodes Along edge using `\draw`

How can i make nodes along an edge fade, here is the code i used to create the nodes \documentclass{standalone} \usepackage{tikz} \listfiles \usetikzlibrary{shapes,snakes} ...
6
votes
2answers
245 views

Drawing on a 3d cone with tikz

I can draw a cube as: \documentclass[12pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\cubex}{2} \pgfmathsetmacro{\cubey}{1} ...
5
votes
4answers
261 views

Difficulty with Tikz curves

I would like to draw this curve: Using tikz, I did the following \begin{tikzpicture} \draw [<->,thick] (0,5) node (yaxis) [above, text width=3.5cm,align=center] {$B_{J}(x)$} |- (7,0) ...
5
votes
1answer
98 views

Use timeline library with months

I'm trying to adapt this answer to a timeline that has months instead of years. The first part of the MWE below is just the timeline library. \documentclass[tikz]{standalone} % Timeline library ...