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
0answers
13 views

Drawing multiple Binary Array using Tikz

I am trying to draw an image like the below one using Tikz. However, as I am a beginner of Tikz, I am having a hard time to accomplish this. Any help is highly appreciated. Thanks
4
votes
1answer
31 views

Drawing boundary around nodes

I have a figure like the attached one which is produced by the below code. I want to draw a dotted boundary around some nodes as shown in the image. Whats the best way to do that? Any tips is highly ...
3
votes
1answer
27 views

How to move anchors in new circuitikz component?

There are some components missing in the nice circuitikz package. I tried to create these with help of the answers to questions CircuiTikZ — create new component and New component in circuitikz. Now I ...
3
votes
3answers
41 views

nodes vs coordinates. lines are drawn inside nodes

The plot tries to draw the joints and links of a robotic manipulator. Initially I defined the points for the joints as nodes and this resulted in some shift when lines were later drawn between them. ...
2
votes
2answers
31 views

how to modify the code to change the size of blocks or nodes with maintaining the symmetry

How I can change the size of nodes to add some text in it. Below is code and second diagram is generated from this code. \begin{figure} \usetikzlibrary{trees} \begin{tikzpicture}[sibling ...
3
votes
1answer
53 views

Can't find a proper right-curved, non-continuous function

Hi everyone! I should reproduce these plots (above) and I'm so far that I have everything except for the plots themselves. Does anyone here have an idea what kind of plots should I take? I'm not a ...
0
votes
1answer
13 views

matlab2tikz one label entry missing

when I use the command matlab2tikz, I have one label missing. I have a specific procedure to make this figure because I want only some marker in Matlab. To do that for one plot I make this following ...
2
votes
1answer
47 views

Plotting issue with tikzpicture/addplot

Can someone help with workaroung about such issue? Windows 7, MiKTex 2.9 Code \addplot [only marks, mark=o] table[x index=0,y index=1,col sep=comma] {data.dat}; works just fine, but \addplot ...
1
vote
1answer
24 views

Externalizing tikz with precompiled preamble

This is a very special case, I guess, but it's what I need: %&Testing \documentclass{article} \endofdump \usepackage{pgfplots} \usetikzlibrary{external} \tikzexternalize \begin{document} ...
1
vote
0answers
16 views

TikZ (tikzexternalize) + subcaptionbox error

I use subcaption's command \subcaptionbox twice in a figure. In each subcaptionbox, I place a TikZ picture. This works fine as long as I don't change one of the pictures. As soon as I change it, I ...
4
votes
2answers
61 views

Composite function set diagram

Would anyone be kind enough to help me with the finishing touch of the following beautiful diagram? I need to draw the curved yellow line. Thank you \documentclass[]{article} \usepackage{tikz} ...
5
votes
1answer
56 views

How to conditionally load `tikz` and draw a TikZ diagram when `preview` is not loaded

How can I conditionally load tikz and draw a TikZ diagram only when preview is not loaded, i.e., AUCTeX is not generating images for other things (e.g., mathematical formulas)? MWE: ...
6
votes
2answers
121 views

Drawing multiple circles on Tikz

I want to draw a unit circle with multiple circles with centred on (cos(x),sin(x)). \begin{tikzpicture} \draw (0,0) circle (2cm); \coordinate (a) at (2;10); \draw (a) circle (0.3cm); ...
2
votes
0answers
41 views

Filling an area between curves [duplicate]

I've recently started to write a Calculus material, topic "Area Between Curves". I'm trying to fill the area between those graphs as shown in the picture, but I haven't had success: ...
21
votes
2answers
3k views

Has anyone ever drawn a football field in latex?

Has anyone ever drawn a football field in latex? I know that could seem like a strange request. But I'm looking for a package that allows me to draw a football field.
5
votes
2answers
80 views

Tikz node does not appear in forest

I have a command for putting a text in a rounded corner box with bg-color. It uses tikz node: \newcommand\mybox[1]{\tikz[overlay]\node[fill=blue!20, rectangle, rounded corners=2pt]{#1};} When I use ...
2
votes
1answer
29 views

Font size macro in tikz font style

I have a set of tikz styles I use for multiple tikzpictures in my document. These styles are in nodestyle.tex. I can optionally modify the size in those styles by doing \newcommand{\trnodesize}{1em} ...
1
vote
1answer
61 views

How to draw the following picture using TikZ or PGF?

How to draw the following picture using TikZ or PGF?
1
vote
1answer
81 views

How to draw a sketchy surface

Maybe the answer is that Tikz is not a good option for this but I was wondering how can I draw a random surface. I mean the kind of sketch you see during geometry classes to gain intuition about the ...
6
votes
2answers
82 views

TikZ custom “to path” with curved edges

I am trying to define a style that sets to path such that a “curvy rectangle” (manifold representation) is drawn when I put \draw (0,0) to[manifold] (5,3). I have manually made the shape by ...
1
vote
1answer
100 views

Part of a chessboard - tikz

I'm a real beginner in using tikz and I would like to create something like this: Is there a fancy/easy way to create something like this?
1
vote
1answer
44 views

Not all code is shown in the pdf

So I found an example online of how to create a certain figure (tikzpicture). Now I have created the figure in latex, but somehow my Title and section text will not show. I guess this is because I ...
8
votes
3answers
351 views

Any shorter code for drawing this in tikz?

Are there any possible shorter codes of drawing this diagram, maybe using graphs but it is not a regular polygon, or shortening the repetitive \draw in my code: %% filename henry3.pgf ...
4
votes
2answers
138 views

How to access the arithmetic value of count in \foreach, and use them in rotate box{}?

I have a question about access the mathematical value of count in \foreach, I will used that value to do some calculation in the following code. But it didn't work. ...
4
votes
1answer
46 views

tikz matrix not distributed evenly [duplicate]

How can I make the box distribute evenly? code as below: \documentclass[border=5pt]{standalone} \usepackage{tikz} \usetikzlibrary{matrix,positioning} \begin{document} \begin{tikzpicture} \def\lw{1pt} ...
2
votes
1answer
38 views

Tikz Tree Spacing in a Subfigure

I have been trying to create decision trees in a subfigure format as below, but not matter what kind of spacing I try, there are always over-lapping nodes at some point or another. In the example ...
7
votes
2answers
364 views

Bit string diagram with LaTex

I am interested to make some diagrams like the sample picture. I am not sure whether it can be done using Latex or not. Can anybody give any idea. Thanks.
1
vote
0answers
32 views

TikZ: how to draw arrows from the y axis to a curve? [duplicate]

I should draw this: This is what I have done so far. I do not know how to draw the horizontal arrows. Besides, in order to draw the dashed line from point Q to point P, I wrote \draw [fill] ...
2
votes
0answers
55 views

Draw two dependent figures with tikzpicture

For a report I want to create one figure showing the costs of employees vs. time in a small company. In the bottom figure the accumulated costs are shown. The plots should look as follows: With the ...
5
votes
1answer
35 views

Combine two smartdiagram diagrams

I would like to join up two smartdiagram circular diagrams, so that there is only one Research node. So far I have got: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{smartdiagram} ...
4
votes
1answer
45 views

Line up nested tikz enviroments or how to get rid of them

In my diagram I have a few components I reuse a lot, thus making "macros" in tikz for them. The current code I have is using nested tikzpicture environments and is not exactly working as expected. Do ...
3
votes
3answers
78 views

How to Center Titles in Forest Trees?

Here goes my third question. I am actually drawing Game Theory trees using the package Forest, and I have a small issue with the title of some Trees that I cannot manage. Essentially, I order LaTex to ...
0
votes
1answer
42 views

How to Add Geometric Figures to a Tree using Forest and Tikz?

First of all, I want to thank the community the help I obtained in my first question, some days ago. Having said that, I want to ask you for some help again, if I may. Essentially, I am currently ...
1
vote
1answer
70 views

Typesetting tick marks on an axis so that the space occupied by the minus sign is ignored

The error in the following code seems to be at the following options specified in the axis of the pgfplot. ticklabel style={font=\tiny,fill=none}, extra x ticks={-3.14159, -1.5708, 1.5708, 3.14159}, ...
2
votes
2answers
167 views

How to complete this figure using Tikz?

I saw the following picture in Puerto Rico Mathematical Olympiad. The figure is a carpet unfolding. I couldn't do the part of the cylinder, not introduce symbols on black squares ...
1
vote
0answers
96 views

How to do these drawings?

I was reading a paper online when I saw some beautiful pictures. I wonder if it is done with tikz or if it is even LaTeX. What do you think? How can I do things of this sort?
2
votes
1answer
45 views

Vertical and horizontal line in intersection?

There is probleme in this source: \documentclass{article} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture} \draw[thick,->] (-1,0) -- (5,0) node(xaxis)[below] ...
4
votes
1answer
123 views

Complex 3D drawings with tikz

I've already produced the following picture by means of TikZ. To do it, I modified the Sudoku example found here as follows: \documentclass{standalone} \usepackage{xcolor} \usepackage{tikz} ...
1
vote
1answer
42 views

How to know variable values in tikz for debugging

I am pretty fresh to tikz and I am trying to create a not-so-simple picture. I am also using the calc package with the let command, but the final figure is not the desired one. Therefore, I need to ...
2
votes
1answer
62 views

Convex hull, again?

I'd like that: \begin{tikzpicture} \draw[gray!50, dashed, fill=gray!10] plot[smooth cycle, tension=.7] coordinates {(3.0379,10.2421) (2.0978,9.802) (1.6332,8.5161) (2.0978,7.3113) (3.3837,6.9169) ...
2
votes
0answers
31 views

Combine isodate header and simple week-based timeline in a gantt chart

I'm trying to create a time chart and found the pgfgantt package to be the most suitable choice. Basically I need a timeline about 23 full weeks, something like: \begin{ganttchart}{1}{23} ...
2
votes
1answer
65 views

Custom PSTricks directory tree to TikZ

I have a PSTricks implementation of a custom directory tree which I find quite appealing. I basically want to convert the whole thing to TikZ. I managed to get the very basic idea running in TikZ: I ...
2
votes
1answer
40 views

Positioning tikzpicture and determining range for axis

In another question I got great help creating this picture: Actually it looks how it should but there are two further things I would like to clarify: Firstly, I get this warning: Axis range for ...
3
votes
1answer
71 views

Fancy Section headers

I wanted to add the lines from the edge of the left margin to the colored box in my section headers so this it looks like: Here is the code I have thus far: \documentclass[11pt]{book} ...
1
vote
1answer
97 views

Linebreak does not work in section headings modified with tikz

I have a problem with long sub/section headings: \\ is not wirking. As I'm new to Latex, I adopted this beautiful template http://www.fluortools.com/misc/LaTeXtemplate and modified it for my needs. ...
1
vote
1answer
34 views

Putting nodes in the middle of the figure

I have a figure consisting out of several lines: \begin{tikzpicture} \shade[top color=black,bottom color=white] (-2,2) rectangle (2,1.75) node [above] {$n_2$}; \shade[top color=white, bottom ...
3
votes
1answer
43 views

Lines not ending on nodes with tikz

I have three nodes: \draw (4,2) node(p1)[label={[label distance=0.9cm]0:$$}]{}; \draw (5,3) node(p2)[label={[label distance=0.9cm]0:$$}]{}; \draw (6,4) node(p3)[label={[label ...
2
votes
0answers
47 views

PGFplots, memory and GNUplot

My question is quite simple. I generate a lot of plots for my thesis in PGFplots, which I generate in separate PDF files using the standalone package (could not get shell escape to work properly). The ...
5
votes
2answers
80 views

tufte-book: tikz references in caption

Using the article documentclass, the following code works as expected. \documentclass{article} \usepackage{lipsum} \usepackage{caption} \usepackage{pgfplots} \pgfplotsset{compat=1.13} ...
3
votes
1answer
67 views

Is there any way to draw the same shapes at different positions efficiently, for example \foreach?

I know there is a similar question, but I do not think it gave the best solution. Here is my code: \begin{tikzpicture}[line cap=round,line join=round,>=triangle 45,x=1.0cm,y=1.0cm] \clip(-0.5,-1) ...