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)

5
votes
2answers
37 views

Simple Grid drawing

I new to tikz and want to draw this (Just the grids for now). Here is what I have. As you can see, I use the soul-destroying approach. That is to manually adjust the coordinates of each point to ...
1
vote
0answers
21 views

How to fill a partially filled “path” [duplicate]

In my drawings I use a hand drawn looking line style to indicate discontinuity. Therefore I use a random line style. Since you cannot change the decoration in between a path creation, I’m facing a ...
2
votes
1answer
27 views

Vertical and Horizontal aligment with several figures and tikz figures

I've been having some trouble aligning multiple figures. The problem is present with png figures and tikz figures, so I guess I am missing something. tikz figures not properly aligned: the ...
0
votes
0answers
32 views

How can I plot Binomial and Poisson Cumulated Distribution Functions?

I know that \begin{tikzpicture}[ declare function={binom(\k,\n,\p)=\n!/(\k!*(\n-\k)!)*\p^\k*(1-\p)^(\n-\k);} ] serves to declare the p.m.f. for the binomial distribution with TikZ, and that ...
3
votes
1answer
41 views

Centering a node on a path

Why the $\times 12$ is not centered on the path ? \documentclass[border=3pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[bob/.style={outer sep=0pt,text ...
2
votes
1answer
34 views

Shaded area in graph behind axes and plot, plot in front of axes

I want part of the graph shaded. The problem is of course that shade is above axis and grid, like in MWE below. Of course, I also tried axis on top option, but the problem is that in this case plot ...
6
votes
1answer
64 views

How to plot the four regular star polyhedra with tikz?

I can plot the regular convex polyhedra, for examples \begin{tikzpicture}[scale=1.0] \tikzstyle{every node}=[circle,fill=blue!20,inner sep=0pt,minimum size=0.4cm] \foreach \y[count=\a] in ...
1
vote
1answer
43 views

Negated implication arrows in tikzcd [duplicate]

I have four properties A, B, C, D and I am trying to summarize the logical implications between them into a single diagram. So far I have the following picture but I would like to have some of the ...
0
votes
0answers
29 views

tikz/gnuplot legend inside the caption

I want to add my legend inside the caption, similarly the one given in this question. But I want to use gnuplot environment as in the following MWE. Unfortunately, I am getting '??' because ...
6
votes
1answer
141 views

Tikzpicture to draw a network

I am trying to draw this network using a tikzpicture. Any help or support will be much appreciated \documentclass{article} \usepackage{tikz} \begin{document} \tikzstyle{block}=[draw, circle, ...
1
vote
0answers
49 views

Problem with Dense distribution

What is poisson.sty? and how can i fix this problem because I want to run the below code but there is an error ( poisson.sty not found) \documentclass{article} \usepackage{tikz} \usepackage{poisson} ...
4
votes
2answers
84 views

Persistent draw color when using \def

Consider the following MWE: \documentclass[11pt,tikz]{standalone} \usepackage{tikz} \usetikzlibrary{arrows} \def\mwe(#1)(#2);{ \begin{scope}[shift={(#1)},rotate={#2}] ...
7
votes
1answer
120 views

Graphing a sinusoidal function

I would like to plot the graph for y = |sin(pi*x)| on the interval -2.5 and 2.5. (The graph is on or above the x-axis, and both ends are at height 1.) TikZ plots a line through the origin. The label ...
2
votes
1answer
53 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
20 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
24 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
38 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
34 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, ...
10
votes
5answers
460 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 ...
3
votes
3answers
170 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}, ...
3
votes
1answer
65 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
4answers
272 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 ...
4
votes
3answers
96 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
53 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 ...
1
vote
2answers
107 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? ...
2
votes
1answer
62 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 ...
2
votes
3answers
139 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
42 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 ...
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} ...
4
votes
2answers
173 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} ...
2
votes
3answers
85 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: ...
8
votes
3answers
219 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} ...
6
votes
1answer
76 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
53 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} ...
3
votes
1answer
87 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
4answers
376 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) ...
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 ...
2
votes
1answer
44 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 ...
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} ...
0
votes
1answer
97 views

Chart or diagram for this figure

How could I create this table or diagram, I appreciate the help.
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). ...
3
votes
1answer
73 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 ...
7
votes
2answers
152 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 ...
3
votes
2answers
92 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 ...
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 ...
5
votes
1answer
127 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
2answers
113 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. ...
6
votes
1answer
290 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) -- ...
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 ...