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)

3
votes
2answers
85 views

how to align tikzpicture and text in a table?

I need to put my tikzpicture and text in the same height. However, I cannot do it. This is my code: \begin{table} \centering \begin{tabularx}{\textwidth}{ |l|X| } \hline \multicolumn{1}{c|}{ ...
2
votes
1answer
57 views

Tikz: Position node along arc

The following code snippet is taken directly from the TikZ Manual v.2.10, Section 16.8 Placing Nodes on a Line or Curve Explicitly. Instead of distributing the nodes along the arc as shown in the ...
1
vote
0answers
34 views

why tikz will generate a series of .0.0.0.0? [duplicate]

I want to generate several point on a line, and this is the command: \documentclass{article} \usepackage{tikz,pgf} \usetikzlibrary{calc} \begin{document} \begin{figure} \begin{tikzpicture} % ...
2
votes
1answer
39 views

Node below axis annotation in tikzpicture/pgfplots

I want below the axis annotation a node (with some text) and from this node a arrow should point to a specific point on the x-axis MWE \documentclass[paper=a4, fontsize=12pt]{scrreprt} ...
11
votes
2answers
403 views

How to shift curly brackets

I am trying to replicate the following image So far this is the best I could do With the attatched source code \documentclass{standalone} \usepackage{tkz-euclide} \usetkzobj{all} ...
2
votes
1answer
46 views

How to improve a path with tikz decorations?

I am a beginner in LaTeX, trying to draw a series of sketches, close to engineering drawings, in order to illustrate the equations governing the constriction resistance of two pieces of metal pushed ...
0
votes
0answers
62 views

Problematic TikZ pictures when using SIAM class

I am writing a paper with a SIAM journals class siamltex1213. I generate all of my figures with TikZ and they compile well without the SIAM class. However, none of the figures are correct after using ...
2
votes
1answer
46 views

“skip coords” and “xticklabels from file” cause wrong labels

When filtering data from a file (with skip coords between index for example) and loading the x tick labels from the same file, the x tick labels are not skipped, leading to wrong labels. As an ...
2
votes
0answers
57 views

How to use tikz with memoir

I have used the following code after suggestion from an answer here. \documentclass{memoir} \usepackage{amssymb} \usepackage{tikz-cd} \begin{document} \begin{tikzcd}[column sep=1.2em] 0 \arrow[r] ...
1
vote
0answers
62 views

Package morewrites kills tikz's opacity/transparancy

I made the strange observation that including the morewrites package removes opacity colours in tikzpicture. (The code of this example is given below.) As opacity problems with tikz package are ...
7
votes
3answers
239 views

Draw straight line/arrow from between two shapes

I am trying to draw a straight arrow from one shape to another, two rectangles precisely. I have an MWE below, but the arrow from rectangle B meets rectangle A at an angle instead of at 90 degrees. ...
5
votes
1answer
113 views

Coordinates of intersection

The code generates a strain - stress curve. How can the code be simplified? How can the code be make smarter? Can I make the bezier curve with one draw command? \ShowintersectionB prints just the ...
8
votes
5answers
651 views

How do I draw Archimedean lattices in LaTeX?

I was trying to draw these two lattices in LaTeX for hours, but making no progress. Could someone please remind me the key code of doing so? Thanks a lot! Happy New Year!
6
votes
1answer
95 views

Tikz: writing a line from an point lying on a bent arc in a direction that is perpendicular to the tangent of the bent arc

I am trying to annotate bent arcs of a graph. There should be a link from the bent arc to the text of the annotation. Moreover the link should be perpendicular to the tangent to the bent arc. Here is ...
2
votes
1answer
261 views

How to draw electrical scheme

Can someone write the code for these two schemes, I am a beginner and do not know how to do. To create the proper connector at the \ draw command, you can use the command \ left
5
votes
3answers
178 views

Help needed with tikz

I would be very grateful if anyone could help with my questions below. Here's my latex code: \documentclass[12pt]{report} \usepackage{caption} \usepackage{subcaption} \usepackage{tikz} ...
0
votes
0answers
70 views

Graph with TikZ package [duplicate]

Anybody to draw this graph in LaTeX?
4
votes
1answer
121 views

defining a tikz shape with different fills in a figure caption

In the graph captions of my thesis, I want to define 3 triangles with 3 fills (yellow, red, and black). For one triangle, it works fine. How can I define the two other triangles with different ...
3
votes
1answer
84 views

minipage layout not correct

I want to generate a document with graph at left and tikz code at the right. I try to use two minipage but it seems it always layout it as up and down. The minipage is 0.45\textwidth, why latex still ...
5
votes
1answer
139 views

Tikz Graph without using a tikz document class

The following solution is absolutely perfect for my purposes, but I noticed that it requires \documentclass[tikz,border=5]{standalone}. Is there a way to get the same result with a standard ...
6
votes
1answer
82 views

Is there a simpler way of drawing relation maps?

For an example relation R: A -> B, I have the following TikZ code: \documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{shapes,backgrounds,decorations.text,patterns} ...
3
votes
1answer
90 views

strange pin on edge

Trying to respond this question anchor point on a self loop (to draw a line from that anchor point), with answer like "you may use pin for this ..." I discovered some strange (for me) behaviour of pin ...
3
votes
2answers
106 views

Tikz tree indentation

I'm trying to draw a large family/directory tree using tikz-tree. I've found this question in Stackexchange, which almost works, but not quite. Using the code provided in the answer I get overlapping ...
3
votes
1answer
45 views

tikz left of = node.center

Following Problem with tikz: I want to Position my nodes as seen in the attached Picture. So "east" of my node "a" is my "west" of node "b"; (in short: a.east=b.west). in Addition i would love to add ...
2
votes
2answers
54 views

anchor point on a self loop (to draw a line from that anchor point)

I would like to annotate self loops of a graph, that is write a tiny line starting from the self loop and going to some text. My problem is that I don't know how to get access to the "anchor point" ...
3
votes
6answers
813 views

Drawing of 3 x 3 Box Surrounded by Numbers

I would like to draw a 3 x 3 box with LaTeX as seen below in the picture. Is there an easy way to do that? Maybe there is a special command for that?
6
votes
2answers
118 views

Why do these TikZ intersections scale incorrectly?

In the following MWE, the shaded region scales incorrectly. The problem seems to involve the intersection calculations. What's the problem here? Here's the MWE, without scaling: ...
8
votes
1answer
139 views

Describe intersections on X axis

I have two functions which intersect at three different points: \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetikzlibrary{intersections} \usepackage{pgfplots} ...
8
votes
3answers
161 views

Normalized tangent vectors along a curve

I am using the following code to add the tangent vector at various points along a curve. I would like to normalize each vector, thus resulting in tangent vectors of equal unit length. How might I ...
12
votes
1answer
183 views

Is print in TikZ's math, useless?

In the manual of TikZ 3.0.0, the section about the math library, we can read (p. 635): Unlike the print keyword, the brace notation can be used in functions so that tikz path commands can be ...
2
votes
2answers
80 views

Vertically center tikzpicture in table

I'm tryin to vertically center a tikzpicture in a table. Here's a not-very-minimal example: \documentclass[12pt]{article} \usepackage[utf8]{inputenc} % UFT8 - danske bogstaver og andet godt fra havet ...
5
votes
1answer
110 views

How to make a graph inset

I have a graph where I want to place another graph as an inset. I now have the following code which creates an inset graph on the bottom left corner. How can I move the inset to the upper right or ...
2
votes
2answers
77 views

Picture and Table centered alignment

this looks messy right now. How can i achieve the following: Caption of picture is centered under the picture and caption of table is centered under the table. Both captions are on the same vertical ...
8
votes
3answers
225 views

pgf plot and foreach loop

I have this function y=a*x^2 where a changes (-2.4,-2.1,-1.8,....,2.1,2.4) and i want to draw it with pgf plots. Problem is i dont know how to implement this i think i'll need foreach loop or ...
2
votes
1answer
68 views

How to measure the distance of two points? [duplicate]

My question is this. Is there a way to measure the distance of two points? (The points are drawn with TikZ.) Thank you for your answer.
1
vote
1answer
42 views

creating a background for a group of nodes

How can I put a background for a group of nodes (but the group of nodes is created before drawing the background). The problem is that if I draw a rectangle before creating the group (i.e. before ...
4
votes
3answers
105 views

Positioning a node with respect to a group of nodes

I have a set of nodes that is generated by a macro, and I would like to position a node with respect to the north, west, south of this set of nodes. In my example I would for instance like to position ...
2
votes
2answers
97 views

Shorten line without moving arrowtip in PGF 3.0

I have this arrow style in PGF/TikZ 3.0: \tikzset{myline/.style={double distance=0.8pt, line width=0.4pt, -{>[length=2.5pt,width=4pt]}}} It produces this result: As you can see, the double ...
4
votes
2answers
131 views

How to include multiple pdf pages using \foreach as tikzpicture?

I know how to include pdf pages using package pdfpages and do it all the time, but always had problem with getting the page centered and scaling. I am now trying to learn how to use tikzpicture to ...
3
votes
1answer
89 views

How do I draw arrow in my figure, such that the arrow points to a particular node?

I have a figure of a graph with 8 nodes. I want to draw arrows, s.t. they will point to some of the nodes (for example I want to draw arrows pointing to 4 of the nodes). Also, next to each arrow I ...
3
votes
1answer
119 views

Venn diagrams for 4, 5, and 6 sets in TikZ?

I'm trying to reproduce the following Venn diagrams in TikZ: Venn diagram for 4 sets: Venn diagram for 5 sets: Venn diagram for 6 sets:
3
votes
3answers
90 views

Hereditary properties with nested frames (mdframed and tikz)

When nesting an mdframed environment in a mdframed environment that uses tikz, it seems that the nested mdframed environment takes on many of the properties of the environment isn't being nested in, ...
3
votes
4answers
225 views

How to create a rectangle filled with image using TikZ?

I want to create a rectangle with tikz and fill it with a predefined image. For example the following line fill the rectangle with a color. How can I fill with my images instead? ...
2
votes
2answers
87 views

How to create a text box using PGF

I'm styling my beamer presentation using PGF picture and I want to add a textbox with a specific width. The following line doesn't provide a width parameter. ...
10
votes
2answers
295 views

How do I typeset this diagram used to explain folding?

How do I typeset this: (this is an explanation of the folding used in derivation) Edit: Here's a code of the formula and XeLaTeX MWE: \documentclass{article} \usepackage{fontspec} ...
3
votes
3answers
151 views

How to put tikzpicture nicely between paragraphs?

I want to put my tikzpicture nicely between paragraphs. How do I do that? I do not want to put it in a picture environment because than there is extra space underneath. ...
2
votes
1answer
80 views

tikz: How to pass a list as a parameter of a tikz macro and use it in a foreach inside the macro

I am trying to write a macro for drawing some graph, but since the content of each node is specific it has somehow to be passed as a list to the macro. Here is an example of an ad-hoc code of what I ...
2
votes
1answer
49 views

Change direction of arrowheads

Im trying to draw a path in tikz, using Paul Gaborit's solution here TikZ: How to draw an arrow in the middle of the line? I managed to get this, where the path would be the half of the annulus. ...
1
vote
1answer
83 views

How to dress a stakel coins?

I can draw a cylinder, but I can't display the coins. \documentclass{article} \usepackage[margin=15mm]{geometry} \usepackage{tikz} \usetikzlibrary{shadings} \begin{document} \begin{center} ...
2
votes
0answers
32 views

Why I can not place two figures next to each other? [duplicate]

I want to display two figures next to each other. To do so, I used this webpage http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions#Figures for reference, but it didn't work. Instead of ...