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)

1
vote
1answer
63 views

How to draw this in tikz?

I have the following drawing, that I want to somehow replicate in tikz (or similar if that would be easier). The important part that I cannot figure out is how to have the arrow/semi-cone opening up ...
4
votes
0answers
52 views

The intersection of a sphere with planes through an axis tangent to the north pole

I am trying to draw a picture of a very simple sphere - i.e. one big black circle with additionally, an equator indicated with solid line in front, dotted in back. on this sphere I want to draw a ...
2
votes
0answers
53 views

Theory of Mind Type Figure

I am trying to draw this picture. I have produced multiple balloons etc., but it would be nice to produce exactly same figure. In case my primitive code may help someone, I am also adding it ...
3
votes
2answers
58 views

TikZ: how to apply an affine transformation?

I would like to draw something like this: The best I can do so far: \documentclass{article} \usepackage{tikz} \begin{document} \resizebox{0.95\textwidth}{!}{ \begin{tikzpicture} ...
3
votes
1answer
38 views

TikZ data visualization fails to load data from file

I'm trying to visualize some data with TikZ datavisualization library. Given foo.tex \documentclass{article} \usepackage{tikz} \usetikzlibrary{datavisualization} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
44 views

Circuitkz with relative +(x,y) coordinates updates current pen position

Is this a bug or am I doing something wrong? When using pure TIKZ everything works as expected: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ...
2
votes
0answers
83 views

Very fancy bar chart

Just wonder if this could be done with tikz? I know I should provide at least a MWE, but I am new to latex and have absolutely no idea where to start. MWE (Addition by HK) ...
1
vote
1answer
40 views

Undefined control sequence in TikZ braces

\documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{center} \begin{tikzpicture}[scale=1] \foreach \i[count=\t from 0] in {16,...,23} { \path (\t+0.25,1) ...
8
votes
2answers
180 views

How do you locally override/cancel a shadow?

In the example below, the style I've defined for every node uses a drop shadow. My a node uses that default style without modification. However, I'd like to override that style for node b, which ...
1
vote
0answers
39 views

tikz cannot parse radius in “radius=0.3” command

\documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=1] \draw (0,1.7) circle [radius=0.3] node {$T_1$}; \end{tikzpicture} ...
7
votes
2answers
184 views

Brazil Language problem in the TikZ diagram

I have a problem with TikZ diagram, I don't get to make the diagram with babel under the brazil language. I used the code with french and everything is OK! \documentclass[a4paper,12pt, ...
4
votes
2answers
77 views

Improving the visual appearance of a truncated cone in TikZ

I have drawn a truncated cone in TikZ and am generally happy with the result. Here is the output and an MWE: \documentclass{standalone} \usepackage{tikz} \begin{document} ...
2
votes
1answer
99 views

TikZ diagram is not rendered properly

I have a diagram that I want to include in my latex document. However, the diagram is not rendered properly. I am using Texmaker 4.1.1 with MiKTeX 2.9 on a Windows 7 32-bit machine. ...
5
votes
1answer
46 views

Text decoration below path

This should be very a very simple question. \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.text} \begin{document} \begin{tikzpicture} ...
4
votes
2answers
97 views

using tikz for rectangle in matrix

