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
1answer
438 views

Marking (resampling) a point on a pgfplots curve, interpolated from table data?

I was looking for this in the pgfplots manual, unfortunately the term "resample" is not mentioned, and "sample" hits the samples key, which refers to analytical functions, not to table data; so I ...
1
vote
1answer
210 views

after end axis messes up pgfplots axis position

Latex and Tikz are going to get the life out of me... I saw Need to do some changes to pgfplots axis #39099, and that example was working fine for me; so I modified it a bit, and came up with the ...
4
votes
2answers
672 views

Arrows between two tables with multiple columns

How can I place two multicolumn tables (tableA and tableB) side by side and draw arrows from cell in tableA to another cell in tableB? I have tried this Arrows between two tables and its also ...
18
votes
2answers
638 views

“Drill holes” using glyphs or TikZ's even odd rule for text

I know how to use TikZ even and odd rule, but what I need is to apply it on a node text. Compare I need the text to be punched out such that when I use the resulting pdf on top of a background, the ...
5
votes
2answers
279 views

how to determine piecewise constant function representing binary data

I like to define function which represent binary data, but i stuck in this rather simple task ... my NWME is: \documentclass[tikz,border=3mm]{standalone} \begin{document} ...
6
votes
3answers
738 views

How to draw path between nodes of nested tikzpictures?

I'm trying to draw a path between nodes belonging to nested tikzpictures that are not in a direct parent-child relationship. The code looks like this: \begin{tikzpicture} %Container 1 \node ...
2
votes
0answers
217 views

Using tikz to create fancy chapters [closed]

I am trying to use Stefan Kottwitz's chapter style found on TeXample.net I am using the code as is but I can't seem to be able to compile it successfully. The code is \documentclass[svgnames]{book} ...
-1
votes
1answer
191 views

How to make a picture similar to this?

I would like to make a cover for my class notes! The Board I can draw. I don't know how to put the strip (which will contain the title of the Lecture Notes) on the Board: \documentclass{standalone} ...
11
votes
1answer
316 views

XeLaTeX can't use TikZ 3 features?

I copied this code from this answer. \documentclass[tikz]{standalone} \begin{document} \tikz [blend group=screen] { \fill[red!90!black] ( 90:.6) circle (1); \fill[green!80!black] (210:.6) ...
3
votes
1answer
213 views

pgfplots \closedcycle command inside \foreach returning error

The following code demonstrates the problem. It builds fine, but if I add the commented \closedcycle command, it won't build (undefined control sequence). \documentclass[tikz]{standalone} ...
3
votes
2answers
222 views

Drawing a Venn-Style-Diagramm underlying a Graph with TikZ

I want to draw a graph (the data structure) such that certain subgraphs form a sunflower (a notion from combinatorics). In other words I want to indicate that the sets overlap in the middle ...
10
votes
1answer
385 views

how to decorate a parametric function drawn with \datavisualization?

I have to plot a few parametric curves like the one on the left below, and I would like to add small arrows to represent the direction of the plot as parameter t increases from 0 to π. I know how to ...
8
votes
2answers
619 views

Positioning in TikZ flow chart?

Hi I'm new to the TikZ package (so I apologize if this is an easy question) and I'm having trouble with some formatting. Here's what I have so far: \documentclass{article} ...
4
votes
1answer
302 views

TikZ not drawing some lines in grid

When I use \draw to create a grid, several lines are missing. See the attached code and images, where, for example, the dashed red grid is missing the bottom and left boundaries. Actually the solid ...
2
votes
1answer
188 views

How to reduce the gap between the header and the figure in Latex

Please help me reduce the gap between the figure and the header in my code. I tried using position specifiers like h! or H but those take the figure on to the header slightly. I tried using vspace* ...
6
votes
3answers
286 views

Table with indices under every cell

Is possible to create a table (for example using tabular environment or tikz)in latex, but which under every cell has an index, which describes order of this cells? Something like this:
4
votes
2answers
349 views

Vertical align of a node

I have the following problem. As you see, the last nodes have a height that shrink the arrows. I want to fix the size of the arrows moving the nodes down. How can I do that? This is a example of ...
9
votes
1answer
378 views

Modifying the section, subsection and subsubsection style

I want to create this style: I want this executed every time I use the command for the section, subsection and the sub​​subsection I already have the code for the graphics, but I do not know how ...
8
votes
2answers
400 views

Connecting an arced path in TikZ

I'm trying to draw an octant of a sphere. I'm not an expert on drawing perspective, but I managed that with, among others, the arc command. With the sphere drawn I made some layers, again with the arc ...
1
vote
0answers
132 views

Flowchart arrows Using TikZ [closed]

I would like to write one continuous tex file for my entire flowchart, and let it automatically place itself on the right pages. Is there a way to do that? Currently I have to write a separate tex ...
13
votes
2answers
6k views

If-then-else inside TikZ graph?

I want to draw a graph like in the second picture of the following code: \documentclass{article} \usepackage{mathptmx} \usepackage{tikz} \usepackage{verbatim} ...
4
votes
1answer
182 views

Interpunction and tikz diagrams

I am using tikz for creating commutative diagram in a mathematical text. However, diagrams are part of text/sentences, hence I sometimes would like to end them with a comma or full stop. A standard ...
0
votes
3answers
199 views

Drawing Lines in Tikz

I am relatively new to Tikz and am trying to draw a diagram with lines in it. Here is my MWE \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,positioning} ...
3
votes
1answer
155 views

