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
44 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 ...
12
votes
3answers
351 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
378 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 ...
6
votes
2answers
2k 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
191 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
443 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
320 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: \...
10
votes
1answer
223 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
692 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, ...
6
votes
2answers
4k 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
566 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
123 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 ...
2
votes
0answers
97 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
42 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
326 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 ...
4
votes
1answer
494 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
1k 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
417 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, arrows}...
6
votes
1answer
202 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
168 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
409 views

How to draw this box representing a system with arrows indicating inputs and outputs?

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
550 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} \...
2
votes
1answer
312 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
209 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} \begin{...
7
votes
1answer
393 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 ...
12
votes
1answer
2k 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 ...
10
votes
2answers
449 views

Why does the \foreach command in TikZ give wrong results for step size 0.1?

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} ...
5
votes
2answers
2k views

tikz dash rectangle in nest nodes

I want to use dash rectangle in outer node but use solid rectangle in inner nodes. But my sample code below actually dashed all node for inner or outer nodes. \documentclass[tikz]{standalone} \begin{...
1
vote
1answer
211 views

Hatch Rectangle or Area in TikZ/pgf 3.0 [closed]

I just switched to TikZ 3.0 and was used to hatch rectangles similar to this thread Hatch a rectangle in TikZ actually the example given in the accepted answer http://tex.stackexchange.com/a/54465/...
3
votes
0answers
398 views

Draw molecule structure with torsion angles in TikZ [closed]

I am trying to reproduce this figure in LaTeX: The packages that I have seen for annotating chemical structures do not seem to accomplish what I want (not to mention that my knowledge on chemical ...
0
votes
0answers
36 views

how to download and install hobby package for this latex scheme [duplicate]

I get this following scheme but it doesn't work in my laptop, i work using texmaker and miKteX 2.9, i always get the error I can't find tikzlibraryhobby.code.tex, i enter the package manager to ...
1
vote
1answer
168 views

Calculation in TikZ coordinates

Could somebody tell me why with that code \documentclass{standalone} \usepackage{tikz} \usepackage{pgfplots} \usetikzlibrary{positioning} \usetikzlibrary{calc} \newcommand{\loga}[1]{{log10(#1)}} %...
5
votes
2answers
2k views

Tikz-Draw smooth path to form a spectrum peak

I am using tikz to recreate the following image What I am trying to do is draw an "extended" and "smooth" trapezoidal shape. My code is \documentclass{standalone} \usepackage{tikz} \begin{document}...
4
votes
1answer
401 views

How can I draw inside a block?

I am trying to build up a PID control block with anti windup \tikzstyle{controller} = [draw, fill=blue!20, rectangle, minimum height=3.5em, minimum width=6em] \tikzstyle{subblock} = [draw, ...
11
votes
1answer
324 views

drawing a plane and orthonormal system using tikz

I want to draw the following image and i face problems especially in the plane on the left : \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture} \draw[thick,->] (52,0) -- (...
10
votes
2answers
249 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 and/...
3
votes
1answer
466 views

two variables foreach loop problem

I want to draw a pulse train on which I write some information like the corresponding angle, etc... But I think I've got a problem with the two variables foreach loop because I can't even compile ...
7
votes
1answer
547 views

How to specify a direct color in a tikz picture

I want to model gradients in TikZ for a paper covering color gradients. These are rather special, so a cannot rely on a TikZ shade alone. Thus, I want to model the gradient using consecutive TikZ ...
5
votes
1answer
219 views

TiKz and \pgfmathifthenelse

Does anybody know why, with the following code, I do not get my blue line go from (0,0) to (0.5,0)? To me, the abscissa 1 should be multiplied by 0.5, given by \pgfmathresult, result of the condition ...
1
vote
0answers
94 views

How can I horizontally align the bars of two barplots

I would like to align the clusters of the two barplots of the figure below. For instance, I would like that the cluster of "Program-2" on the second bar appeared just below the "Program-2" cluster ...
5
votes
2answers
1k views

Draw parallel lines each one with a fixed length

I am trying to create parallel lines in tikz. Although I can create those lines, I can't seem to be able to control the length of those lines, which I want them to stop in the red box's face. My code ...
3
votes
1answer
156 views

Loops in dot2tex. Or easely draw complex graphs

My original question : Is it possible to use loops in dot2tex? I would like to type something like: \documentclass[]{article} \usepackage{tikz} \usetikzlibrary{arrows,shapes,snakes,automata,...
14
votes
2answers
768 views

How to draw arrows between circled coefficients of polynomials using tikz

After reading Gonzalo's answer to Arrow between parts of equation in LaTeX, I thought I would be able to modify it so that I could have the corresponding coefficients circled and an arrow going from ...
4
votes
4answers
2k views

How can I draw this cycloid diagram with TikZ?

Good evening, I'm sorry again abuse their knowledge but I'm very inexperienced using TikZ. Anybody could do me the favor to plot a curve cycloid using TikZ? I appreciate it very
2
votes
0answers
52 views

tikz align text to left inside node [duplicate]

I am trying to align node text to left but it seems below code still put the text at the center of node: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[thick] \...
3
votes
1answer
170 views

How can I make axis lines connected and make axis be over the plot?

I've just put a lot of effort in the following tikz image for Wikiepdia (see commons link): However, there are two small things that I can't get fixed: When you look at the bottom left corner ...
5
votes
4answers
402 views

Calculations in minimum width

I'm trying something like this: \begin{tikzpicture}[x=1cm,y=1cm] \newcommand{\mw}[1]{#1+1} \node [minimum width=\mw{1} cm] {}; \end{tikzpicture} My problem is that this is expanded to 1pt + ...
1
vote
0answers
37 views

Compiler Error. Tikz and Arrow error? [duplicate]

Im having a little problem with the Tikz package. I don't know why it doesn't want to compile if i want to do arrows instead of lines. Im using the following code to create a diagram: \usepackage{...
2
votes
0answers
88 views

lyx with background won't load unless I type \newpage after the text

I try to write a document with a background in lyx, I made sure it works on Texmaker, on Texmaker it needed to be built a couple of times and then it got it right but when I try to preview or export ...
1
vote
3answers
1k views

How can I draw this reservoir diagram with TikZ? [closed]

I am trying to draw the diagram below in Tikz. I have been unable to do so, I need the minimalist and a 3D representation.