\begin{equation*} U^{k} = \begin{tikzpicture} \matrix [matrix of math nodes,left delimiter=(,right delimiter=)] (m) { z^{k} & 0 & \cdots & ...
1
vote
2answers
55 views

How can I add text to an inline tikz pickture

I am drawing some icons in latex with tikz picture and right below my icon, I would like to add text like "EXIT" start from position (0,0): \tikz[baseline=-0.5ex] {\draw[line width=3pt] ...
14
votes
2answers
361 views

Tikz: Drawing railway tracks

I like to draw a double line such that the gap between the two lines is transparent. My purpose is to draw railway tracks: \documentclass[tikz]{standalone} \tikzstyle{track}=[ ...
3
votes
0answers
36 views

How to align Matrix and Tikzpicture on the same horizontal line

I'm using subfloat to try to align my diagram with the matrix array. I want them to be next to each other, and per suggestion, used the subfloats to try to align them. I'm getting error messages. ...
4
votes
2answers
110 views

Creating diagram using tikz

I am trying to create following diagram in latex- Below is my latex code- \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} ...
3
votes
1answer
50 views

PGF foreach: elegant way to handle empty list

I am writing a simple animation in beamer using tikz. The code is as follows \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{frame}[fragile]\relax ...
1
vote
1answer
23 views

Problem when using Tikz in Lyx

I am using Lyx 2.1 on a windows 7 machine with MikTex 2.9. When I embed even very simple tikz code in a Lyx document it appears to go off into a loop and eventually generates the error message The ...
0
votes
1answer
62 views

how to install TikZ/ PGF [duplicate]

I recently came across a program called TikZ, for creating graphics. I don't know how to install it! In its website I didn't see any instructions. Could any one help me? I am using Windows 7 Home ...
0
votes
1answer
66 views

Text looks thinner after rotation

I want to rotate math text at 45 deg for a picture, but the text looks thinner. Here is a small piece of code with the same text, one "un-rotated" and the other rotated by 45 deg. ...
3
votes
1answer
105 views

Spectrum colormap for multiple curves

I have been using matlab2tikz to generate a lot of my plots, but I am finding it struggling at this particular job so would like to inquire about how to do it properly in pgfplots / tikz. Essentially ...
0
votes
2answers
126 views

How to finish this diagram with some tiny rectangle

I already have some tikz code which is a frame structure stand for wireless network hidden problem \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usepackage{array} ...
6
votes
2answers
107 views

Riemann sum with pgfplots — can't seem to make graph look right

I'm trying to reproduce something like this with the function x^-1, but no matter what options I try, I can't seem to make the graph look correct. This is my current code: ...
12
votes
4answers
1k views

Move Moon on its orbit around the Earth

I want to draw my Moon on its orbit around the Earth. I can easily draw the moon on the perpendicular axes centring on the Earth but to move it around would probably require some trigonometry... Is ...
5
votes
2answers
141 views

Filling an angle arc with a pattern

Consider an angle (on a plane) with the vertex O, the initial side (ray1) and the terminal side (ray2). Assume the measure of this angle is less than 360 degrees. (There are two such angles.) ...
6
votes
1answer
127 views

Azimuth shading for phase diagram

I want to make a phase diagram plot. As seen below, liquid phase (blue) changes gradually into gas phase (red). I want to fill the white part of the graph with azimuth shading between red and blue. ...
3
votes
1answer
40 views

Positioning Nodes In Tikz Below Left

This code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows,shapes,positioning} \usetikzlibrary{calc,decorations.markings} \tikzstyle{block} = [rectangle, draw, fill=blue!10, rounded ...
4
votes
3answers
122 views

How to make a simple 2D pressure vessel drawing in tikz?

Two things: 1) How do I make the semicircle portion of my shape have the same thickness as the straight lines? 2) How do I fill the overall shape with a filling gray colour? Here is my code so ...
3
votes
1answer
111 views

How to draw a system architecture with databases and shadows?

My goal is to draw a complex system architecture. Some approaches to do it are here How to draw a layered architecture using Latex? This approach http://tex.stackexchange.com/a/102669/44348 seems to ...
7
votes
2answers
99 views

How to show break in lines in tikz?

Im not sure what the term used for what I want so I will explain it. I want a double long drawn "S" to show that the line in my figure is actually longer than is shown- implying that there is a ...
6
votes
3answers
457 views

Azimuth shading

I would like to gradually shade a rectangle in a way that e.g. bottom edge is red and left edge is blue. \fill[left color=blue,bottom color=red] (0,0) rectangle (2,2); Therefore colour should be ...
3
votes
3answers
149 views

