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)

0
votes
0answers
3 views

Nodes not printed on x-axis

The following code instructs TikZ to draw the graph described by the equation y=\sqrt{x^{2}-25}/\sqrt{x-5}. (This graph looks like y=\sqrt{x+5}.) I specifically want two numbers, -5 and 5, on the ...
2
votes
2answers
49 views

Mindmap won't progress correctly in my beamer presentation

I'm making a mindmap in my beamer presentation. The mindmap either disregards grow cyclic and everything goes to the right/east of the mindmap, or the siblings always align eastward, rather than ...
2
votes
2answers
49 views

Periodic shading in tikz

Is there an easy way to shade a rectangle in tikz so that the color changes not from one to the other but several times in between. Something like a grayscale value changing with the position x like ...
5
votes
2answers
105 views

Tikz coordinate calculation

Consider the followinting tikz picture. I need to place the segment re-D so that its measure will be 8/9ths the measure of the segment ut-C. Now I just placed it at a random distance of 8/9 between ut ...
0
votes
2answers
83 views

How to draw this figure (if possible in 3D)

I want to draw a figure whose rough and symbolic figure is attached. Here $K_m$ denote a complete graph on $m$ vertices. Each vertex of $K_m$ is attached with each vertex of $K_n$ as well $K_1$. For ...
3
votes
1answer
36 views

Tikz sloped label on path

Any suggestion on how to get slanted text for the labels "Diapason", "Diapente" and "Diatessaron"? (PDFLATEX on Linux Lubuntu with texlive 2014) Thank you, A \documentclass{article} ...
4
votes
1answer
84 views

how to draw these shapes

I would like to draw the following picture where I can color text, shapes and the lines. The shapes are triangles and stars. So far, what I have done is \documentclass[12pt]{article} ...
7
votes
2answers
98 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
25 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 ...
3
votes
2answers
50 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
50 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
51 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
51 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
94 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
48 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
34 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
158 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
51 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
91 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
121 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
59 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
22 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
35 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
465 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
174 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
277 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
101 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
55 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
65 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
177 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
88 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
223 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
79 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
377 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
55 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
98 views

Chart or diagram for this figure

How could I create this table or diagram, I appreciate the help.
3
votes
1answer
61 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
76 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 ...