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)

7
votes
5answers
300 views

How to use special colour in LaTeX

I am trying to code the above picture, especially the dots inside the rectangle. This is my current code, but it does not look like the intended figure. How can I change my code to obtain the ...
1
vote
1answer
20 views

Placing a removable discontinuity in the graph of a function using TikZ (adding tick marks)

I would like to graph the function $y = \sqrt{x^{2} - 4}/\sqrt{x - 2}$ on the domain from -5 to 30. This function will be Sy = \sqrt{x + 2}$ restricted to the open interval $(2, \infty)$. So, I would ...
0
votes
2answers
11 views

How can I vertically align the first line of a multi-line node to an object? [duplicate]

I'd like to have the first line of the node centered vertically with the object (here: a line) on the left of it. How can I do that? Of course I could split the elements into several parts and then ...
0
votes
0answers
17 views

Multiline label for shape 'tape' in tikz [duplicate]

I would like to draw a tape in tikz with a multiline label in it. The normal way of just using \\ doesn't work here. MWE \documentclass[tikz,border={5pt}]{standalone} ...
0
votes
0answers
35 views

Placing a removable discontinuity in the graph of a function using TikZ [duplicate]

I would like to graph the function $y = \sqrt{x^{2} - 4}/\sqrt{x - 2}$ on the domain from -5 to 30. This function will be Sy = \sqrt{x + 2}$ restricted to the open interval $(2, \infty)$. So, I would ...
1
vote
1answer
26 views

Problem of positioning and size of the additional text on tikz/gnuplot figures

I want to at my legend using tikz environment on top of my figures generated with gnuplot. I am happy with the result when I comment the part \node[anchor=center, text width=0.39cm, xshift=0cm, ...
3
votes
1answer
151 views

Tikz code not working in LyX but working in pure Tex

I'm trying to add a TikZ picture in my LyX document. To do this, I organize the TikZ tex code in Texmaker (a friend sent me a tikz code model in a .tex file) and then I copy it to a ERT in LyX (making ...
3
votes
3answers
159 views

My version of Red-Black Tree

Here's the code I have \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \tikzset{ treenode/.style = {align=center, inner sep=0pt, text centered, font=\sffamily}, ...
4
votes
4answers
484 views

Using TikZ to draw a water channel profile

I want to draw a relatively simple sketch using TikZ but I can't do it. What I want is a representation of an open water channel with 4 pools, a dam upstream, and a waste reservoir downstream, as ...
7
votes
4answers
258 views

How to Draw This Free Body Diagram on TikZ or PGFPlots

This is not a duplicate question of the one titled Creating a Free Body Diagram in TikZ. I am confused as to how one might draw this specific diagram: Say we want to describe two masses on a pulley ...
3
votes
1answer
119 views

How do I test for a new page?

I need to know when I change pages. I thought I had a solution using everypage. It works using \newpage, but not using \vspace. \documentclass{article} \usepackage{everypage} ...
3
votes
1answer
61 views

shifting an arrow between two blocks up and down

I need to shift the arrow between two blocks up or down. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,fit,arrows} \usepackage{graphicx} \begin{document} ...
7
votes
2answers
150 views

Vertically align nodes in tikz graph

I have taken to drawing automata in TikZ, as it will position the nodes for me, and generally requires very little post-processing in terms of options. I know I can force nodes to be in the same ...
7
votes
1answer
201 views

Tikz binomial distribution

I'm trying to plot the pmf of the binomial distribution for particular values of N and p. For example, when N=10 and p=0.5: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} ...
2
votes
1answer
50 views

Is it possible to assign to two extra x-tick labels different colors?

I think the question says it all. I'd like to have two extra x tick labels with different colors. I thought of using a cycle command, but I couldn't figure out how it should work. I changed the color ...
16
votes
2answers
2k views

Genogram or family tree with PGF/TikZ

Since it has been recommended to me in Stack Overflow to post it here, I will do so: I want to draw a genogram with LaTeX. I tried to do this with TikZ, but since you need to model at least 3 ...
1
vote
2answers
100 views

