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
5answers
117 views

How to make the simple three square box and connect them?

I want to make the three square box and simply connect them.
1
vote
1answer
45 views

Specifications in the axis environment ignored

This is a similar display from another post of mine. There are only two differences. (One of these differences is the placements of the labels for the lines. In my post, I had the labels along the ...
3
votes
1answer
47 views

How to draw rotating lines with the axis of rotation shifted to an other coordinate (using tikz)?

i'm trying to generate an animation using tikz. The animation should show a fixed coordinate system placed at an arbitrary position (x,y) on the current page. Additionally a rotating line should be ...
21
votes
5answers
491 views

Recreate the sphere in TeX.SX logo

I'm trying to recreate this But looking in this Meta question the only code provided doesn't give that output %!TEX TS-program = xelatex \documentclass{minimal} \usepackage{pst-solides3d} ...
1
vote
3answers
89 views

How to fix tikzpicture size?

In a beamer presentation I am using tikz to draw graphs. To highlight part of the graph I am using overlay and the fit library as in the following MWE: \documentclass{beamer} \usepackage{tikz} ...
0
votes
1answer
81 views

How to draw a block diagram using TikZ?

I would like to draw a block diagram such as this using TikZ. I am unable to find arrow heads / suitable tutorials for block diagrams.
1
vote
1answer
41 views

radially increasingly opaque overlay ellipse with text

Say I have a pattern on which I'd like a radially shaded (from transparent on the outside to white on the inside) so that the background pattern fades to white around the text. How would I achieve ...
2
votes
1answer
38 views

Distance between arrow and text above arrow in tikz

I am drawing two nodes and an arrow between these nodes with \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance=5cm] % ...
3
votes
1answer
69 views

Draw arrows between nodes with tikz

I have drawn 4 nodes with \documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[node distance=2cm] % nodes \node [draw] (A) {A}; \node ...
2
votes
1answer
40 views

Placing labels at the end of lines

I have a display depicting two triangles that are reflections of each other across the line y=x. At the end of the line y=x - in the same direction as the line and 7.5pt away from the arrow tip - I ...
2
votes
1answer
32 views

Caption and label tikz-qtree inside figure

I want to create a figure caption for my tikz-qtree. Unfortunately it does not compile. \documentclass[fontsize=12pt,a4paper,oneside ]{scrreprt} \usepackage{pgfplots} ...
4
votes
1answer
92 views

Same tikz. Two matrices. (Diagram legend)

could not figure out an answer to this one. I have a tikz diagram using tikz/matrix, and I want to have a legend next to it, also using tikz/matrix. But I do not know how to refer to one particular ...
2
votes
2answers
82 views

Draw circle near to box in tikz qtree

I'm trying to draw above a node: a circle Some text But I dont know how to do it. This is my provisional code \begin{figure} \captionof{figure}{Estructura del análisis de árbol lógico } ...
1
vote
1answer
69 views

A display indicating the definition of the distance between a point and a line (using only TikZ)

In the following display, a point (-4,5) and a line are drawn. A dashed line is drawn from (-4,5) to the line indicating the distance between them. I call the intersection between the given line and ...
1
vote
3answers
180 views

Draw two lines between two nodes with tikz

I have two nodes \node (A) {A}; \node [below=of A] (B) {B}; I can draw a line between them with \draw (A) -- (B); But I need two lines between them. If I'm using \draw (A) -- (B); \draw (B) -- ...
1
vote
1answer
44 views

Plotting function with \addplot does not work

I would like to plot a function with Tikz. I did it this way: \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[german]{babel} \usepackage{mathtools} ...
4
votes
1answer
84 views

issue plotting polar data using tikz

