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)

2
votes
0answers
24 views

Domain and range

I would like to draw in TeX the following, but I'm pretty new at tikz therefore I have no clue. I would like to give the geometrical interpretation of the domain and the range of a function. That is ...
5
votes
0answers
27 views

How to plot a graph from its adjacency matrix and coordinates of vertices?

A similar question is here. If we give all the data of the vertices's coordinates and the graph's adjacency matrix, how to plot it with tikz, pstrick or other tool in tex?
4
votes
1answer
51 views

Plot a linear function with pgf plot?

Hi I would like to plot a graph of load voltage vs load current, I have been trying to do it with a tikzpicture, but wonder if maybe it can be done with a tikzplot? The bellow code is sort of what I ...
3
votes
1answer
51 views

Clipping plots to other plots in pgfplots

I'm plotting a convex frame as shown below, with the given MWE. Inside this frame, the idea is to plot additional functions to create an image. In order to avoid manually computing the domain ...
4
votes
3answers
171 views

How to generate a simple cartesian plane system?

I need to make a cartesian plane for plotting the straight line joining the points (-3,1) and (6,-2). This is a very simple cartesian plane plotting. When I looked at the manual for tikz the graphics ...
1
vote
1answer
59 views

Unlimited fill region

I need to draw a figure with unlimited fill region as the attachment figure. Thank you!
8
votes
1answer
75 views

Complex TikZ block diagram, several issues

As a long time lurker, this is my first question relating to a set of problems I have currently with TikZ. I try to draw a more or less complex block diagram, however things do not always turn out ...
1
vote
2answers
50 views

mdframed, TikZ and zigzag decoration

I would like to have a zigzag decoration around a box created with mdframed. Minimal example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} ...
1
vote
1answer
58 views

Bending of edges

I have some problems bending the edges of my grap properly. I want to draw a flow network, so far I have done the following: What I would like to have is that the edges going out from the Source ...
5
votes
1answer
45 views

How to keep tikzpicture minipages in position?

I found these pretty boxes on texample.net: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,snakes} \usepackage{amsmath,amssymb} \begin{document} % % Define box and box title style ...
3
votes
0answers
55 views

Symmetry in Tree Layout Graph

I am learning more about Tikz for drawing graphs. I am using the PGF3 stuff. This layered graph is not laying out well. I want the graph to be symmetrical about the vertical axis, that passes though ...
3
votes
3answers
137 views

tikz plot of two sine waves, showing the phase difference

What I am trying to achieve here is to plot two sine waves, and with some dotted lines on the peaks showing a \Delta t in the middle, as the phase difference. Any help appreciated.
4
votes
1answer
54 views

decorating with tkz-berge

In my continuing quest to draw circles and lines willy-nilly, I've made the following use of tkz-berge: \documentclass[11pt]{standalone} \usepackage{tkz-berge} \usetikzlibrary{shapes,snakes,mindmap} ...
4
votes
1answer
55 views

pgfplots: horizontal distance between two plots

I'm trying to plot the following graph using pgfplots: This plot was generated with matlab. I can easily plot the two curves with pgfplots but I have no clue how to add the vertical line with the ...
3
votes
2answers
49 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
75 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 ...
5
votes
3answers
118 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
158 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 ...
1
vote
2answers
107 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 ...
5
votes
1answer
46 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} ...
6
votes
1answer
119 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} ...
8
votes
2answers
111 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
26 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
56 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
58 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
54 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
55 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
2answers
135 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
52 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
35 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
185 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
53 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
92 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
123 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
63 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
23 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
37 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
466 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
176 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
67 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} ...
8
votes
4answers
285 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
105 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
108 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
63 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
142 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
45 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
66 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} ...