how do I make tikz circular arrowheads concentric to the point they connect?

I have a box-and-pointer diagram but it looks wrong, because the circular arrowheads are tangential to the point it connects, rather than concentric to that point. How can I fix this? ...
3
votes
0answers
58 views

Tikz: draw a circle only in selected nodes

I created a table of nodes using tikz. And now I want to draw a circle inside every even node. I started from just trying to draw a circle in the second node. But my code is not working: ...
4
votes
1answer
48 views

How can I include something with overlay specifications in a non-beamer class document?

I've a tikzpicture, in a extra tex file, with beamer overlay specifications. I'd like to include the tikzpicture in the tex file for my slides using beamer, and in the tex file for paper, using ...
8
votes
3answers
215 views

I need help with a banner in LaTeX

I just wanted to make this banner in LaTeX. But I am not so good to LaTeX yet. So I have tried my best. Here is what I have managed yet: \documentclass[11pt]{memoir} \usepackage{tikz} ...
2
votes
1answer
60 views

Modifying some features on the graphs of a function and its inverse

The following code is compiled by pgfplots to graph an exponential function and its inverse. I have some questions about the code, and I would like to modify some of the features of the graphs. How ...
1
vote
1answer
54 views

Rounded corners don't work properly in custom decoration

I want to create some chemical Lewis structures with TikZ - I can't use chemfig for this since I need to draw the atoms according to their coordinates - and need to define some custom bond types, for ...
1
vote
1answer
116 views

Tikz: Problem with Standalone

I have difficulty in using standalone package along with TikZ. I have the following standalone file: l1NormInAction.tex \documentclass[tikz,border=3mm]{standalone} \begin{document} ...
2
votes
3answers
80 views

Tikz: define label font size under the node

I create a picture of array which consists of nodes. I wonder how I can set the font size for the label which is below every cell (for example make it as scriptsize). This are my definitions: ...
2
votes
2answers
111 views

texdoc can't find pgf [closed]

While I have the indispensable pgfmanual.pdf located in /usr/share/doc/texmf/pgf/, texmf/pgf$ pwd /usr/share/doc/texmf/pgf texmf/pgf$ ls pgfmanual.pdf texmf/pgf$ texdoc cannot find it. ~$ texdoc ...
2
votes
3answers
134 views

Drawing an ellipse with TikZ

How can I draw only part of an ellipse using TikZ? I was only the top left quarter of it. I tried to use a white square box to hide the rest, but that is a tedious and ineffective method.
1
vote
0answers
40 views

Unequal bin widths in pgfplots density histogram

In the pgfplots manual, it talks about density histograms with equal bin widths/ranges. Is it possible to make a density histogram with specified unequal bin widths/ranges? For example, if I set ...
6
votes
4answers
372 views

TikZ - How can I draw a line through a point on a line, with the new line perpendicular to the old line?

I have a line A-B between two points and already a point X on A-B. Now I'd like to draw a line through X which then is perpendicular to A-B. How can I do this? Also: No other (directly related) ...
4
votes
2answers
166 views

How to plot smoothly an implicit function using gnuplot and tikz-pgf?

I would like to plot implicit functions in Latex with tikz and gnuplot. A minimal example of my code is given by: \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
1answer
64 views

How can i get the next tables using Tikz? I can´t obtain my text at the top of the figure using tikz

\documentclass[11pt]{book} \usepackage[utf8]{inputenc} \usepackage[spanish,mexico]{babel} \usepackage[T1]{fontenc} \usepackage{booktabs} \usepackage{array} \usepackage{tikz} \begin{document} ...
3
votes
1answer
85 views

trapezium, how to calculate angles?

I like to draw the following picture: It is generated with following code: \documentclass[12pt,tikz,border=3mm]{standalone} % \usepackage{zfc-book-standalone} ...
6
votes
1answer
70 views

Plotting one x- vs multiple y- using custom color map

