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

mirror node shape

I have to draw a diagram and would like to fit it on a page, thus i have not much space. Therefore I have to "stack" some gates, however it would be beneficial if I could put the outputs of the logic ...
7
votes
1answer
753 views

Exact scaling with TiKZ-scale

I am using tikzscale to scale all my figures to the same size. This works quite nicely, but sometimes there is a difference in the scaled width. I can manually tweak the scale parameter (using pdfcrop ...
3
votes
2answers
1k views

How can I customize different nodepart with different textures?

My question is how can I customize hatch patterns(grid, vertical line, etc.) for different nodepart in a node? The following is a failed try. \documentclass[border=2mm,convert]{standalone} ...
4
votes
2answers
2k views

tikz circle operation and fill

I would like to add circles on paths. for all circles except one I want them to be filled, therefore I set every circle node/.style={fill}. However there is one circle I do not want to be filled, ...
8
votes
1answer
430 views

a tikzpicture on pages without chapter and index

I would get the result of the output below \documentclass[11pt, a4paper]{book} \usepackage{geometry} \geometry{% papersize={19.7cm,27cm}, centering, textwidth=380pt, textheight=650pt} ...
6
votes
1answer
585 views

Small text near arrow tips

How can I add some tiny text near arrow tips? Details I have an automaton like Now I want each edge to have the usual arrow tip, and close to the tip additionally a tiny text $\tau$. How can I ...
6
votes
4answers
2k views

Brace diagram in TikZ

I apologize if this has already been covered in some other posts, but I couldn't find it anywhere and I'm not even sure if "brace diagram" is the correct name in English. I have found some examples ...
4
votes
2answers
6k views

Placing text inside graphs using pgfplot

My node markers disappear using this code. Is there a better way to do this? \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} \begin{document} \begin{tikzpicture}[domain=0:3] ...
4
votes
2answers
363 views

Tikz: Emphasizing part of a drawn path

How can I emphasize the counter clockwise trajectory on ellipse ecc2768 and the clockwise trajectory on ellipse ecc6789? Is there a command that will follow the ellipses from P1 to P2? ...
5
votes
1answer
3k views

PGFplots axis with arrow tips at the end

