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
2answers
16 views

How can I use XString to count characters in a string with the “wrong” catcode?

I created a TikZ coordinate system to solve a positioning problem I had. The code is presented below. However, the code doesn't work; if you run it, you will get the "Too many .'s" error message even ...
4
votes
4answers
41 views

Can anyone help me mark a right-angle in Tikz?

I've been stuck here playing with numbers using \draw for ages now. There must be a better way. I want to add this right-angle symbol: and I don't know how I could do it neatly. Can someone help me ...
1
vote
1answer
18 views

Modifying some features in a scatter plot

I would like to have the following modifications to the scatter plot. The title should be typeset on two lines. I would like a break on each axis indicating a skip from 0. (When I was in junior ...
3
votes
2answers
82 views

How to make the distances look equal?

I am trying to show that any point of a parabola has the same distance from the focal point and the directrix line. But in my plot they don't seem to be equal. \documentclass{article} ...
3
votes
2answers
37 views

Tikz: text overlapped by objects

I need to draw some groups of overlapping rectangles, for example: They are labeled by numbers, rectangle 1 is overlapping rectangle 2 etc. Is there a way to change automatically the position of ...
5
votes
2answers
45 views

How to use \resizebox but not resize text (tikzpicture)

I export a picture from GeoGebra and I scale it, for example \begin{figure}[H] \centering \resizebox{0.5\textwidth}{!}{% \begin{tikzpicture}[line cap=round,line join=round,>=triangle ...
3
votes
2answers
30 views

How can I access the value of `\pgfdecoratedpathlength` for use later in the document?

Is there anyway that during the decoration process I can save the value of \pgfdecoratedpathlength to some macro (via xdef or some other mechanism)?
0
votes
1answer
26 views

Labeling a picture, refering back to it in the document

I have a code for a picture, but I want to label it and referred back to it in the document. Below is the code for my simple picture \begin{center} \begin{tikzpicture}[line cap=round,line ...
2
votes
1answer
66 views

Problem plotting in TikZ

I have to draw a random curve in TikZ, connecting the origin to infinity. I thought the easiest way to do that would be to plot sin(x)-x from the origin to the left. This way it connects 0 to infinity ...
2
votes
0answers
37 views

Getting TikZ to work on Elementary OS (Ubuntu)

I'm running Elementary OS (which is a fork of Ubuntu 12.04), and am having troubles getting a LaTeX installation to work. Code that worked on my old installation on Windows, doesn't appear to work ...
6
votes
1answer
48 views

Better way to achieve TikZ label offset

In the following diagram, which is generated by the following TikZ code, \documentclass{article} \usepackage{tikz} \begin{document} \begin{figure}[h] \centering \begin{tikzpicture}[scale=2, % ...
2
votes
1answer
23 views

pgfplot | tikzpicture | changing length + width of ticks

While there are any number of posts on how to fiddle (from the Latin) with tick labels, or tick placements, or tick color, I haven't been able to find anything (in terms of worked examples, or in the ...
2
votes
1answer
41 views

Placing tikz picture to the right of item in itemize environment using Beamer

I am trying to place a tikz picture to the right of an \item in a beamer frame and so far the closest I have managed to come up with is this: \documentclass{beamer} \usepackage{tikz} ...
2
votes
1answer
38 views

Mixing a table with graphs

I have the following code: \documentclass[tikz,border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{matrix, positioning} \begin{document} \begin{tikzpicture} \matrix (A) [column sep=0pt, row ...
2
votes
1answer
39 views

PGFplots within Environ format mistake

I try to write an environment for a simple barplot with pgfplots to reduce the needed markup. For that I use the environ package. For some reason tikz complains about a format mistake at the ...
0
votes
1answer
36 views

Tikzpicture also scaling “dashed”, “dotted”, etc., patterns [duplicate]

I was wondering why predefined patterns like dashed, dotted, thick, etc., do not scaled when scaling the complete tikzpicture environment. Minimal Example: \documentclass{beamer} ...
1
vote
0answers
21 views

Resources (or instructions) on how to make a variable size donut/pie chart with tikz

I am making a custom resume template and want to incorporate a sort-of pie chart to illustrate relative skill-set experience. When searching google I came across this plot which is fairly similar to ...
4
votes
1answer
86 views

Help improving a diagram with Tikz?

I'm trying to get the hang of Tikz - I've seen some amazing stuff done with it out there. I'm currently writing a Pure Maths book for A-Level and I need to include loads of diagrams, one of which is: ...
3
votes
1answer
39 views

Additional parallel paths and “shorten”

A while ago, I have stumbled upon a very nice solution for parallel paths drawn with TikZ, which can be found here: Draw additional parallel paths in TikZ. However, when trying to use this for my ...
1
vote
1answer
43 views

Can I have tikz nodes formed as arrows?

I know that I can make nodes that are squares or circles: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node (foo) [draw] {foo}; \node [draw, ...
10
votes
2answers
342 views

Tikz picture of limaçon

How would I create a TikZ picture of the limaçon $r=0.5+\cos(\theta)$? Would I have to convert it to cartesian coordinates or is there a way to plot the polar form?
3
votes
2answers
123 views

A display in a pie chart that is not expected (or wanted)

I have code for a pie chart that is not giving the display that I expected. There are two aspects of this display that I want changed. First, I want to have 5% on the line below Clothing. I have ...
3
votes
1answer
62 views

Tikz Picture in chapter title and spacing to to chapter body

The following minimal working example \documentclass[a4paper,11pt]{book} \usepackage{lipsum} \usepackage{color} \usepackage{tikz} ...
2
votes
1answer
40 views

How can I use TiKZ to design comments in the margin of an environment which allows a pagebreak?

To distinguish different classes of environments, I use the environment shaded from the package framed. Then, I would like to design a corresponding environment using TiKZ where a line with a ...
0
votes
0answers
42 views

Is it possible to generate tikz codes online?

I am new to using the tikz package and I want to draw the use Geogebra to draw pictures and generate tikz codes. Is it possible online, i.e., without downloading Geogebra? Can anyone tell me the ...
2
votes
1answer
44 views

Why scaling of arrow head works only for default > and not for latex, stealth, or other types?

I am following the answer here where it shows how to adjust the arrow head. It works, but only for default > arrow head. When I change it to latex, stealth or any of the other type of arrow heads, ...
1
vote
0answers
58 views

How to draw using Tikz

I am a latex beginner and I have seen lots of examples here that are beautiful works in TikZ. My problem is that TikZ requires some very precise values (like coordinates and sizes) and my only way to ...
3
votes
1answer
35 views

why is adding \catcode`\:=11 \catcode`\@=11 makes tex4ht fail to compile tikz picture?

I found interesting problem. In my tex4ht configuration file, I have the line that says \catcode`\:=11 \catcode`\@=11 It have been there forever. I think it was to solve a problem from this ...
2
votes
1answer
48 views

Putting a title on a pie chart

How do I put a title on the following pie chart? I tried using \stackon. \documentclass[10pt]{amsart} \usepackage{mathtools,systeme,array} \usepackage{tikz} \usepackage{adjustbox} ...
2
votes
1answer
26 views

Cropping a TikZ display

I have a display of two intersecting lines and a ray starting at the intersection of the two lines. I use path commands \path[name path = left.side] (-3.75,-3.75) -- (-3.75,3.75); and \path[name ...
4
votes
2answers
48 views

what is the correct syntax for using let in tikz picture?

I am looking at this answer But still can't get the syntax right. I have this example to draw a line of length 2 units, which works fine: \documentclass[12pt]{article} \usepackage{tikz} ...
7
votes
3answers
116 views

Shading areas in TikZ

It's an easy TikZ question for people who use it. I tried reading the TikZ manual p. 112 several times but it seems too complicated on the filling part, all the infinity and whatnot... So I currently ...
4
votes
1answer
119 views

How to draw the band of a sphere using tikzpicture?

I would like to draw a scattering experiment. For this purpose I need to draw the band of a sphere. It seems rather complicated and my basic tikz skills are sadly not enough. If somebody has an input ...
2
votes
1answer
91 views

Creating TiKz Libraries

How does one go about creating a TiKz library (is it even possible)? Is this a formidable task for a beginner? As a chemical engineer, I would very much like to have a library to create process flow ...
3
votes
0answers
90 views
+50

Generate Tikz tree from filecontents

Is there an easy way to create tree nodes from data in a file? I need the tree to have nodes in the format 1,2,3,4 rather than 1,2,4,8 etc. I can't create the nodes in a loop as there would be two ...
1
vote
0answers
34 views

pgf-plot: y-axis shows comma instead of decimal point

The ticks of the y-axis have to be displayed with a decimal point instead of a comma. I have no idea how to do that. I'm using \usepackage[english]{babel} and even the commad \decimalpoint does not ...
1
vote
1answer
42 views

putting(-) sign in the axes and working out a graph in pgfplots

I need pgfplots to show (-) sign in the y axis, somehow it does not read it. \documentclass{article} \usepackage[margin=0.5in]{geometry} \usepackage[utf8]{inputenc} \usepackage{textcomp} ...
1
vote
1answer
59 views

PGF colorbar cuts off max value

I need to generate a whole load of colorbars with custom min and max values. From reading this SE I have managed to get this working: \documentclass{standalone} \usepackage{pgfplots} ...
0
votes
0answers
59 views

Connectivity Maps: A way to implement this efficiently with LaTeX?

I am interested in creating connectivity maps. While there are a wide variety of ways to handle this, I am particularly interested in a LaTeX-based method for handling this. Below is an example of a ...
2
votes
1answer
89 views

TikZ \filldraw command acting strange

I am attempting to plot a region in TikZ using data exported from a Mathematica RegionPlot. But the TikZ \filldraw command is giving me a strange-looking output. The problem with the generated TikZ ...
1
vote
1answer
35 views

Problems when including diagonal line in a table cell

I am trying to use this solution which uses tikz, however I cannot get it to compile properly. I get the error: Misplaced \omit. ...llcolor[HTML]{EFEFEF}\diag{0.2em}{1cm}{a}{b} Searching for that ...
4
votes
1answer
85 views

Tikz: adjusting pin anchor

Old title: Pgf .style args: optional named arguments with defaults I was looking for a possibility to adjust the anchor of the text of a pin. Tikz does not allow this out of the box. This question ...
0
votes
2answers
89 views

Tikz internal storage symbol

I am trying to create a flow chart with tikz using the interal storage symbol (http://www.smartdraw.com/flowchart/flowchart-symbols.htm). My first tries ended up in: \documentclass{standalone} ...
0
votes
1answer
51 views

Rotate the shape to the right

I have drawn the following 3D shape in tikz. \documentclass[10pt]{article} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{pgf,tikz} \usepackage{tkz-tab} ...
1
vote
2answers
106 views

Custom TikZ teardrop/infinity shape?

I am looking to replicate the figure shown in the image below. What is the simplest way to create the infinity-like curves and gray filled region of (c) using TikZ? Any tips would be appreciated! ...
2
votes
2answers
41 views

Labeling angles in a triangle

I've tried looking at past answers to this question but it won't seem to solve my problem. I want to label the angles ABD and DBC in this triangle: \documentclass{article} ...
14
votes
4answers
663 views

Tikz draw an accurate angle in a circle

Here is an illustration in which the angles are not accurately drawn. I want to know whether there is an easier way to draw an accurate angle within a circle, say $\angle ABD = 15^\circ$. Here is ...
4
votes
0answers
66 views

How to draw interlocking tori with Tikz?

I need to draw a couple of interlocking tori, as in the picture, using Tikz. I've been looking at some examples online and all I find is instructions to do it with Gnuplot, nothing about Tikz. If ...
3
votes
1answer
60 views

Putting braces indicating lengths in the foreground in a TikZ environment

The following code instructs TikZ to draw three lines on the Cartesian plane. I have a brace under line j between the y-axis and the vertical line \ell_{1}. It and its label interfere with the ...
4
votes
1answer
79 views

Positioning a node via using TikZ to calculate arctan(2)

In the following code, two lines are drawn through the origin. One has slope 1 and the other has slope 2. I want to label these lines j and k and put these labels at the arrowhead in the first ...