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)

2
votes
1answer
111 views

Simple horizontal path

I am trying to create just a simple horizontal arrow (line 1) from Advertiser to Scanner above line 2 in a certain distance. Since too much time I am trying to find out the right grammatics but ...
3
votes
1answer
168 views

vertical distance between two graphics in sidewaysfigure environment

I have two tikz graphics in a \sidewaysfigure environment and i want to separate them with a little vertical spacing. The problem is that the two graphics are directly side by side, only the caption ...
5
votes
1answer
5k views

Questions about my cv header and cover letter

I am working on my cv and my cover letter and I have different questions. My current code: \documentclass[11pt,a4paper]{moderncv} \moderncvtheme[green]{classic} ...
13
votes
2answers
397 views

Typewriter in TikZ node

A small example: \documentclass{standalone} \usepackage{tikz} \begin{document} \tikz{\node[text width=1cm]{\tt totot\\t t t};} \tikz{\node{\parbox{1cm}{\tt totot\\t t t}};} \end{document} As you ...
4
votes
1answer
230 views

How to change label of \pgfcalendarweekdayshortname?

I will build the calendar in other langauge (thai) with tikzlibrary. I can change the \pgfcalendarmonthname but the \pgfcalendarweekdayshortname, I can't. The following code has errors. ...
5
votes
1answer
333 views

How do I decorate a parametric curve with text in Tikz

Nothing I'm doing is allowing me to get a compilable, decorated path. The MWE shows two attempts \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} ...
5
votes
2answers
371 views

Color legend in Y axis

I have the following multiple y-axis plot that results in the image on the top image. However, I want to add a sort of legend in each of the Y axis, similar to what I manually drew in the bottom ...
4
votes
1answer
3k views

Varying edge thickness

A couple of months back, I had asked a question regarding an elegant way of drawing a somewhat sophisticated graph. Thanks to the community I received tremendous help. To avoid repeating the whole ...
2
votes
1answer
644 views

Align tikz node labels

I have created the following picture using tikz: \tikzset{ graphnode/.style={ draw,fill, circle, minimum size=0.7mm, inner sep=0 }, } \begin{tikzpicture}[every ...
5
votes
1answer
304 views

Line style not updated when using gnuplot within pgfplots

I have a large data file with multiple columns. This makes it impossible for me to add multiple \addplot commands manually, so I am using gnuplot from within pgfplots. The problem is that gnuplot does ...
2
votes
1answer
207 views

Arrow in sequence diagram is too short for text

I'm struggling with pgf-umlsd. As you can see in the image the arrow does not "grow" with my text length, producing a very ugly layout: My code: \documentclass[a4paper]{article} ...
7
votes
2answers
238 views

How to get a reasonable coordinate system when combining pdfpages and TikZ?

I have been trying to add content to a (proprietary) PDF with LaTeX by using pdfpages to inlude the original pages and draw on them using TikZ. This is the code I have been using: ...
2
votes
1answer
225 views

How do I make my path node follow the path from a certain position?

I am trying to make a diagram with a curved arrow and I want its node to follow the arrow from about the "near end" point. I have been googling for hours now and I can't find the way to do it. I've ...
5
votes
1answer
496 views

Reusing parts of TikZ animation in beamer

I'd like to reuse part of an animated TikZ figure in beamer. Before switching to TikZ, I built PDF animations with IPE, and could select specific pages in the \includegraphics{} command. To do the ...
5
votes
1answer
3k views

How to shift in tikz scope relatively to an object + offset?

How do you shift (0,0) to something like: (MYBOX.west)++(0.1,0)? Here is a MnWE: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning, calc} \begin{document} ...
2
votes
0answers
100 views

Programmatically converting an integer into bits with graphical output [duplicate]

I just stumbled upon this interesting question about "how to automatically draw tree diagrams of prime factorization with LaTeX" and it rang a bell. I 'd like to create a command that displays the ...
1
vote
0answers
237 views

Drawing a trawling boat with TikZ [closed]