Hatching a rectangle leads to solid line in beamer

I would like to indicate an inequality constraint using a hatched pattern. This is to be done in a pgfplot, that is itself part of a beamer frame. Here is an MWE: \documentclass{beamer} ...
3
votes
2answers
107 views

How to draw gradient arrows with Tikz

I want to combine the two figures below into one. That is having an arrow with colors going from red at the bottom to blue at the top. Could anyone show me how to do it?
4
votes
1answer
49 views

Extracting the value stored in the /tikz/x option

It is possible to change the x distance within TikZ internal coordinate system by passing the /tikz/x= key to the tikzpicture environment. \begin{tikzpicture}[x=14pt] % Picture code \end{tikzpicture} ...
4
votes
1answer
47 views

specifying line width globally

\documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{arrows,shapes,positioning} \usetikzlibrary{decorations.markings} \usetikzlibrary{decorations.pathmorphing} \tikzstyle ...
3
votes
1answer
78 views

How to make right alignment when using Tikz

I use tikz to draw an image, below is part of the image. But the variable name is central alignment, how to make it right alignment? Below is the related code \foreach \i [count=\j from 1] in ...
0
votes
0answers
60 views

How do I place a tikz picture?

Suppose i have a tikz picture, and in the latex code, I put it between a theorem and a definition, but when I compile, the picture shows up in the middle of the theorem's proof. I think its because ...
2
votes
1answer
74 views

How to decorate a tikz rectangle with a box on north center part?

I want to make a rectangle like the image in which I could add an image with \includegraphics. I have the following rectangle code: \begin{tikzpicture}[overlay,remember picture] \draw ...
6
votes
4answers
148 views

Drawing an obtuse triangle, and marking its height

I would like to have an obtuse triangle with vertices A, B, and C drawn. The lengths of the sides are to be labeled a, b, and c. If the angle at C is the obtuse angle, the height of the triangle is to ...
0
votes
0answers
34 views

Draw a rectangle on page borders (not margins) with tikz? [duplicate]

Let's assume that the blue rectangle in the next image 1 represents the page borders, the gray rectangle represents page margins and, the black one represents what I need to draw using Tikz. I need ...
10
votes
3answers
166 views

Aligning tangents of graphs

I am drawing some graphs with tangents. I calculated the tangent should be centered at x=57/27 which is approximately x=2.11. I'm currently using the pos and sloped keys for nodes to draw tangents, ...
1
vote
1answer
52 views

How can I specify a minimum length for my graph's edges?

I've just started to use the (new?) graphdrawing library (see section 27 of the TikZ & PGF 3.0.0). It's awesome! However, I can't seem to effect a minimum length for my graph's edges. That's ...
5
votes
2answers
86 views

Use just a specific range of a colormap or shading in tikz

I'd like to create an image with tikz that uses just a part of a predefined colormap or shading. More precisley, if I have e.g. the jet-colormap I like to create several rectangles that use the ...
4
votes
2answers
114 views

Nested rectangles with different widths

The following code \documentclass[a4paper,10pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path [style={draw}] (0,0) rectangle (4,1); \path [style={draw}] (0,1) rectangle (4,2); ...
2
votes
1answer
64 views

Are there “draw split” keys for other split shapes besides the rectangle split?

The TikZ rectangle shape has a draw split key "/pgf/rectangle split draw splits=boolean" but in the TikZ manual there is no reference of similar keys for the: circle split, ellipse slipt, circle ...
4
votes
1answer
74 views

Split nodes in TikZ math nodes matrix with Beamer?

TikZ matrices and Beamer do not work smooth -- for example, we have to use ampersand replacement work around. Is there a similar work around that allow one to use \nodepart ? The MWE is this: ...
9
votes
1answer
137 views

Cover whole page with squares arranged in a “spiral”

I'm trying to cover a whole landscape A4 paper with small squares – drawn in TikZ – starting from the bottom left corner of the page and moving towards to the center of the page in a ...