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)

1
vote
2answers
17 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
27 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} ...
3
votes
1answer
42 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 ...
12
votes
3answers
685 views
+100

How to shade a single character?

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} ...
3
votes
1answer
43 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. ...
3
votes
1answer
38 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 ...
6
votes
1answer
46 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 ...
1
vote
1answer
118 views

How can I add a shaded, thick arrow to a Tikz picture?

I have created a directed graph and want to add a thick, shaded arrow to indicate change over time. The problem: It should go from one edge to another (from initial state to result state), not from ...
3
votes
1answer
236 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); ...
3
votes
1answer
134 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 ...
0
votes
1answer
50 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
36 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
1answer
65 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} ...
20
votes
5answers
5k views

Label angle with tikz

I am able to draw a nice right triangle with \begin{tikzpicture}[thick] \draw (0,0) -- (4,0) node[midway,below]{$f$} -- (4,2) node[midway,right]{$\frac{x}{2}$}-- cycle; \end{tikzpicture} Now I ...
3
votes
2answers
57 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
47 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 ...
0
votes
1answer
53 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 ...
4
votes
0answers
80 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 ...
3
votes
1answer
71 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 ...
3
votes
1answer
32 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} ...
2
votes
1answer
80 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 ...
2
votes
3answers
128 views

Create a good looking 2-actor normal-form game such as Prisoner's Dilemma

I am having difficulties in adjusting the TikZ code to get a symmetrical output matrix; I guess the * is the reason the right block is somehow higher? ...
2
votes
0answers
41 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
86 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
134 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 ...
4
votes
0answers
54 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', ... ...
3
votes
0answers
43 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. ...
7
votes
1answer
140 views

Logarithmic scaling of picture in tikz

I'm looking for something along the lines of \begin{scope}[scaling=logarithmic] ... \end{scope} The reason is, that I'm trying to visualise whether the Minkowski sums of some specific sets in R^2 ...
18
votes
6answers
10k views

How to establish node-anchor-like points on a (tikz) rectangle path (is there a better method than the one described)?

Background and desired functionality Rectangles can be drawn with tikz in a number of ways, one way of doing so is to define a rectangle node as follows: \node (rectangle) [draw, rectangle] {A ...
2
votes
2answers
487 views

How to draw spherical using 3dplot

I would like do draw some sphericals using the package 3dplot. Does anybody know how to draw spericals with different diameter and postition in a coordinate system like that one? ...
8
votes
2answers
101 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 ...
3
votes
1answer
40 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}, ...
2
votes
1answer
62 views

Unwanted empty page in the middle of a chapter

I am having an empty page in the middle of a chapter of my document. The only information that appears is the page number. The pages before and after are filled with text and figures. I have checked ...
2
votes
1answer
303 views

Want to add the Skype and LinkedIn Icon on the left side of Friggeri Resume?

\documentclass[]{myfriggeri-cv} % Add 'print' as an option into the square bracket to remove colors from this template for printing \usepackage{unicode-math} \usepackage{fontawesome} ...
0
votes
0answers
47 views

Notify changes into linked figures [on hold]

In my previous post I had an initial linked figure. However I would like to annotate some changes like the image following: The already existing code is: \documentclass{article} \usepackage{tikz} ...
5
votes
1answer
96 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 ...
1
vote
1answer
61 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} ...
5
votes
3answers
178 views

Using calc: Draw tangent lines to an ellipse path by tikz

I wonder if one can draw tangent lines out of a point to a path of an ellipse using tikz. Actually for the case of circle paths this can be accomplished easily as given in the tikz-pgf manual, but for ...
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? ...
6
votes
2answers
240 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} ...
4
votes
1answer
48 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} ...
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, ...
5
votes
4answers
255 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) ...
3
votes
1answer
76 views

Close a cycle in a TikZ graph with a loop

Consider the following simple flow diagram. I like using the graph drawing library in TikZ for its simplicity and semantics: \documentclass{standalone} \usepackage{tikz} ...
3
votes
1answer
85 views

change position of TikZ node halfway

I am trying to move the node "H" to one of the two positions shown in red below: I am not sure how to position it at 'intermediate' positions such as I am suggesting. How could this be done? Is ...
7
votes
1answer
322 views

Drawing tree canopy

Is it possible to draw a tree canopy in latex, possibly with tikz. An example: So, on the left of this image you will see a bunch of trees, can these be re-created with tikz?
10
votes
2answers
342 views

Referring to tikz picture again in the same document

I couldn't really think of a reasonable title for this question; but anyhow, here goes: I saw a very interesting question and solution today here: \documentclass{article} \usepackage{tikz} ...
7
votes
2answers
313 views

Drawing circular paths in random locations (TikZ)

How can I draw circular paths as shown below in random locations (randomly spaced in the x and y directions)? MWE: \documentclass[border = 0.12cm,tikz]{standalone} ...
3
votes
1answer
118 views

Removing bounding box of text node (tikz)

When I added some text into my Tikz figure, it also hows the bounding box how can I get rid of it. (I took the example from: TikZ Adding Text) Here is what I've got: \begin{figure} ...
10
votes
2answers
176 views

How to divide with tikz calc (to find center of mass)

I am trying to calculate the center of mass of a few coordinates and the logical way of adding up and then dividing results in an error. \documentclass[a4paper,14pt]{scrartcl} \usepackage{tikz} ...