I would like to draw a diagram of a boat with LaTeX and I have started using a package called TikZ which looks very promising but I'm not sure how to use it to draw diagrams other than rectangles and ...
2
votes
1answer
109 views

specifying location of individual nodes in cycle process with tkz

Consider this example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} \fill [orange] (0.1,0.1) rectangle (12,8); ...
7
votes
3answers
257 views

In tikz is there a way to set a node style to center the center of each node within a given scope

In the following MWE, I know that the commented line works. What I want to know is why the every node/.style approach is not working. \documentclass{article} \usepackage{tikz} \begin{document} ...
7
votes
3answers
285 views

Position both math environment and tikz picture in the tabular

\usepackage{tikz} \begin{document} \begin{tabular}[b]{@{}ccc@{}} \begin{tikzpicture}[grow=right,sloped] \tikzstyle{level 1}=[level distance=2cm, sibling distance=2cm] \tikzstyle{level 2}=[level ...
7
votes
1answer
459 views

A Basic TikZ Drawing

I've not yet had enough experience drawing in TikZ to be able to do it quickly. I also find the manual a bit daunting -- though if I had time, I'm sure it does a fabulous job explaining everything I ...
3
votes
1answer
387 views

tikz-3dplot: Drawing an arc with the let syntax in 3d

How can I use the let syntax to draw an arc when using tikz-3dplot? At the present, the arc is drawn but doesn't look right. \documentclass[tikz, convert = false]{standalone} ...
3
votes
1answer
165 views

rotated text not appearing where expected when using tikz and xelatex

I thought I'd change the font to something none standard from the list of font available on my computer. When I tried to compile the following document, the text that should appear along the spokes ...
2
votes
1answer
108 views

Correctly highlight long ToC entries using TikZ without pagenumbers

Using this answer, I have highlighting for chapters in my Table of Contents. For long chapter names, however, the box is wonky, because P1.north west and P1.north east do not span the entire line: ...
6
votes
1answer
504 views

generate circular path with tikz and include empty node

In the following example: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture}[every node/.style={inner sep=1pt}] \node (1) ...
3
votes
1answer
281 views

tikz sloped lines

I would like to draw lines at a specific angle with tikzpicture. But it doesn't work the way I think it should. Example: \documentclass[a4paper,12pt]{article} \usepackage{tikz} \begin{document} ...
0
votes
1answer
641 views

Replacing an arrow with an inclusion symbol in Tikz

Instead of an arrow from one place to another, I'd like to have the \subseteq symbol. More specifically, the \subseteq symbol rotated, which I believe can be rendered \rotatebox{90}{$\subseteq$} . ...
8
votes
1answer
1k views

How do I get \pgfmathparse to create value rounded to one decimal place?

I'm trying to place a grid over an image to help me place other object where I want on the image. But, I'm having difficulty getting tikz to show coordinates as I wish. Here's my MWE: ...
6
votes
1answer
276 views

How to change style of a node based on its name?

I've create pie charts using pgf-pie and I have exactly the same problem as in this pgf-pie issue. I changed pgf-pie code to draw small percentages outside of the main circle. But I have one problem ...
1
vote
1answer
94 views

unexpected tikz style behaviour

I was doing a figure based on drawing some rectangles which the area represents the relative amount of such element and I encounter two unexpected situations: (1) I decided to go with rectangles to ...
2
votes
0answers
55 views

TikZ external Library and pgfplots reading data from external txt file [duplicate]

I'm using the external library of TikZ for speeding up the compilation of my LaTeX document. In another thread, Christian Feuersänger reported that from December 2012, the external library uses MD5 ...
3
votes
2answers
621 views

Using a coordinate with a pin, on an edge with TiKz

I am trying to get a pin edge to touch another edge, under the influence of shorten: \begin{tikzpicture}[s/.style={->,shorten >=1ex,shorten <=1ex}] \node (a) at (180:1) {$a$}; \node ...
9
votes
3answers
489 views

Animating a TikZ picture

I would like to animate the following picture so that the length of the blue box becomes smaller and smaller. Using the overprint environment along with \transduration{0.2} makes the job. However, ...
12
votes
2answers
1k views

