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
1answer
91 views

How to set shape's size from another shape

I would like to set shape's size basing on the size of another shape produced by the fit environment. The MWE I use is the following: \documentclass{report} \usepackage[english]{babel} ...
1
vote
1answer
198 views

Global set node background

I know I can do this: \draw (5,0) node[above=3pt,fill=white,inner sep=0pt] {$5$} But I wonder if it is possible to set the 3pt, fill=white, and inner sep=0pt globally for every node in my document? ...
0
votes
1answer
66 views

How can I use linebreak inside \coordinate, in tikz? [duplicate]

well I need to write some text right next to my shape. But it's too complicated when making it all coordinate i and write it. How I make it easier?
2
votes
1answer
708 views

Tikz-Tree: Arrow-style depending on parent node

I have drawn a tree in tikz with different styles for nodes (this simplified example has nodes with style a or b). The arrows from nodes to childs are always the same and I would like to apply ...
1
vote
1answer
86 views

Easiest way to connect the center with a point on the circumference

I have to draw many figures like this: with different angles but not for pie charts. What is the easiest way to draw the lines from the center to the circumference? I searched a lot but only found ...
12
votes
3answers
414 views

Draw Polygonal Number Using PSTricks (or TikZ)

I would like to draw the following using PSTricks (or TikZ): (Found on http://i1.wp.com/mathandmultimedia.com/wp-content/uploads/2012/08/polygonal-numbers.png.) I can do it myself using an ...
5
votes
1answer
294 views

Scale position of circle but not radius

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \draw[help lines] (-3,-3) grid (3,3); \draw (-3,0)--(3,0) node[right] ...
4
votes
0answers
600 views

Changing Size of Arrows, Labels, Loops in Diagrams and Directed Graphs [closed]

Consider this MWE: \documentclass[12pt]{article} \usepackage{tkz-graph, tikz-cd} \usetikzlibrary{calc} \usetikzlibrary{decorations.markings} \begin{document} Blah ... blah. ...
3
votes
1answer
562 views

Matplotlib PGF images in subdirectory

I have a two-dimensional image plotted by Matplotlib using the PGF backend. It is stored in the figures subdirectory (since I have a lot of images and don't want to clutter up the main folder). As an ...
10
votes
1answer
3k views

Drawing control diagram in Latex

I am new to LaTeX and I am trying to draw a diagram similar to the one in the figure: This question was answered and the following is a code for similar diagram. \documentclass{standalone} ...
1
vote
0answers
46 views

Clip, but add arrowheads to end of clipped curve [duplicate]

I have the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \clip (-5,-5) rectangle (5,5); \draw[help lines] (-5,-5) grid (5,5); \draw[->] (-5,0) -- ...
7
votes
1answer
285 views

inkscape2tikz: exact text positioning

Take the following screenshot from Inkscape: where the "baseline" of strings Pa and pa are snapped to the black line. This is the LaTeX output once the graphic is converted with inkscape2tikz: As ...
6
votes
1answer
332 views

Colored box around enumerate labels

I want a colored box around enumerate labels. My actual code is this: \documentclass{article} \usepackage{tikz} \usepackage{enumitem} \newcommand{\fff}[1]{\tikz \node[ inner sep=1.5pt, ...
4
votes
2answers
633 views

Creating a digraph with formulas instead of nodes

I am looking to make a diagram with lines similar to this one: Labeling Edges in a Weighted Digraph But I am trying to have a mathematical formula, which is the label, instead of being above the dot ...
7
votes
1answer
163 views

Labeling the center of a closedcycle area

I have this figure: \documentclass[border=2pt]{standalone} \usepackage{pgfplots} \usepackage{kpfonts} \newcommand{\func}{ .00038*(x+8)*(x+6)*(x+3)*(x-1)*(x-6)*(x-8) } \pgfplotsset{ every x tick ...
4
votes
2answers
314 views

Help creating quite complex Tikz figure

I would like to creat the attached figure in Tikz. As i am quite new to tikz i do not know what to use and how to start. As it has some intricate lines and arrows. Any suggestion is welcome
12
votes
2answers
276 views

How to keep the line cap when clipping a path?

This question is kind of the opposite of Disable "clip" and "use as bounding box" in TikZ. Is it posisble to clip a path but let the line caps lokk as the path would end at the ...
3
votes
1answer
1k views

TikZ: Flow Chart

Kindly help this messy tikz flow chart. \documentclass{beamer} \usetheme{CambridgeUS} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \tikzstyle{block} = [rectangle, draw, text width=10em, text ...
7
votes
1answer
199 views

how to plot an arrow in a matrix structure

I would like how to do a particular arrow in this scheme. I don´t know if it´s possible. With this code I need to make an arrow from (rombo1.south) to the middle arrow from (momentum) -- (pressure). ...
2
votes
1answer
358 views

Pgf plots and a tabular legend

I have a plot where I want to add a legend which is the combination of lines and marks. For that I want to replace (or define a new) the original pgf plots legend type. As said before, in the ...
4
votes
1answer
238 views

Legend on second frame has only one entry, labeled wrong

Using pgfplots in beamer with \only frames, the legend for the second frame (only) inexplicably shows only one entry, with the color of the last \addlegendentry, but the legend of the first. The other ...
5
votes
1answer
323 views

Normal line to another

First, I want to say I´ve been looking an answer in this forum but I didn´t find it. My issue is that I don´t know how to do a normal line to an other that I named with "name path=chord". My objective ...
3
votes
2answers
193 views

How to embed a line-chart from a logfile?

I have a logfile progress.txt in the format <epoch> <space> <number> <space> <rest...> Here an example excerpt: $ cat progress.txt 1375097557 40 523 3927 26884 ...
3
votes
1answer
103 views

nodal-graph in table spacing issue

Good day, hi, I am having some difficulty with including graphics in a table. If you happen to have some spare time, please kindly enlighten me on the following problem I would like to know how to ...
7
votes
1answer
435 views

TikZ doesn't find all intersections between plot and a line

Why doesn't TikZ find all intersections. They are obviously there … \documentclass[border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \begin{document} ...
36
votes
3answers
3k views

Replicate the Fourier transform time-frequency domains correspondence illustration using TikZ

The following time-frequency correspondence illustration is in the wikipedia entry of the Fourier transform. Also a gif animation version (if the animation doesn't show, please open the following ...
2
votes
1answer
269 views

positioning and showing relationship between two images with arrows and animating the arrows

a. Though I can include these slides as images, are there any better ways to include these in beamer? b . Can I animate the arrows and text ? Edit: I would like to use two images 1.brain 2. Gut and ...
4
votes
1answer
143 views

Draw a path along one existing path and then another

I have drawn two shapes in the code below, a red curve, and a black rectangle. I have labeled four points, A, B, C and D. I would like to know how to draw a path along the black rectangle from A to B, ...
4
votes
1answer
346 views

TikZ: Drawing a rectangle and then splitting it

I want to make a rectangle and then want to split it. My MWE is below: \documentclass[tikz]{standalone} \usetikzlibrary{shapes.multipart} \begin{document} \begin{tikzpicture}[ my shape/.style={ ...
4
votes
1answer
707 views

QTikZ Save standalone TikZ file

In QTikZ, it is possible to export a pdf, eps and png. I was wondering if it were possible to tell QTikZ to output a standalone TikZ file that is reading to add in a LaTeX document. So basically, ...
2
votes
1answer
229 views

Customizing pgfuml (distances)

I'm using pgfuml to create some sequence diagrams. As you can already see in the examples on the pgf-uml Homepage, diagramms get very crammed if you insert many descriptions. Text and arrows overlap ...
3
votes
1answer
109 views

Tikz: Reproducing the figures made by tabular environment

I made the following three diagrams with tabular environment in LaTeX. Now I want to make these diagrams in Tikz ideally with animation and MWE is below: \documentclass{standalone} ...
3
votes
2answers
440 views

Drawing line around obstacle in circuit diagram

I have a circuit diagram with 3 DFFs (rectangles) and an xor gate (pointy bit on the right). For reference, let's identify the components from left to right as x[n], DFF0, DFF1, DFF2 and XOR0. ...
6
votes
1answer
1k views

How do you draw spheres and arcs on a sphere on latex?

So, I'm new to using latex and I need to draw some figures, specifically spheres and arcs and how to label endpoints.
6
votes
1answer
249 views

Calculate the intersection between a path enclosed by a `scope` and another path

I have constructed a circle using the through package. I would like to create a coordinate at the intersection of this circle and another line. Is there a way to do this? I tried to name the path ...
6
votes
3answers
1k views

\everymath, AMS equations, beamer, and tikz not working together

In a beamer document, I have $ expressions embedded in displayed equations (using tikz to make, e.g., colored boxes around some expressions). I put \everymath{\displaystyle} in the preamble so that ...
2
votes
0answers
155 views

TikZ shape definition from TikZ rather than PGF [closed]

Is there a way to define a TikZ shape using TikZ code rather than PGF? I'd like to have a gear shape (and some others) that I can use as a node and add text to it, have arrows go in and out of it, ...
4
votes
1answer
1k views

Circuitikz place text above and below component

Lets say I create a component like this (0,0) to [R, l^=$R1$] (0,2) How can I make it so that the value, R1, is say, on the right hand side, and the resistance, say, 1kohm is on the left hand side? ...
5
votes
2answers
708 views

Placing Nodes along an rotated ellipse in TikZ

In relation to this quesion: How can one place nodes along a rotated ellipse? ()
1
vote
1answer
142 views

Does a System.Drawing to TikZ solution exist?

Not sure if this belongs to here or to a .NET forum. Does anybody know of an implementation to reuse .NET coded drawings with TikZ? Or any ideas, how to do that? I just want to know, if it would be ...
4
votes
1answer
244 views

How to draw compactification and completely regular diagrams in tikz

How can we draw diagrams like this: and
8
votes
1answer
941 views

How to draw a gradient box around sections

How would you implement a margin-to-margin gradient using TikZ that is slightly larger than the text and that cover the whole lines of section text? The following code produced the results shown below ...
4
votes
2answers
874 views

Set the axis range according to the data range, that is, no scales for axis

I use the matlab2tikz package to creat surface in LaTex editor, but it display ugly unlike the Fig. created in the Matlab. Can anyone help me out? Is there a way of adjusting the x,y and z axis ranges ...
5
votes
1answer
291 views

“Stroke” a predefined path

I would like to use the name of a previous defined path to draw it later on in my code. I have included an example below, where I define two paths, "D1" and "S1", and then later on, draw these very ...
7
votes
3answers
543 views

Approach to creating graphics in book - TikZ, SVG, PDF, Inkscape?

I have a series of "charts" I created with Excel (before discovering LaTeX) to show the ROM character patterns for an old computer for inclusion in a book on retrocomputing. My dilemma is how to ...
2
votes
1answer
1k views

Tikz Edge Label Positioning mid anchor

I would like to place labels below edges such that the letters don't wobble. I can place them on the edge using the mid anchor, but when I use below some other anchor is used to calculate the ...
5
votes
1answer
1k views

tikz/pgfplot unstacked ybar with “switched” overlay

So, i'm trying to make a nice ybar plot using pgfplot, but i have some issues i want to solve, hope you can help me. 1) the ybar are not centered on the x value as they should, i mean, the bar for x ...
3
votes
1answer
180 views

Gnuplot invisible

I'm trying to plot two implicit curves (using pgfplots and raw gnuplot) but they don't appear in the document. In gnuplot it works just fine so I guess it has something to do with pgfplots but i can't ...
8
votes
0answers
341 views

Incompatibility with TikZ and Mac OS X Preview [closed]

I was quite suprised to find that some TikZ documents render incorrectly under Preview (on Mac OS X), despite working fine in Adobe Reader (on Mac OS X) and Evince (on Linux). This is Mac OS X version ...
6
votes
1answer
417 views

Plotting a random function f(x) and f(x)+sin(x) with tikz

I'm plotting a function f(x) with random values as follows: \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw[color=blue, samples=150] plot[domain=0:10] (\x,rand) ...