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)

5
votes
1answer
617 views

Vertical path to node in TikZ trees

How can I set the path between two specific nodes to "vertical" rather than "direct"? Currently my tree looks like this: \begin{tikzpicture}[level distance=1.5cm, every node/.style={draw=black,...
2
votes
1answer
787 views

Polar plot: label and legend rotation

I am using the polar library with pgfplots to plot a graph like this: \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat = newest} \usepgfplotslibrary{polar} ...
14
votes
1answer
1k views

Circular Arrows and Text on Path

I did some basic tikz figures, but i have absolutely no idea how to do a figure like this: Each text block should be aligned on a circular path and centered within the arrows. Could anyone please ...
2
votes
2answers
298 views

'Figure' in tikz makes image move 'forward'

I have a weird problem, whereby if I make my existing tikz picture a 'figure', it suddenly moves forward, as in, past the paragraph that comes after it in the code. That is, if the code that makes ...
2
votes
1answer
2k views

Vertical lines in pgfgantt

I'm using the package pgfgantt to create Gantt charts. I've seen that with the "today" key one can have vertical line drawn in the chart. However, only one today key is allowed. How can I have several ...
4
votes
1answer
373 views

Constructing dag-like diagrams

I want to draw diagrams that look a bit like this. Mathematically, you could describe them as directed acyclic graphs with dangling arcs. They're somewhat reminiscent of route diagrams. Desired ...
5
votes
1answer
317 views

How do I place braces on a line segment?

So I have this code here, \begin{tikzpicture} % Draw the axes \draw [->,black] (-1.5,0) -- (3,0) ; \draw [->,black] (0,-1.5) -- (0,3) ; % Draw the line \draw[-,black](...
1
vote
0answers
32 views

headlines are not shown with tikz input (plain TeX) [duplicate]

I'm usign plain TeX with custom headlines. If I load Tikz packages with \input tikz then headlines are blank. The following are my headlines (some commands don't belong to plain TeX, but I think ...
3
votes
3answers
3k views

Insert text inside a image in eps format

UPDATE:I tried the solution with overpic and it works fine. But the problem is, sometimes, my experimental setup changes and I have to reproduce the eps file using different parameters from Matlab. ...
4
votes
2answers
528 views

How can I draw a wave diagram in Tikz/PSTricks

Sorry for the undetailed title, I didn't know what to call this. How can I draw the image below in TiKz or PSTricks?
4
votes
2answers
1k views

How to place a symbol under an arrow in Latex when using tikz package

I'm using the tikz package in LaTeX to construct a feedback loop for a control system as a part of a paper on control systems. The problem I'm running into is that I would like to place symbols under ...
8
votes
1answer
3k views

How can I display tick marks on only one axis of a pgfplots graph?

How can I display tick marks on only one axis of a pgfplots graph? Here is some simple code to work with: \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{...
6
votes
2answers
283 views

Styling every node without affecting coordinate styles

I am trying to draw a diagram and connect the nodes. Since i want to Place the labels above the lines I use every node/.style={above=.4ex, anchor=base}. However sometimes I draw coordinates at corners,...
8
votes
2answers
4k views

Increasing vertical space between two subpictures

I'd like to increase the distance between the upper pictures and the lower ones (a-c and b-d are too close to eachother). I'm new to tikz and I really don't know where to put my hands on. Thank you. ...
42
votes
3answers
3k views

How to project text onto a plane?

I'm trying to create the impression that the text "slice" in the example below is written on the cube slice. What is the best solution? To slant the text? \documentclass{standalone} \usepackage{...
6
votes
1answer
195 views

PGF's \foreach when list requires completion

Please is there anything I am doing wrong that PGF's \foreach is failing here? \def\alist{} \foreach\x in {% 2pt_A,4pt_A,...pt_A,10pt_A }{% \xdef\alist{\alist\ifx\alist\@empty\else,\fi\x}% } \...
1
vote
0answers
798 views

Plotting a histogram from a dat file using pgfplot [closed]

I want to create a histogram from a dat file with two columns, error and frequency. It also has a large amount of bins, 501. I have followed instructions provided elsewhere on this site but the data ...
5
votes
2answers
334 views

Tell TikZ not to draw paths with least one coordinate outside clipping region

Using Paul Gaborit's code for drawing subregions of Penrose tilings, I've created this image: The code to produce this is: \documentclass{article} \usepackage[active,tightpage]{preview} \...
7
votes
2answers
1k views

spherical coordinates in tikz 3d

Can we specify direction in spherical coordinates? I know we can do polar (angle:radius) but what is we are using tikz-3d and want to specify (r, theta, phi) where theta is the azimuthal angle?
0
votes
1answer
141 views

latexmk pointing to a line of code with an error that I don't see [closed]

When trying to compile my code, latexmk keeps hitting me with an undefined control sequences. I have checked above, below, and the line it says is causing the issue, but I don't see anything wrong. ...
9
votes
1answer
1k views

Using nan values in pgfplots

I use addplot to plot a data set which has nan values. The data file contains 5 columns. First column is the x-axis (time), the second and fourth is the wavelenght (same element, but 2 measurements) ...
2
votes
1answer
690 views

how to centerlize a box in the very center of the paper?

I am trying to draw a box in the center of the current page (A4 size). I try the following code \documentclass{article} \usepackage{graphicx} \usepackage{tikz} \usetikzlibrary{arrows,shapes,trees,...
4
votes
3answers
3k views

Adding variables in tikz

I tried looking here for an answer but didn't find anything. I'm trying to do this (taken from objectmentor.com): So far, I've got this: \documentclass{standalone} \usepackage{tikz} \...
3
votes
0answers
3k views

TikZ rectangle single rounded corner [duplicate]

How to round just one (or two, or three) corners of a TikZ rectangle? I can only get none or all rounded! \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \node [fill=red, ...
10
votes
1answer
627 views

Create custom node to draw this

I'm very very new to tikz, I've already done this: With this code: \documentclass{article} \usepackage[spanish,es-noquoting]{babel} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \...
2
votes
1answer
93 views

What is the nodename.number in the following example?

What is the nodename.number in the following example? For example a.345? Changing number arbitrarily rotates the arrows. How to decide on the numbers so that it remains parallel ? \begin{figure}[!htb]...
5
votes
3answers
1k views

Drawing system architecture in Latex

I want to draw a system architecture as in the picture below Can you help me?
6
votes
1answer
966 views

How do I generate in LaTeX a list of random questions avoiding repetitions?

How do I generate in LaTeX a list of random questions avoiding repetitions? \documentclass{article} \usepackage[pdftex]{exerquiz} \usepackage{enumitem} \usepackage{tikz} \newcommand*{\ListOfTopics}{%...
3
votes
1answer
336 views

Drawing a big commutative diagram in tex

I am trying to draw a big commutative diagram for my paper. The diagram is quite easy, it looks like a 4 by 8 matrix but the labels of the vertices and those of the arrows are quite large. For this ...
2
votes
1answer
1k views

Asymetric curly braces TikZ [duplicate]

How can I draw asymetric curly braces in TikZ? I have the following MWE: \documentclass{article} \usepackage{tikz, pgfplots} \begin{document} \begin{tikzpicture}[ >=stealth,] \draw [decorate,...
2
votes
1answer
339 views

pgfplots: How to fix the number of yticks?

With max space between ticks= it is possible to set space between ticks, but I would like to setup the number of ticks, so all my graphs will look similar. I would be happy with 4 ticks, so if y vary ...
2
votes
1answer
147 views

How to tell pgfplots to keep empty “series”?

I have a plot with xticklabels defined as symbolic. In a modified version of my plot, I want to set ymin value. When doing this, my plot is automatically updated: all x series having only points ...
45
votes
2answers
3k views

Draw polarized light

I was trying to draw something like that Searching through the net to see if it already exists in tikz I came accross in texample.net the following image which looks a lot like what I want to draw. ...
6
votes
1answer
264 views

Conversion of pgf code into TikZ code?

I am not clear about differences between pgf and TikZ. The latter is the frontend of the former. That's fine. In any case, their codes are clearly different. I have two questions. Is it possible to ...
0
votes
2answers
294 views

Color and efficient vector graphics

I want to use complex monocolor vector graphics but I would like to be able to specify the color inside my latex source. Solutions : Use a pdf, but I can't specify the color afterwards. Perhaps a ...
4
votes
1answer
1k views

Tikz beamer highlight different nodes in presentation using againframe

I'm working on a presentation in Beamer, I have a tikz flow chart that I want to repeat after a block on the chart is handeld in the presentation. To make it visually easy for the users I would like ...
5
votes
1answer
728 views

tikz calendar, month label position

I would like to make a smaller distance between month label and day headings. \documentclass{article} \usepackage[top=3cm, bottom=3cm, left=2cm, right=1cm]{geometry} \usepackage[utf8]{inputenc} \...
5
votes
1answer
297 views

how to make the line connecting the parent node to child node longer?

I wish to draw a tree using the following code, however, the line connecting S0 and S1 is not long enough as described in the following picture, may someone help me? \documentclass[tikz]{standalone} \...
5
votes
1answer
911 views

How to switch the poles of the SPDT switch in circuitikz

I am drawing a circuit with circuitikz that have lots of SPDT switches. I want to show the circuit at two different moments: once, when all the SPDT switches connected to out1 and the second with all ...
10
votes
2answers
351 views

Merging plots in TikZ

Is there a way to get the second plot at position "HERE" of the first plot? MWE: \documentclass[12pt]{article} \usepackage{tikz} \begin{document} %% First plot \begin{tikzpicture}[scale=1.5, ...
3
votes
1answer
624 views

tikz plot change one value of x axis

I'm not so familiar with tikz plot. The plot looks actually like it should, but I would like to change the last position value 300 to n in the plot. Is this possible ? \documentclass[]{article} \...
2
votes
0answers
453 views

How to find intersections between line and rectangle with rounded corners [closed]

I'm trying to display a line "under" a rectangle. For this I tried using the intersections package, but somehow I the line doesn't stop: \documentclass[a4paper]{article} \usepackage{tikz} \...
3
votes
1answer
512 views

Tikzstyle for 2:1 Mux

Could someone help me with a \tikzstyle for this trapezium block: I tried but look how it looks like: The main problem it is in how to set the text (0 1) in the right place. The code I'm using ...
0
votes
1answer
2k views

Exporting TikZ figures to .EPS

i'm trying to export a TikZ picture to .eps using the following on Win7 (MikTeX), compiling with pdflatex: \documentclass{article} \usepackage{tikz} \usetikzlibrary{external} \tikzset{external/...
7
votes
1answer
736 views

Drawing a mapping between arbitrary domains

I would like to draw a kind of diagram for mapping $\varphi:D\to D'$. Domains $D$ and $D'$ should look rather arbitrarily. I consider doing it with tikz but I do not know how to produce such nice ...
8
votes
1answer
1k views

Pgfplots: Drawing Arrows Along Contour Plots

I would like to draw "stealth" arrows in place of the "0" labels along the trajectory in the phase portrait pictured below. I decided to draw the trajectory using the contour functionality of Pgfplots....
5
votes
1answer
673 views

TikZ/PGF \closedcycle to y axis

Consider the following MWE: \documentclass{article} \usepackage{tikz, pgfplots} \begin{document} \begin{tikzpicture} \begin{axis} \addplot [domain=0.7:1.6,samples=20, fill=red!50!white] ...
7
votes
0answers
118 views

How to create a line with “radial” shading? [duplicate]

How would you draw a black line with TikZ that shades to white/transparent radially (like this) between two coordinates? Shading is possible for rectangles (TikZ documentation, Ch. 46), though I can ...
7
votes
1answer
683 views

TikZ and fundamental domains

First, I'd like to apologize if this question has already been asked before. I am trying to produce an image of a fundamental domain of the action of the modular group (that is, $PSL_2(\mathbb{Z})$) ...
3
votes
1answer
279 views

Tikz vertical alignement text and shape

I want to vertically align sans serif font with a rectangle. The following code show the problem: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary[positioning] \...