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)

0
votes
0answers
7 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 & ...
0
votes
2answers
22 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] ...
13
votes
2answers
180 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}=[ ...
0
votes
1answer
61 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

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 ...
3
votes
1answer
45 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 ...
4
votes
2answers
117 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.) ...
5
votes
1answer
108 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. ...
8
votes
3answers
149 views
+50

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, ...
3
votes
0answers
33 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. ...
1
vote
1answer
68 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 ...
6
votes
3answers
443 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 ...
4
votes
1answer
130 views

TikZ nodes in pgfplots saved for later use, but locations mismatch

I really need a quick advice dealing with the answer given by sdaau. See this question. Actually I have a follow-up question regarding the given solution. This works actually pretty fine, but the ...
4
votes
2answers
86 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} ...
1
vote
1answer
18 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 ...
5
votes
2answers
102 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: ...
0
votes
2answers
122 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} ...
0
votes
0answers
44 views

how to install TikZ/ PGF

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 ...
29
votes
5answers
10k views

Draw arc in tikz when center of circle is specified

It would be convenient sometimes to be able to draw an arc in tikz by specifying the center of the corresponding circle its radius the initial/final angle i.e., the "natural" way an arc is ...
10
votes
3answers
937 views

Drawing of Sun–Earth–Moon system

Is there a package (or packages) for drawing the Sun–Earth–Moon system with either PSTricks, TikZ, or some other vector graphics language to illustrate Lunar and Solar eclipses, the phases of the ...
11
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 ...
3
votes
1answer
76 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 ...
7
votes
2answers
97 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 ...
3
votes
1answer
38 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
2answers
97 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
2answers
104 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?
3
votes
3answers
143 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} ...
6
votes
4answers
144 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 ...
5
votes
1answer
83 views

TikZ: How to extract part of a path for later usage

I want to know if there is a way to extract some part of a named path and use this part later on for e.g. stroking. In my example, I want to stroke the line in the middle (the path named mitte) from ...
2
votes
1answer
191 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 ...
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 ...
4
votes
1answer
46 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} ...
2
votes
1answer
72 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 ...
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 ...
4
votes
2answers
113 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); ...
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 ...
7
votes
1answer
89 views

How to plot scatter points using pgfplots with color defined from table rgb values?

I am trying to plot a set of data points (scatter points not linked to each other), where each point has a different color. The color definition is given by predefined rgb values written in the same ...
9
votes
1answer
135 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 ...
1
vote
1answer
51 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 ...
12
votes
2answers
3k views

Using a pgfplots-style legend in a plain-old tikzpicture

I am using a plain-old tikzpicture to produce a pie-chart-like plot. Now, all other plots in my paper are handled using pgfplots (which doesn't do pie charts) and have their legend typeset by ...
4
votes
1answer
73 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: ...
2
votes
1answer
82 views

How to draw Closed curver with TiKZ?

I want to draw the following diagram. I have tried with the following Latex command: \documentclass[12pt,twoside,a4paper]{book} \usepackage{graphicx,wrapfig,tikz} \begin{document} ...
5
votes
2answers
83 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 ...
7
votes
2answers
118 views

Workaround how to use expl3 functionality in tikz

What I want to do I want to create a command \planfigur{<edges>}{<angles>} which draws a triangle using TikZ. \planfigur should have 2 mandatory arguments, which let me specify edges ...
2
votes
1answer
63 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 ...
6
votes
1answer
113 views

different proportions for tikz between ktikz and latex

I am developing a figure in (k)tikz. Here's the code: \begin{tikzpicture}[every node/.style={draw,rounded corners, minimum height=18, right}] \node[text width=3.5cm] at (-3,-3) { $\quad\, d(start_1 ...
4
votes
1answer
76 views

Labeling the lengths and angles in a diagram with measurements

I have a diagram that is to be used to define the sine, cosine, and tangent functions. How do I label the drawn radius "r"? How do I draw the angle for alpha? (I am trying to adapt the code that I ...
5
votes
1answer
87 views

Multiple tikzpictures in a standalone document

I have a standalone document of the form: \documentclass[tikz]{standalone} %\documentclass{article} %\usepackage{tikz} \usetikzlibrary{positioning} \newcommand{\tikzmark}[2]{\tikz[remember picture, ...
1
vote
0answers
133 views

Figures for the new Evolve user guide [on hold]

I don't know how many Mercurial users are on this site, but if you do use Mercurial, you may have heard of the Mercurial killer extension, Evolve, which is eventually planned to be in Mercurial core. ...
0
votes
0answers
39 views

Error when move program from laptop to desktop (the program has an image created by tikz) [on hold]

I have a program which include latex code to produce PDF. The program works fine in my laptop, but when i move the program to my desktop, error comes! Actually I move the program between laptop and ...