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)

5
votes
1answer
811 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 ...
4
votes
1answer
964 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 * ...
4
votes
1answer
2k 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} ...
2
votes
1answer
145 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
1answer
737 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 ...
4
votes
1answer
655 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} ...
6
votes
2answers
444 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) {}; }
8
votes
2answers
1k views

Drawing the contour of a 3d torus

I would like to draw a torus, like the one on the question How to draw a torus, with a 3d package. I would like to avoid drawing the torus in 2d with inkscape (or directly with tikz) because I will ...
1
vote
1answer
762 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
2answers
454 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} ...
12
votes
2answers
451 views

Basic geometric shapes, sections, shading

Two questions really ... (fishing for lots of opinions here) Is there a definitive guide that most folks agree is the best place to come up to speed on how to make pictures in the tikz world, and in ...
5
votes
1answer
231 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} ...
5
votes
1answer
1k 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} ...
7
votes
1answer
226 views

Node numbers in index of coordinatesystem

I've got a not so simple problem :) First I am going to show you a picture to explain better what I want. In that picture I want to have the index numbers of the coordinate system to show the ...
1
vote
0answers
227 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
458 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 ...
6
votes
2answers
297 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 ...
4
votes
1answer
530 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 ...
3
votes
1answer
206 views

using TikZ with multipage table

I am using tikz files to insert figures . I would like to add 3 figures one after the other with the same figure caption: I use this code: the problem is that the last figure is at the bottom of the ...
27
votes
1answer
1k 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
1answer
217 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 ...
7
votes
1answer
847 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 ...
4
votes
2answers
180 views

Add text around the X label

Fig 1 is generated by Matlab, and the following code is created using Matlab matlab2tikz package. The different between Fig. 1 and Fig.2 is the position of % symbol. Fig.2 is produced by the converted ...
2
votes
0answers
196 views

Preserve node and font size when scaling [closed]

I am using tikz for many pictures in my thesis, but I am not really clear on how to scale the pictures to fit my needs... I generally use "\node"s which I connect with line segments. I draw and fill ...
4
votes
1answer
292 views

Tikzmarks being placed arbitrarily when shifting tikzpicture

I wanted to center my tikzpicture canvas for all my slides so that can consistently position objects. For some reason, when I added shift=(current page.center) to all my tikzpicture picture ...
1
vote
0answers
56 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
756 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 ...
6
votes
1answer
389 views

Tikz: How to place wordings nicely with the drawing (in block diagram)?

This is my first attempt to create a figure using Tikz package in LaTex. (I am using TexMaker btw). So I have taken example codes here and there and slightly modified to come up with the figure that I ...
6
votes
1answer
279 views

Display problems when plotting large datasets (unwanted spikes)

I have a problem concerning pgfplots and large datasets. I have the following minimal example: \documentclass{scrartcl} \usepackage{tikz} \usepackage{pgf} \usepackage{pgfplots} ...
6
votes
1answer
486 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 ...
4
votes
1answer
460 views

How to set a default parameter for all edges

Question How do you set all edges in an automaton to have the additional parameter double? This should be easy, but I can't find the solution here or in the tikz/pgf manual or anywhere else. ...
11
votes
1answer
726 views

Unsung Heros - PSTricks, TikZ, pgfplots,

While watching presentations (mostly made with beamer) at my university I noticed, most people here use LaTeX to create there presentations which is really nice. (not just for the health of my eyes) ...
6
votes
2answers
737 views

Chapter Dependency Diagram in Latex