Polar pgfplots diagram adds additional whitespace with units library loaded

When doing polar plots in pgfplots (v1.10) I get additional whitespace when loading the units library. How can I get rid of that? I did not observe this before since it is related to the direction of ...
2
votes
1answer
329 views

Getting commutative diagrams in TikZ to work

I'm new to making documents in LaTeX, though I've used just math mode for a while. I've installed texlive-core via texlive-most from the Arch repositories and rendered a few basic documents. However, ...
15
votes
2answers
462 views

“Hobby” library stopped working after updating to TeXLive 2014

After upgrading to TeXLive 2014 compiling my TikZ pictures prepared with the hobby library stopped working. Consider the following MWE: \documentclass{article} \usepackage{tikz} ...
13
votes
1answer
1k views

How can text wrap around a figure in tikzposter?

While designing a poster with tikzposter I stumbled over a small issue. Usually one can use the wrapfig package to let text wrap around figures but in a box in tikzposter this seems to fail completely ...
2
votes
2answers
322 views

How can I align multiple nodes horizontally to another node / other nodes?

I'd like to align either one node A (see first center-environment in MWE) or multiple nodes A+AA (see second center-environment in MWE) to another set of nodes (B-F) so that they are centered to each ...
3
votes
1answer
134 views

Error cross-referencing when tikz mode is graphics if exist