By using the following code: \begin{tikzpicture} \begin{axis}[xmin=0,xmax=40,ymin=0, ymax=42, xlabel=Φρούτα,ylabel=Γάλα] \addplot [color=Blue] coordinates { (0 ,40) (20, 30) (30, ...
4
votes
1answer
837 views

Changing the format to a plot ticks (using pgfplots)

Dera all: I'm using pgfplots to plot the data from the table below (forst vs. fourth column), 3000 1.2970e+00 0.198956 0.258046 3100 8.6050e-01 0.18747 0.161318 3200 ...
5
votes
1answer
646 views

Multiple Y-axis plot (4 Ys YY-YY)?

Can someone help me creat a figure like the attached one which is generated by Origin Lab? According to Jack's suggestion, I made my tex code as follows. The last thing I have to complish is the ...
5
votes
1answer
345 views

Tikz: How can I use the power of LaTeX to find the rotation angle of the ellipse?

I need to rotate my second ellipse around some angle. I have made guesses and determined it is around 88.5 degrees. However, I want to identify the exact angle. The code I have so far is: ...
9
votes
3answers
3k views

Overlapping nodes in tikz

I used to make a chain diagram in tikz, like described in the manual p. 59 ff, but in contrast to the manual, my nodes are overlapping. I tried to use the "node distance" option but i doesn't seem to ...
9
votes
2answers
334 views

Adding jitter to a straight line

I have found a post about: How to add a jitter to a scatter plot with pgfplots. I'd like to add jitter to a straight green line to recreate this graph.. Would this be the best way do you think? Also ...
15
votes
1answer
2k views

Modified pattern does not see the pattern color option

I have modified the north east lines pattern to accept a \LineSpace option that sets the density of the pattern (see the question Can I control the density of a pattern in TikZ?). The code works very ...
2
votes
1answer
693 views

Relay communication Block diagram

Im trying to prepare a research note on the relay communication field, I tried to draw the following diagram in LaTeX (TikZ) but I didn't succeed to draw it good enough... Can anybody help me to ...
1
vote
1answer
1k views

Using “latex” to externalize tikz graphics wont work

I am lost in tex! I try to run a tay example, which you can find here: EXAMPLE If I run it, using pdflatex -src -interaction=nonstopmode -shell-escape faster-latex-part2.tex everything works fine, ...
5
votes
1answer
713 views

Tikz: unit tangent vectors to a curve

I looked at many of the question here and on www.texample.net on how to construct tangent lines to a given point but I have no idea how to do this. Let's take a very simple example. ...
6
votes
1answer
1k views

How can I create a queuing node using tikz?

I am a newbie trying to recreate an M/M/1 queue in tikz and would really appreciate any help.
3
votes
1answer
1k views

Mindmap level specific child distance

Using the answer I got to this question, I have a mindmap with 6 children, each with 2-5 children of their own. MWE: % Author: Till Tantau % Source: The PGF/TikZ manual \documentclass{article} ...
5
votes
1answer
288 views

list of and add to toc mdframed objects

Bellow is some developed example solution I asked here tikz and mdframed + shadow drop and shading \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T1,T2A]{fontenc} ...
6
votes
1answer
994 views

Alignment of tikz nodes in a chain

How can the north anchors of the nodes in a going to the right chain be aligned in a tikz picture? As can be demonstrated by the following example, by default they seem to be aligned by the center ...
5
votes
0answers
48 views

Want to Bend an Arrow Around an Arrow Instead of Intersecting [duplicate]

I am using the tikz package to make a chart. I want to have arrows that intersect but I don't want them to do so. What I want is for one arrow to bend around the other arrow so that the viewer doesn't ...
4
votes
1answer
419 views

Tikz: Drawing a line from a focus to the edge of an ellipse

This question is similar to Tikz: connecting two vectors from the focus of an ellipse to the edge but not the same. In this instance, I want the the length of line to be a specific distance. If ...
8
votes
1answer
406 views

TikZ: an arrow with two parts

I would like to reproduce the following picture using TikZ. The arrow is split into two halves, and each half has a particular color and text. The two colors I chose are not important.
6
votes
1answer
257 views

Bug with smooth style and \closedcycle in PGFPlots

Could you please confirm the bug? \documentclass{standalone} \usepackage{tikz,pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[axis lines=middle,xmin=0,ymin=0] ...
7
votes
1answer
1k views

rotate node shape in tikz

Edit 1 Claudio gave a nice solution to my question. But the image should be included in a beamer presentation. I use for that the option transform canvas={scale=0.5} and this has a side problem ...
1
vote
1answer
287 views

Gap between xaxis and bars in tikzpicture

I am adding a bar chart with tikzpicture and I am getting a strange gap between the bars and the y axis. Am I doing something obviously wrong? Because my other bar charts works fine... Should I ...
1
vote
0answers
210 views

Error message using dot2texi [closed]

When compiling the document below with pdflatex: \documentclass{article} \usepackage{dot2texi} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \begin{figure} \centering ...
4
votes
1answer
3k views

On arrows in Tikz cd

So I am getting used to using tikz-cd package to draw relatively straightforward commutative diagrams. I have two questions. Question 1 Here is the code: \documentclass[10pt, draft]{amsart} ...
10
votes
1answer
783 views

Is it possible to set a default value for an argument in a TikZ style?

In a command like: \tikset{qar/.style={draw,rectangle,fill=#1}} is it possible to add a default key value for the option fill so that if you have: \node [qar] {}; the node will be filled with ...
4
votes
1answer
1k views

Adjusting the distance between label and axis in pgfplots

The single label of following plot is intersected by the curve. How can I make it a little far from axis and point to axis by a dashed line? \documentclass[border=5mm]{standalone} ...
4
votes
1answer
1k views

Tikz: drawing a line to the edge of a circle

If I wanted to draw a line to the edge of a circle, I could simple do the following \pgfmathsetmacro{\a}{2} \draw (0, 0) circle (\a cm); \draw[-latex] (0, 0) -- ({\a * cos(angle)}, {\a * ...
6
votes
2answers
304 views

Tikz: connecting two vectors from the focus of an ellipse to the edge

I would like to draw 2 vectors from the focus to the an arbitrary point on the ellipse (not necessarily arbitrary but if I can see how to do that, I can pick my locations afterwards). The solid ...
3
votes
1answer
442 views

ChangingTikz Node Style works only once in Beamer

I am trying to change the node style of a Tikz-node twice in Beamer but the second time the change is not done. What needs to be fixed in my MWE to make it work? \documentclass{beamer} ...
9
votes
1answer
1k views

Beamer overlays, tikz external and custom file name

This is a follow-up question from Use tikz external feature with beamer \only . Andrew's answer there is excellent, and does the job (almost) perfectly. The rough edge I have found was when I tried ...
2
votes
1answer
219 views

Strange behavior with \draw within axis environment

Consider the following snippet of code: \documentclass{standalone} \begin{document} \begin{tikzpicture} \begin{axis} \draw[-latex,cyan] (axis cs:0,0) -- (axis cs:1,1); \addplot coordinates ...
6
votes
2answers
658 views

Structure, Tuple or Dict for the foreach-loop in Tikz

How can I use something akin to the following in tikz? foreach (\x, \y, \colour) in {(0, 0, blue), (1, 1, green)} { \node[fill=\colour] at (\x,\y) {}; }
5
votes
2answers
678 views

tikz alignment for multi-line text within font commands

Why doesn't tikz accept multi-line text within font commands like \texttt and \textbf? For instance, compilation of the document \documentclass[tikz]{standalone} \begin{document} ...
8
votes
2answers
419 views

Individual value labels in Kiviat Diagram

I'm using the tkz-kiviat package to draw spider graphs and am quite happy with it. I can see how to add a axis label but how can I label the individual values of each node? There doesn't seem to be a ...
5
votes
1answer
2k views

Arguments of tikzset inside a beamer document

I am trying to use tikzset with an argument in a beamer document, and I am having an error I do not understand. \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}{My try} ...
5
votes
2answers
570 views

tikz matrix align/decorate cellpictures

I have a matrix of cell pictures, and want the first column to be right aligned and the second column to be left aligned. However I have trouble using the "nodes" key. example ...
1
vote
0answers
312 views

Circuitikz common [closed]

I'm learning Circuitikz to draw schematics in my reports. I'd like to use the symbol for common; however, it doesn't seem to be there. What are my options? Thanks. Example of use: ...
4
votes
1answer
679 views

Consistent distance between bar plot groups of different sizes

I'm trying to make a bar plot where i always have one single bar paired against multiple bars. Two problems arise -- first, the first bar is assumed to have 6 other bar buddies and gets pushed to the ...
4
votes
1answer
727 views

tikz and mdframed + shadow drop and shading

I'm interesting in Boxed text between pages 2nd version: exercise box with mdframed. Ho to add to this : Vertically shaded frametitle and Vertically shaded box with dropping shadow? Yes i have seen ...
6
votes
2answers
382 views

Random polar coordinates

I want do draw some random tiny circles inside a bigger one. I use rnd at both coordinates (polar): ({30*rnd}:{2*rnd}) -- here I want to have tiny circles in the range [0;30] degrees. The ouput is ...
27
votes
1answer
2k views

How to add a regression line to randomly generated points using pgfplots in Tikz?

\documentclass{article} \usepackage{tikz} \usepackage{color} \usepackage[active,pdftex,tightpage]{preview} \usepackage{pgfplots} \usepackage{pgfplotstable} \begin{document} \begin{tikzpicture} ...
1
vote
0answers
58 views

How to turn off the axis in tikz plot? [duplicate]

Anyone knows how to let the axis disappear from my plot. \begin{tikzpicture} \begin{axis}[colorbar] \addplot3 [surf,faceted color=blue, samples=15, domain=0:1,y ...
16
votes
2answers
905 views

Creating plasmid diagrams in TeX

I need to create a diagram of plasmid in TeX, which looks like that: The images above are slightly different but show pretty much the same thing so it would be great if I could create any of them ...