I am trying to plot data that comes in the form of one x-axis vs multiple y-axis on the same plot. I would like the color of each line to spread itself out through my desired color map (spectrum ...
3
votes
2answers
52 views

problems with ellipse TikZ

I'm working on a mac, I use the package TikZ and it works. But I have problems when I want use ellipse or diamond ex : \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} ...
5
votes
1answer
126 views

Convert PSTricks to TikZ

I use pstricks for all my graphics. Now I am submitting a paper to a conference which, unfortunately, does not allow to use PostScript. I have to send them tex source, which they compile with ...
3
votes
1answer
73 views

Aligning flowchart with tikz

I'm working on some flowcharts for a programming course and have an alignment issue with one of them. Usually lines in a flowchart are directed from one symbol to another. However, I want the line to ...
0
votes
1answer
94 views

Chart or diagram for this figure

How could I create this table or diagram, I appreciate the help.
2
votes
1answer
43 views

Scatter plot with a grid and axis lines going through the origin

I want to make a scatter plot with error bars (using pgfplots or tikz) with two characteristics; I need the two axes to meet at (0,0), and a grid in the background. I tried to google this a number of ...
3
votes
1answer
59 views

Fancy Footnote Rule

I am trying to use tikz to create a more visually interesting vertical rule to separate the footnotes in my document. Here is my re-definition (code from the soulpos package documentation). ...
4
votes
1answer
47 views

Expanding arguments to pgf/tikz styles

In an answer on this site is proposed a method to draw arrows on paths. For example, using the style [arrow inside={pos=0.2}] will put an arrow at position 0.2 on the path : \begin{tikzpicture} ...
3
votes
1answer
69 views

tikz node position

I have a diamond split in four triangles and I would like to write inside each triangle at it center and having difficulties with position. Please help me fix that problem.Thanks ...
3
votes
2answers
112 views

adding a coloured-box in flowchart

I am trying to make a flowchart in Latex, I want to put some of steps in a coloured box with a label, e.g. Deterministic Annealing, I added scope part but it doesn't compile with the new change. ...
3
votes
3answers
126 views

Tikz-Create a Picture Legend

I am trying to create a legend inside a tikzpicture. The picture shows an accelerator and I would like to make a legend that will explain each part. My code is \documentclass{standalone} ...
5
votes
2answers
958 views

tikz diagram showing range, domain, and co-domain of a function

While I am gradually becoming more proficient at TeX, I am still very new to TikZ. I am typesetting some notes for Analysis, and would like to be able to produce a map which shows 2 sets (X and Y) and ...
6
votes
1answer
281 views

Latex code for patch simulation

I am trying to code the above picture. This is my current code, but it does not look like the intended figure: \begin{tikzpicture} \draw[thick,->] (0,0) -- (8.5,0); \draw[thick,->] (0,0) -- ...
11
votes
1answer
663 views

Draft option in TikZ like graphicx

We know the use of [draft] in graphicx package \usepackage[draft]{graphicx} Do we have any option like [draft] in tikz? Sothat we need not compile the tikz picture for every run and need not look ...
1
vote
3answers
140 views

Drawing tools regarding

I am using TikZ to draw pictures... Here i will give one of my drawing. I thing i used here is so lengthy. So is there any simple way of drawing this? \begin{document}\begin{center} ...
2
votes
1answer
53 views

Positioning of a (newly defined) symbol *relative* to a textbox

I defined a set of chevrons with tikz (see below) and would like to be able to put them at the boundary of a rectangle (text box). As you can see, the code below does this, but with absolute ...
3
votes
1answer
59 views

Multipart graph with linear and circular node patterns

I'm trying to draw a graph (PDF output of code below attached) that's a linear process, with a potentially circular element in it. As you may see in the upper picture, the the B,C,D elements aren't ...
1
vote
1answer
46 views

Inline alignment of tikz graphic

How it should look like I want to achieve the following result using TikZ. The graphic should be aligned to the right of the text body and to the top of the line's text it is placed in. Besides, ...
21
votes
3answers
813 views

Tracing a border formed by circles

Suppose I have some code that draws a few circles. These circles overlap each other in such a way that they form one "group" -- there are no groups of circles completely separated from the rest. For ...