I am getting the error "Undefined control sequence" when using \tikzset{external/mode=graphics if exists} and the label does not exist (It should produce a warning not an error, though because the ...
3
votes
1answer
170 views

TikZ - How can I align a node by a line which is a path?

I'd like to horizontally align a rectangle with several nodes in it with a rectangle with several nodes. The rectangles are above one another. When I boil down the code to a minimal example, the ...
1
vote
1answer
162 views

How to force the use of external graphics for selected figures while externalization is enabled?

I would like to force using external graphics (if exist) for a few figures in my document. The following does what I want but document-wide: \tikzset{external/mode=graphics if exists} however, I ...
1
vote
0answers
53 views

What are the unit of measurement in Tikz? [duplicate]

I want to know what are the units of measurement (of length) in tikz are available. I know that pt, in, mm like units are available , but what more are allowed in tikz? I work sometimes with qss ...
8
votes
1answer
3k views

How to install tikz/pgf libraries

I am trying to run a rather simple code using tikz and a pgf library. My simple code is \documentclass{book} \usepackage[explicit]{titlesec} \usepackage{fourier} \usepackage{tikz} ...
3
votes
0answers
273 views

callout with multiple pointers, how to design it

I know, that this question was asked more than year ago (see here), but given answer is limited to callouts without border line. Is there a way to improve there given answer with callout shape with ...
2
votes
1answer
278 views

Centering and Reference Coordinates

Question 1 Can I define reference coordinates for x and y and then use these coordinates to adjust my figures inside a Tikz picture? As an illustration, if I want to readjust all the rectangles in ...
2
votes
1answer
484 views

latex graph points tikz

I drawed a simple path in graph \begin{center} \begin{tikzpicture} \tikzstyle{every node}=[draw,shape=circle] \draw[xshift=-1cm] (-2,0) node[circle,fill,inner sep=1pt,label=below:$x$](x){}; ...
3
votes
2answers
352 views

Write numbers and draw rectangles with foreach

I am trying to draw a below given diagram for myself. I have been able to draw the rectangles using \foreach however I am unable to write numbers below the boxes as shown. Could somebody help me in ...
1
vote
1answer
372 views

Overlay subfigure caption with TikZ

I'm trying to place my figure captions on top of the figures. I've found some code that does this and I can get it to work for a normal figure - e.g. I can overlay "Figure 1" on top of the figure. ...
1
vote
1answer
186 views

\pgfdeclareshape: how to define anchors in a loop?

I think my question is quite similar to this and this, however I didn't manage to modify the provided solutions to fit my problem. In the following MWE I am trying to define 8 pin anchors in a ...
3
votes
2answers
416 views

tikzpicture to create a first page with an image in background taking the whole page

I am trying to create a newsletter with Latex, but I am not expert at all. My goal is, for the moment, to create a first page (the cover), with an image in the background, and some text overprinted. ...
3
votes
1answer
60 views

Breakage of Tikz fill operation on cycle path with let and node reference?

Consider this MWE: \documentclass[varwidth]{standalone} \usepackage{tikz} \usepackage{calc} % \widthof \usetikzlibrary{calc} \pagecolor{yellow!15} \begin{document} \begin{tikzpicture} \node (neL0) ...
3
votes
1answer
199 views

Pgfplots axis environment, loop for function works but not for plotting options

My question is related to this one, \foreach not behaving in axis environment , but the solution there does not work in my case and unlike the related question, the loop works well in the axis ...
2
votes
0answers
22 views

Passing changing (in a loop) parameters to Pgfplot function [duplicate]

Usually I just use TikZ for plots but was hoping Pgfplots would simplify life (axis, labels, etc...) but I can not find what is the right syntax to pass parameters to the function. Here is the MWE: ...
4
votes
1answer
1k views

TikZ - flexible arrow positioning

The following MWE is translating to the desired tikz picture, but the code is not very useful for adjustments. Especially the positioning of some arrows is done very poorly by defining coordinates ...
3
votes
1answer
1k views

TikZ: Replacing the values (labels) on x-axis with names

I managed to create a simple linear plot with pgfplots-manual (chapter 4.5.1) Now I want to replace the values of x-axis (1,2,3,4) with text, e.g.Test A, Test B, Test C, Test D. How can I do such a ...
1
vote
1answer
151 views

Embedded axis Pgfplots

So I need to display data as follows: every day for a month I have a set of values obtained in different hours. I want the axis to contain the date but between a date an another I want to have the ...
5
votes
1answer
2k views

“Illegal unit of measure (pt inserted)” using arithmetic in TikZ foreach

I am using a \foreach loop in TikZ with \i in {2,3,..,5} and I'd like to be able to use the value \i-1. However, every approach I have tried gives me a Illegal unit of measure (pt inserted) error. ...
0
votes
1answer
201 views

How can I connect centers of nodes defined using let in a foreach loop?

I want to create a star polygon using a \foreach loop to make nodes for the vertices and another \foreach loop connecting, say, every 4th node. \documentclass[12pt]{amsart} \usepackage{tikz} ...
3
votes
1answer
128 views

Tikz: Drawing lines with \draw[opacity = 0] produces .dvi files in which the lines are visible

Here's my MWE: \documentclass[11pt]{article} \usepackage{pgf,tikz} \begin{document} \begin{figure} \begin{tikzpicture} % Bounding box coordinates \coordinate (q) at (1, 0); ...
6
votes
0answers
101 views

Trying to draw a line that changes color [closed]

I'm trying to use tikz to draw a line that changes color at two different points. As you can see from the code below, what I want is a line that starts solid red, changes to dotted gray, and ends as ...