Proper way to draw a tikz flowchart with arrows pointing back and forth between two nodes

I apologize if this is a duplicate, but I'm having a hard time finding an elegant solution. I have something that "works," but feels wonky. I'm making a presentation in beamer and I want to have ...
3
votes
1answer
107 views

Font Size while using tikz

I am trying to write code for a diagram I have in tikz. I am very new to tikz so this may be an easy question but here goes. I have some code like the following: \begin{tikzpicture}[scale=.95] ...
4
votes
1answer
191 views

Using counter for \onslide in tikzpicture

I am trying to use a counter in the tikzpicture environment. The counter needs to keep track of the slide from when the picture needs to be shown; that way, it is easy to add or delete a line. ...
7
votes
1answer
1k views

Alignment of subplots in pgfplots

I would like to align a larger figure with two smaller subplots that should be of the same size and reach to the below south east and below south west anchors of the main figure. The example below ...
52
votes
8answers
3k views

How to automatically draw tree diagram of prime factorization with LaTeX?

I want to have a simple interface to automatically draw tree diagrams of prime factorization. For example, by invoking the following code, \PrimeTree{36} \PrimeTree{90} \PrimeTree{112} ...
10
votes
3answers
2k views

Function graphs

Can you help me with my page of function graphs? I could make the first four graphs but there is a problem with plotting by others. All graphs should have the same size like the first four ones. Thank ...
3
votes
1answer
621 views

Plot with Min/Max bar and two average points

I am trying to stop using Excel charts in my academic papers and rather use something more LaTeX integrated such as Tikz. My current Excel chart looks like that: As can be seen, any combination from ...
3
votes
0answers
149 views

Changing the font size of nodes inside a savebox causes TeX to exceed stack size [duplicate]

I'd like to have a tikzpicture (actually several) appear inside a node of another tikzpicture. I already know that I can use savebox for that, the problem is: When I change the fontsize of a node ...
1
vote
1answer
475 views

tikz - placing two nodes side by side

my preamble: \documentclass{beamer} \usepackage[english]{babel} \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage{tikz} \usetikzlibrary{positioning} Using ...
4
votes
1answer
233 views

number format in \pgfmathsetmacro for auto-foldernaming in tikz \foreach environment

What I want to do is creating automatically the filenames of the datafiles inside a foreachloop in tikz. Maybe it's better to show a minimal example first: \documentclass{standalone} ...
6
votes
1answer
404 views

Setting the color of a draw command inside foreach

I am trying to draw colored lines with a foreach loop. The command I use to draw the line creates a colored line if I use it standalone. Once I put it inside the foreach loop, I only get a black line. ...
7
votes
1answer
534 views

Common label for a groupplot [duplicate]

This can be considered a combination of the following questions How can a title be placed for a group of pgfplots? Align ylabels of grouped plots at a common line The following piece of code ...
1
vote
1answer
467 views

A question on tikz/pgf externalization, standalone, and includeonly for compiling large document

I have a goal to build an efficient compiling environment to build large documents. The requirements are these: Use tikz/pgf to draw many figures; Use \includeonly to build only a portion of the ...
10
votes
1answer
752 views

Recreate plot when data file changes

Is it possible to use the TikZ/external library and have pgfplots recreate a figure when a data file that is plotted changes? Say I have something like the following: file.tex: ...
5
votes
2answers
451 views

How can I label TikZ-graphs on four vertices with a loop?

I need to draw all these simple labelled graphs on four vertices. Anyway, can I do this in a quick manner with a loop? And put them in an array? I have already drawn all unlabelled simple graphs on ...
2
votes
0answers
177 views

Legend in graph with tikz [closed]

I need to make a legend for my graph in TikZ, but I need that legend would be from 3 columns, how can I do this? I use this code: \newenvironment{customlegend}[1][]{% \begingroup \csname ...
6
votes
1answer
219 views

How to plot sectors in 3D with LaTeX?

I wish to have two sectors (one in blue color, the other in black pencil) in 3D, and they share the same vertex on the plane. The black pencil one lies on the plane, whereas the blue one is theta ...