I m having a trouble to plot properly a polar data file into a polar plot using TikZ, below the code. Thanks in advance for the help (I would rather avoid to use \begin{axis} in order to be consistent ...
0
votes
2answers
53 views

How to draw perpendicular lines through a point in Geogebra and remove the extra portions of the line in tikz?

I want to draw the orthocenter of a triangle in tikz. So, I tried to draw it in Geogebra and then tried to generate the tikz-code but it gave error message. My questions are, How to draw a ...
9
votes
0answers
255 views

water inside 3D tube

How can I generate the above image using TikZ. The oval inside tube represents water and arrows indicates the dipole orientation of water. What I was able to get so far is pasted below. ...
2
votes
1answer
54 views

baposter - include background image correctly

I am using baposter to produce my posters. I am trying to introduce a background image, I succeed, but always get an "Overfull \hbox" warning that I cannot debug. I know what this warning means and ...
0
votes
2answers
91 views

Plotting function in TikZ

I am trying to plot the following function: Where x=(x-floor(x)) This is what I have written in my .tex-file: \draw[color=blue,smooth] plot({\x-floor(\x)},{\frac{\cos(\frac{\pi}{6})}{ ...
4
votes
2answers
376 views

How to color the region between three mutually tangent circles?

I want to color the region between three mutually tangent circles: \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[scale=0.8] \draw[ultra thick](0,0) ...
6
votes
2answers
150 views

Decision Tree with Labels on Both Sides of Line

I am trying to generate a decision tree similar to this scanned example: Notice that some branches have text on the top as well as the bottom. I have not figured out how to do this. I can get text ...
1
vote
3answers
46 views

Adding Short Lines Across Decision Tree Branch

I am creating decision trees using the 'forest' package and would like to add short lines across a branch to indicate that the decision is sub-optimal. Can this be done in 'forest'? I am attaching a ...
3
votes
2answers
83 views

Name of shapes defined in an array

I am trying to use labels defined in an array using tikz for drawing a path between two shapes. I have tried to use pgfmathparse but it seems not well defined for string. My syntax is probably wrong. ...
2
votes
1answer
61 views

Tikz left margin indentation

Is there a better way to remove the indentation of a tikz figure? What I have so far is this \documentclass{article} \usepackage[top=0cm, bottom=0cm, left=0cm, right=0cm]{geometry} \begin{document} ...
0
votes
1answer
57 views

Visualization of data structures and indexes

How can I make a similar visualization of data structures and indexes? I went through the documentation of TikZ and could not find a way.
2
votes
2answers
188 views

How to paint the petals?

I can make the drawing but I don't paint the dark region. \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[scale=1.2] \draw[thick](0,0)--(4,0); ...
2
votes
1answer
90 views

How to create a 5-level tree diagram and highlight certain branches

Currently I am trying to create a tree diagram. I need to fit this into a beamer slide. This is what I did so far: \fbox{ \begin{tikzpicture}[level/.style={sibling distance=60mm/#1}] ...
6
votes
1answer
57 views

Some modifications to the axis environment

I have the graph of a function and its inverse. I would like two slight modifications to the axis environment. I want grid lines drawn at multiples of 5 from the axes. For some reason, the vertical ...
2
votes
2answers
63 views

Edge anchor in tikz

\documentclass[tikz,border=5pt]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{fit} \begin{document} \tikzset{ box/.style = {draw, text width=4cm, rounded corners=2pt, align=center, ...
2
votes
0answers
17 views

Tex4ht error with tikz in TL2015: Undefined control sequence \pgfsys@svg@newline [duplicate]

I just installed new TL 2015, on brand new Linux mint 17.2. Installation went OK. When I try to compile any file now with tikz code in it, I get this error: ...
0
votes
1answer
68 views

Draw rectangle around nodes with tikz

I have a lot of nodes placed with tikz. Now I need to draw an rectangle around all these nodes. I can draw the rectangle manually with \draw [fill=gray!5] (2, -6) rectangle (18, 6.5) (2, 6.5) ...
5
votes
1answer
115 views

Changing color in foreach

I'm trying to create a picture like this: where I have a grid and I depict the boxes shifting by colors changing. I was hoping I could achieve this effect easily in Tikz with a foreach (I am very ...
1
vote
0answers
49 views

How to put TikZ file from Matlab to Latex? [closed]

I made TikZ file in Matlab using function matlab2tikz so I want to put that figure in my Latex document. I am using this code: \documentclass{article} \usepackage{tikz} \usepackage{graphicx} ...
3
votes
1answer
120 views

A point P in a complex example with TikZ

I discover the mdframed package today and the examples with TikZ. In these examples there is a complex example with TikZ and a point P is used for positionning the title of the exercise. I suppose ...
0
votes
2answers
91 views

Why am I not getting the right size of the PNG image?

please, I have the following tex code , that simply generate a png with two ellipses inside. The problem is that I don't get the size I set at the beginning ?! I don't know why ? ...
3
votes
1answer
59 views

Some modifications for a display showing graphs of a function and its inverse

I have a display of the graphs of an exponential function and its inverse. I would like two slight modifications. I do not want the line passing through (0,15) and (15,0) plotted. I used line width ...
3
votes
2answers
78 views

Using pfg plots to plot unit simplex in 3 dimensions

I am trying to plot something that looks a little like this: I am using the following code: \begin{tikzpicture} \begin{axis}[ grid=major] \addplot3[ surf, ] coordinates { (1,0,0) (0,1,0) ...
1
vote
0answers
33 views

Box highlighting of text with rounded corners and hyphenation support

I used tcolorbox to highlight text some text in paragraphs, it seems to work smoothly, but it disables text hyphenation, that the highlighted piece fo text cannot be start somwhere at one line and ...
1
vote
0answers
90 views

Segmented bar chart under tikz plot

I'm trying to create a segmented bar chart (stacked bar chart) under my tikz plot: For each point, I want to make a segmented bar chart directly below the point. The segmented bar chart for each ...
4
votes
0answers
54 views

Using dynamic bounds in a tikz \foreach [duplicate]

I'm trying to draw something like an inner box integral approximation but with dynamic upper bound, lower bound, and stepsize. Unfortunately the \foreach command of tikz is not cooperating. ...
2
votes
1answer
47 views

Second y-axis inside groupplot

I would like to add a second y-axis inside a groupplot. If there's a better/easier way to get the plot I want (see figure) I am willing to not use groupplot. \documentclass[tikz]{standalone} ...
7
votes
2answers
174 views

Adding Triangles to LaTeX Decision Trees

I am using the 'forest' package in LaTeX in order to create decision trees with multiple decisions. I've got it mostly how I want it, except for two things: I'd like the circles at the leaves of the ...
0
votes
0answers
52 views

Box highlighting of text with rounded corners (soul-based)

Here it is an excellent solution from Gonzalo Medina. Could somebody help me to make it with nice small rounded courners?
3
votes
3answers
283 views

How to draw these empty open dots?

\documentclass[border=2mm,tikz]{standalone} \usepackage{textcomp} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.3] \draw (1, 2) node {\textopenbullet} ...
0
votes
0answers
29 views

How to create arrow heads partially perpendicular to the node

I'd like to draw a filled arrow head that smoothly extends the line itself and then bends outwards on both sides until it is tangential to the outline of the node it points at. It should make the node ...
3
votes
1answer
60 views

Style stored in command

I have created a \newcommand with some arguments that allow me to call an other command. Command syntax: \newcommand{\nodeperso}[1]{\node[\noexpand\type#1](){\noexpand\nom#1};} I have declared a ...
4
votes
1answer
122 views

Trees and fitting trees underneath them

Questions How can I fit a tree in the blank space under where I have marked Tree 2 in the photo (directly underneath Tree 1, but to the right of \Rightarrow)? How can I caption Tree 1 and Tree 2 ...
0
votes
1answer
133 views

Why isn't my TikZ line straight? [closed]

This tikz picture code: \documentclass[tikz]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (a) at (0, 1); \node at (a) {\textbullet}; ...