Please look at the complex chapter dependency diagram EXAMPLE in the given image. It explains how each chapter is dependent on the previous one. I am sure diagrams of this type can be done (hard ...
7
votes
1answer
426 views

tikz clip rounded corners

How to apply this Tikz solution (Rounded corners only at one side of a TikZ node) to have the same effect on clipping? I want to clip things (images) using that rectangle with differently rounded ...
8
votes
2answers
301 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 ...
14
votes
1answer
846 views

Surrounding Nodes with an Ellipse in TikZ

The following code places six nodes along the perimeter of an equilateral triangle: \begin{tikzpicture}[every node/.style={draw}] \node (l1) at (0,0) [circle] {}; \node (l2) at (2,0) [circle] {}; ...
1
vote
1answer
182 views

Tikz: the use of \tilde is not working in the tikz environment

From my post on placing a node at the intersection of two circles, I came across a problem. When I compile the document, \tilde F renders ~F and not a tilde over the F. I can't duplicate this issue ...
3
votes
1answer
286 views

tikz trees - children attached to wrong node

Consider \usetikzlibrary{calc,decorations.pathreplacing,shapes.symbols} \begin{tikzpicture} \node [shape=cloud,aspect=2,draw] {\strut} [level distance=6em,sibling distance=1.5em,grow=45] child ...
0
votes
1answer
464 views

Error using tikz externalize with TeXnicCenter

When I compile my document i get the following error ! Package tikz Error: Sorry, the system call 'pdflatex -shell-escape -halt-on-error -interaction=batchmode -jobname "tikz/myfile-figure1" ...
0
votes
0answers
55 views

Label in cyclic arrow diagram [duplicate]

Consider the following code from TeXample.net: How to refactor it for adding sloped labels on the outside of the arrows? Do you have a more elegant solution with TikZ? % Overlapping arrows % ...
3
votes
0answers
114 views

Strange line appearing in tikz plots [closed]

I am generating plots using matlab2tikz and then including all of these .tikz files into my dissertation. I have declared the following in the the .tex file \usepgfplotslibrary{external} ...
4
votes
0answers
355 views

Using `external` selective for TikZ-pictures [closed]

For the following example: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{calc,external} \usepackage{pgfplots} \tikzexternalize \begin{document} ...
12
votes
2answers
402 views

Triangle as constraints in structural engineering

I guess this must be quite simple, but all I've tried didn't work so far. All I want is to get some triangles on the edge of a framework. Something like this: My code looks like this: ...
7
votes
1answer
2k views

Change font family in pgfplots (followup)

The MWE below shows that the solution at How can I change the font family in pgfplots? does not cover all the cases. The digits in the plot itself and the subscript in math mode in the title need ...
4
votes
1answer
259 views

Increasing dateplot's resolution to seconds

These three dots should be spread out over a period of 50 seconds, but for some reason they all appear at 13:00:30. \documentclass{minimal} \usepackage{pgfplots} \usepgfplotslibrary{dateplot} ...
6
votes
1answer
870 views

Scaling a multi-column TikZ/pgfplots groupplot to page width

I am trying to scale a pgfplots groupplot with multiple (and variable numbers of) subplots to match the \textwidth of a document. What I found is that there seems to be no direct relationship between ...
7
votes
1answer
1k views

Mindmap sibling angle in Tikz

I am using the following tikz example (original source) MWE: % Author: Till Tantau % Source: The PGF/TikZ manual \documentclass{article} \usepackage{tikz} \usetikzlibrary{mindmap,trees} ...
5
votes
1answer
185 views

How to parametrize a \draw command in tikz?

I'm using the following command to draw a 'X' at a particular coordinate (x): \draw [blue, line width=1mm] (x)-- ++(-4.5pt,-4.5pt) -- ++(9.0pt,9.0pt) ++(-9.0pt,0) -- ++(9.0pt,-9.0pt); ...
5
votes
1answer
320 views

Using the perpendicular coordinate system with tikzmark

How do I refer to the coordinate that is the meeting point of the perpendiculars drawn from a tikz mark and a coordinate? I'd like to use this to align images to bullet points in my beamer ...
3
votes
1answer
1k views

Problems with axis label and colorbar for pgfplots

I used matlab2tikz to convert a figure from matlab to tikz. When I run this code, I get this addition $.10^-2$ in both X and Y axis. (see figure below ). In addition ytick of the colorbar is also not ...