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

How to add cyrillic text to tikz image?

I tried the following: \documentclass[landscape]{article} \usepackage{tikz} \usetikzlibrary{backgrounds, shapes, arrows} \begin{document} \begin{tikzpicture} \node at (10pt, 50pt) {Й}; ...
5
votes
1answer
597 views

pgfplots: Splitting xlabel on two lines

I want to split xlabel into lines. My MWE is below: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.7} \begin{document} \begin{tikzpicture} \begin{axis}[ % xlabel ...
2
votes
1answer
540 views

Help With TikZ: Recreating Diagrams from e/m Ratio Experiment—Helmholtz Coils and Circuitry

I have two images I need to recreate in TikZ. The first is that of Helmholtz coils and their spacing in the experiment: And the second being the wiring for the coils: My (very) Minimal working ...
9
votes
2answers
715 views

How to add legend to contour plots?

The following does not work: \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[view={0}{90},legend entries={foo,bar}] % 'legend entries' causes ...
4
votes
1answer
340 views

how to make this circles?

I would like to make in LaTeX these circles. How can we add the words in them? The color for the big one?
3
votes
1answer
139 views

How to color numbers in axis?

I want to color the numbers 3 in blue and -1 in green as show in the picture below. My code is this : \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} ...
3
votes
0answers
110 views

Scale font in TikZ plots [duplicate]

I have a lot (~100) of TikZ plots, autogenerated with a popular matlab script. I want to resize the font of the plots, because it is currently too large. I googled a bit, and found some answers (even ...
12
votes
1answer
1k views

Help creating solid cylinders along a path in Tikz for crystal lattice diagram

I am trying to draw a diagram using Tikz that will show the crystalline lattice structure of diamond. It should look like the following illustration (reference). I have managed to figure out the ...
8
votes
1answer
577 views

pdflatex nonstopmode with TikZ stops compiling

I compiled a TikZ code using pdflatex -interaction=nonstopmode. Depending on code errors, compiling stops. I want to know what went wrong. Let me show you two cases, both of which involve a code error ...
10
votes
5answers
3k views

Draw an aircraft with Tikz

I want to draw a plane using the Tikz tool. You will find, attached, a screenshot.
2
votes
2answers
305 views

Calc and \settocdepth break \tikzexternalize

This might well be the strangest TeX behaviour I've ever seen and that's saying a lot. The following really is a MWE as far as the header is concerned: \documentclass{memoir} \settocdepth{subsection} ...
2
votes
0answers
310 views

Title page report with TikZ [closed]

I want to make the front page shown in the attached PDF. Someone! help me?
8
votes
3answers
501 views

Parallel lines on a grid and circle best practices?

I am a TeX/LaTeX noob, but I am learning rapidly. I am about to attempt to draw the following figure using LaTeX/TeX/TikZ I already have a, (I think) good working knowledge of how to draw circles, ...
4
votes
2answers
147 views

Boxing a number and aligning it vertically along the baseline

I am making a big list of exercises and I'd like to box the number of the exercise at each line. I found this: \tikzstyle{square}=[minimum width=0.5cm, minimum height=0.3cm, rectangle, rounded ...
5
votes
1answer
741 views

Right Angle Symbol Alignment with TikZ/Calc

I used a solution from @Jake from this post Insertion of Perpendicular Symbol at Intersection of Two Lines, but the alignment is not quite right. I have my suspicions why, but I don't understand the ...
4
votes
1answer
299 views

Text decoration is trimmed off with standalone package

I am decorating an arc with text as shown in this MWE using the standalone class: \documentclass[10pt,class=article]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.text} ...
7
votes
1answer
6k views

Where is the pattern list gallery for pgfplots?

Where is the list, or gallery of the patterns available for pgfplots?
4
votes
1answer
436 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 ...
2
votes
1answer
591 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
711 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
238 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
1k 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
309 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
258 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 ...
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
2k 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
382 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
761 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
2k 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} ...
6
votes
2answers
222 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 ...
7
votes
2answers
3k 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. ...
39
votes
3answers
2k 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} ...
6
votes
1answer
157 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
634 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
267 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} ...
2
votes
1answer
847 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
119 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. ...
8
votes
1answer
668 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
353 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} ...
4
votes
3answers
2k 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} ...
2
votes
0answers
2k 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
383 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
88 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 ? ...
4
votes
3answers
760 views

Drawing system architecture in Latex

I want to draw a system architecture as in the picture below Can you help me?
5
votes
1answer
619 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} ...
3
votes
1answer
276 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
824 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 ...
2
votes
1answer
239 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
129 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 ...
44
votes
2answers
2k 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. ...