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
0answers
16 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 ...
4
votes
2answers
52 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} ...
4
votes
2answers
65 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} ...
1
vote
0answers
32 views

Hatch Rectangle or Area in TikZ/pgf 3.0

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 ...
1
vote
0answers
45 views

Draw molecule structure with torsion angles in TikZ

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
21 views

using package circuitikz causes tikz labels to not appear on vertices

I've been using tikz to create graphs and it's been working fine, but recently I added the circuitikz package to the preamble since I need to also create electric circuits. And now the labels for the ...
0
votes
0answers
24 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
0answers
41 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)}} ...
3
votes
2answers
110 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} ...
3
votes
1answer
52 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, ...
8
votes
1answer
98 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) -- ...
5
votes
1answer
69 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 ...
3
votes
1answer
55 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 ...
6
votes
1answer
46 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
48 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
31 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 ...
4
votes
2answers
239 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
35 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} ...
-1
votes
0answers
80 views

Drawing the projection of a vector on the other [duplicate]

I want to draw this simple figure and I need some help.
12
votes
2answers
327 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 ...
3
votes
3answers
165 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
34 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] ...
2
votes
1answer
44 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
257 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 + ...
0
votes
0answers
31 views

TikZ: how to filldraw a graph [duplicate]

How to draw the attached graph using tikz? I do not know how to draw the shaded parts. Thanks.
0
votes
0answers
39 views

How to insert hebrew In backround (with Tikz) in Lyx

I try to do a background with a text on the top right corner of the page (with borders and page number) I succeeded in creating it but I want to insert a hebrew text (it renders english the way I ...
1
vote
0answers
34 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: ...
1
vote
0answers
14 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
433 views

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

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.
3
votes
1answer
95 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
65 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). ...
1
vote
2answers
141 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, ...
6
votes
1answer
80 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
484 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
99 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
49 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 ...
3
votes
1answer
46 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}{!}{% ...
1
vote
1answer
51 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
53 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 ...
3
votes
1answer
62 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 ...
3
votes
1answer
33 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 ...
6
votes
2answers
273 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, ...
4
votes
3answers
104 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} ...
1
vote
0answers
58 views

Fitting TikZ graphs into a small space

I am trying to produce a graph of the kind at the end of Kanamori's textbook - "The Higher Infinite": It would be nice to have a method that extends to any graph of implications, so rather than put ...
3
votes
1answer
142 views

Rug plot in TiKZ

I wish to draw something like (a kind of rug plot) The plot shows performance of various machine learning methods. I wonder what is the best way to draw perpendicular hooks. Moreover, how can I ...
2
votes
1answer
100 views

Matplotlib's PGF vs Matplotlib2Tikz

I want to generate some plots to be integrated into a LaTeX document compiled with pdflatex. I also want the plot font (legend, title ...) to follow the settings of the LaTeX document. My search so ...
1
vote
1answer
51 views

Make custom tikzpicture section heading non-rigid

Trying to make a custom section heading but I don't know how to make it move fluidly with the text, only by commanding it to be in a specific location on the page. I want it to look like this: This ...
2
votes
1answer
31 views

label overlapping with arrow in tikz

First, the working code: \documentclass[journal]{IEEEtran} \usepackage{libertine} \usepackage{cite} \usepackage{url} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm} ...
10
votes
3answers
371 views

Drawing a isosceles triangle on Cartesian plane

An isosceles triangle is to be drawn on the Cartesian plane. The two legs of equal length are to be in the first and second quadrants. (The code that I have gives angles of the two legs as 41 degrees ...
2
votes
0answers
44 views

key [turn] doesn't [on hold]

According to the manual (http://www.ctan.org/pkg/pgf p. 142) the following code is sound \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) -- (1,1) -- ...