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)

4
votes
1answer
320 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
471 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
411 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
194 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
403 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
543 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
306 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
201 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
386 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
435 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
210 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
394 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
167 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
394 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, ...
10
votes
1answer
312 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
243 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
447 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
538 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
217 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
155 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
752 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
162 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
399 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
87 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
980 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.
4
votes
1answer
265 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 ...
3
votes
1answer
175 views

how to ensure items in two minipages are in same line

By including a tikz-picture in my two (tabular) minipages my items are messed up. Ideally there is a corresponding item for each (except there's an empty entry for the last item in the left table). ...
3
votes
2answers
2k views

Drawing a figure with concentric circles with text and shading

I am trying to draw the below given figure. Please help me to plot it in Tikz. I am only able to plot concentric circles. . I would like to have different colors in between different circles. Also, ...
7
votes
1answer
297 views

Drawing an altitude in a triangle and labeling its foot

I have provided the code for a triangle is to be drawn on the Cartesian plane. The point at the origin is labeled O, and the other points are labeled A and B. The altitude of the triangle is to be ...
8
votes
1answer
598 views

How can I reproduce the chemmacros logo style?

I'd like to reproduce the chemmacros logo style, as seen in chemmacros documentation I checked the source .tex file, but the logo is loaded from another pdf "chemmacros-logo.pdf" that is nowhere to ...
5
votes
2answers
179 views

Counter inside a tikz tree

I would like to increment and print counter at some node of tikz tree. I am able to do it when the tree grows to bottom, but not when it grows to left. My problem is that couter must be increment ...
6
votes
1answer
132 views

Unlimited size delimiters with TikZ

Compare this two outputs Which one would you prefer to have in your document? I would definetly prefer the one on the right. However, most fonts (MinionPro in this case) only offer four sizes of ...
4
votes
1answer
163 views

Labels above tikz tree forks

I have an upward-growing tree showing the flow of a proof, as follows: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} \resizebox{\textwidth}{!}{% \begin{...
1
vote
1answer
142 views

tikz shape fill not working

I am trying to define a shape as the attached yellow filled one. However, when I place the lines inside, the fill does not work properly and the rectangle's green background shows through. I have two ...
1
vote
1answer
292 views

Tikz arc angle calculation

I am having a serious mental block this afternoon. I have the following code to generate a shape, and I need one more arc to close it and cycle back to the original point. I can't seem to get my mind ...
7
votes
1answer
15k views

How to position TikZ nodes

How can I shift the system node right of control1 but vertically centered between control1 and control2? \tikzstyle{controller} = [draw, fill=blue!20, rectangle, minimum height=3em, minimum ...
5
votes
1answer
997 views

Anchor a node in the corner of a tikzpicture

How can I position a node in, say, the top-left corner of the tikzpicture without setting the position explicitly? Are there any hooks for positioning relative to the tikzpicture "frame" itself (and ...
7
votes
2answers
802 views

Diagrams with coloured boxes and arrows

I am trying to do the following diagram but seems that I can't understand the TikZ package: How can i do it? Im using the following code: \usepackage{tikz} \usetikzlibrary{arrows, decorations....
4
votes
3answers
310 views

Use \hfill inside tikz node

I would like to use an \hfill in a Tikz node, in order to have some text on the left and right of some node. Look at the following MWE \def\left{L\hfill} \def\right{\hfill R} \begin{tikzpicture} [...