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
53 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
26 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
79 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 ...
1
vote
1answer
70 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. ...
5
votes
1answer
193 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
137 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
123 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: ...
13
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
158 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
2answers
160 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
51 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
143 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
144 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
118 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
481 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
163 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
121 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
77 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
49 views

specifying line width globally

\documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{arrows,shapes,positioning} \usetikzlibrary{decorations.markings} \usetikzlibrary{decorations.pathmorphing} \tikzstyle ...
3
votes
1answer
92 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
61 views

How do I place a tikz picture? [duplicate]

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
85 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
172 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
176 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
58 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
102 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
120 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
69 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
85 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
144 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 ...
5
votes
1answer
99 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, ...
4
votes
2answers
139 views

Move a tikz node somewhat below in relative positioning

I have the following code (stripped down from a much larger one). (I understand that there are numerous questions (and answers including this excellent one) on relative positioning of nodes, but they ...
0
votes
1answer
67 views

How to make Tikz image move to left of the page?

I use Tikz to draw a image, but the image is little big and too right in the page, i want the image move to left in the page, how to do it? I tried to smallize the font size, but this does not make ...
1
vote
0answers
56 views

placing text using \widthof with tikz

I am new to using Tikz and I do have a question about writing a macro with allows me to use a parameter to scale a simple drawing and put text according to the size of the drawing. Here is what I ...
1
vote
0answers
30 views

how can I load a tableplot, put random colors, and the legends automaticaly using a foreach?

\begin{tikzpicture} \begin{axis}[scaled x ticks={real:1e3},xtick scale label code/.code={$\cdot 10^3$}, axis lines=left, %xticklabel={$\pgfmathprintnumber{\tick}\lambda$}, pone lambda al lado del tikz ...
0
votes
0answers
36 views

Drawing and labeling a triangle for a demonstration for the Law of Cosines [duplicate]

I have provided the code for a triangle having vertices A, B, and C. The lengths of the sides are to be labeled a, b, and c. The altitude of the triangle is to be drawn as a dashed line segment from ...
4
votes
1answer
92 views

tikz drawing a partitioned rectangle

I would like to draw the following figure, but I don't even know where to begin. This goes far beyond my tikz expertise. If anyone can help, I would appreciate it very much. Here is a skeleton code to ...
1
vote
0answers
56 views

How to fill random spaces with random circles in tikz?

Does anybody know how to efficiently draw either one of the following pictures in tikz? Specifically the "Well Graded" interests me, as one would have to fill random spaces between circles - with ...
3
votes
1answer
62 views

tikz how to center text in a vertical rectangle

I am trying to put vertically rotated text inside a rectangle and I have not been able to get it centred vertically. Here is my minimal code and what I get. Any help would be appreciated. ...
7
votes
3answers
89 views

Tikz matrix arrows alignment

I have a problem that I cannot solve for myself. The following code produces the following image, which I do not really like. \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix, ...
3
votes
0answers
38 views

\pgfmathparse returns a phantom .0.0

\documentclass{minimal} \usepackage{tikz} \begin{document} \pgfmathparse{random(-5,5)} \pgfmathresult \end{document} Works, but I have a .0.0 that not supposed to be here.
1
vote
0answers
142 views

Figures for the new Evolve user guide [closed]

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. ...
4
votes
1answer
204 views

How to draw this picture in Latex

I need to draw a picture, the picture is showed below. Which package is better to draw it,TikZ? Actually I need integrate the latex code into my software program, and the input, output and variable ...
2
votes
2answers
88 views

Relative node positioning with calc library

Hi I'm trying to place same nodes relative to each other. I'm trying to place a node in the middle between two other nodes, but also half a cm to the right. \usepackage{tikz} \usetikzlibrary{calc} ...
3
votes
1answer
114 views

Creating performance profiles

A performance profile is a kind of plot used in the optimization community; here below is an example from http://www.gamsworld.com/performance. For an introduction, see Section 22.4 of Higham and ...
3
votes
1answer
86 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} ...
6
votes
1answer
207 views

Classroom Seating Chart in TikZ?

I would like to make a random classroom seating chart starting from a numbered list of students. I would also like to specify the number of seats per row (as it varies in my classroom) and the number ...
7
votes
1answer
139 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 ...
6
votes
2answers
131 views

`\foreach` command in TiKz

How come that in the code below, \foreach is unable to give me round numbers? \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{positioning, calc} \begin{document} ...