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

Spiral on a truncated cone

I need to plot a spiral around an inverted truncated cone, starting and ending at the centre of both bases. Something like this: I've searched and found a similar solution, but for cylinders only: ...
0
votes
0answers
27 views

Why don't I have the latitude and longitude lines? [duplicate]

This is from: http://www.texample.net/tikz/examples/map-projections/ \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usepackage[active,tightpage]{preview} ...
1
vote
0answers
25 views

Labels in TikZ are all in the lower left corner of the tikzpicture [on hold]

I have a problem concerning labels in TikZ. My labels are all positioned in the lower left corner of the tikzpicture. \documentclass{birkjour} %\documentclass[12pt]{article} \usepackage{amssymb} ...
1
vote
0answers
14 views

Package pgfkeys Error: I do not know the key '/tikz/discard if not' [on hold]

I have the following error: ! Package pgfkeys Error: I do not know the key '/tikz/discard if not', to which you passed '{T}{400}', and I am going to ignore it. Perhaps you misspelled it. the code ...
3
votes
1answer
41 views

Area bounded by a curve and the y axis

Could anyone demonstrate how to shade the area S (the area bounded by the curve and the y axis and the lines x=c and x=d). The following is my code to generate the plot. \pgfplotsset{every ...
3
votes
2answers
37 views

TikZ: How do I change the path color without changing nodes alongside?

It is difficult to google for this problem, as I use the to command in tikz in order to bend edges left or right. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc,positioning} ...
3
votes
1answer
49 views

Remove whitespace around tikz picture in running text

I'm trying to draw a star in text brackets using tikz and I can't figure out how to remove the large white space to the left and right. The code is: \documentclass{article} \usepackage{tikz} ...
3
votes
1answer
59 views

Nodes and arrows from tikz not showing when using input, the rest from pgfplots is ok

In general I create all my tikzpictures in separate tex files which I then input using the \input command to a main tex file. I started using a template from my university for the main file and now I ...
2
votes
0answers
58 views

Drawing functions on spheres

In a paper, I have a class of functions S1→S2 depending on a real parameter t>0, and I would like to represent some of them on the sphere as curves to illustrate their behavior as t goes to 0, ...
2
votes
1answer
43 views

TiKZ Node positioning left of A but below B [duplicate]

Assume I have the following snippet/screenshot. How can I get Desc2 on the same line as Desc1. So Desc2 should be vertically placed below T2 but horizontally at the same level as Desc1 so that the ...
3
votes
1answer
58 views

Tikz inside a proof and enumerate environment

I am having a problem getting a tikz graph to correctly sit below the a) part of the problem in the solution: My code is as follows: \documentclass[12pt,leqno]{article} \usepackage{amsmath, amsfonts, ...
10
votes
1answer
138 views

Tikz: Cutting parts of the top and bottom line of a node of type rectangle

I am trying to cut the bottom and top line of a standard rectangle. What I have now, is a rectangle that looks like: Which was the result of: \node [rectangle,draw=black,rounded ...
10
votes
1answer
184 views

Relative transparency in TikZ?

I have always wondered whether it was possible to define some sort of "relative" transparency in TikZ. What do I mean? Sometimes, you want a node to be filled in order for its content to be readable ...
1
vote
1answer
34 views

Captioning my tikzpicture using figure environment causes issues

If I remove the figure environment this code works perfectly fine. Unfortunately, I am not able to put a caption on this figure. \begin{center} \begin{figure} \begin{tikzpicture} ...
3
votes
1answer
37 views

Scatterplot from table with markers set by meta column value

My input data is a txt file with a number of columns and rows. The last column value is always an integer taking a value of 0, 1, 2, or 3. I need a scatterplot which has a different marker depending ...
2
votes
0answers
57 views

TeXstudio and TikZ

Can someone please run me through the steps to install the TikZ package on TeXstudio? I have been struggling for hours but just can’t seem to get it installed so that I can use it. Thank you in ...
3
votes
2answers
118 views

Flowchart + Tikz

Would like to include PRISMA flowchart in my study and I might need help on setting up my tikzpicture commands. Any help is much appreciated. Thanks
5
votes
2answers
92 views

Rotate and clip shading in TikZ

I'm trying to produce a copy of the right hand side of this picture using TikZ shadings. I thought it would be a simple task but it has proven itself difficult (at least for me). First I couldn't ...
6
votes
2answers
87 views

How to define a tikzstyle using append after command?

I am trying to define a style to help my pupils understand the resolution of equations. Nevertheless, I have two problems : 1 : I cannot make arrows of grey color between the steps of the resolution. ...
3
votes
2answers
101 views

TikZ - Is it possible to draw a line over the whole page [duplicate]

I want to create/draw a front page of a document and therefore I want to draw a line from one corner of the Page to another. Ok in the final version I want to implement some control points. But up ...
3
votes
0answers
40 views

Pgfplots: Transpose headrow as first column in: confusion matrix with colormaps / heatmaps

My question builds on code from this question: original question/answer What I am trying to achieve: I want to use pgfplots to build a table, where the header row is automatically added as first ...
4
votes
1answer
76 views

A drawing for a trigonometric Identity (using the let-in syntax.)

I have the display for showing the identities for the sine and cosine of a difference of two numbers. It is drawn exactly as I want. I want to know why the following two commands do not draw the ...
2
votes
0answers
23 views

TiKz externalization ignoring scale

I want to use a TikZ picture (an Eiffel tower but it does not matter) a lots of times in the same document, but with different sizes and different colors. The first option could have been to define a ...
3
votes
1answer
60 views

Tree diagram with boxes and arrows

Good day everyone here at TeX.SX. I have been troubled with the following task; I need to create some sort of tree diagram that resembles the accompanied image. I am providing a MWE. ...
1
vote
0answers
32 views

Scaling tikz graph when pgfplots is loaded

This question is related to: tikz: Scaling the unscalable — issues with a TikZ graph I'm using the suggested modification from the linked answer to scale tikz graphs. However, I'm also including ...
3
votes
1answer
36 views

Processing list of values in key argument for tikz plot

I want to pass a list of two values as a key argument and be able to access and use them arbitrarily in a command defined by myself. For example I want a command for plotting an arc of a circle with ...
3
votes
1answer
82 views

Tikz, Grid numbering, repeating structures

I am doing this: \documentclass{article} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz,amsmath} \usetikzlibrary{arrows}% \usepackage[np,autolanguage]{numprint} \begin{document} ...
1
vote
2answers
128 views

TikZ: how to draw a diamond child

I neew to draw an "easy" flowchart. I would do that, using che child statement. I've used (as example) an example found here. I've m odified it, that is the code: \documentclass{article} ...
3
votes
1answer
155 views

Customize a section title with Tikz

I am trying to get this kind of result with tikz. However I don' have any idea how to align the text with the bottom of the rectangles or how to anchor the 2nd rectangle with the line of the title ...
5
votes
2answers
106 views

How can you put multicolor backgrounds in a table entry?

I'm wondering if these is a simple way shade an entry in a table with multiple background colors. Image attached shows between 0-3 colors per table item entry.
3
votes
1answer
61 views

How can I add an underbrace in this TikZ picture matrix of maths nodes?

I have the current tikz picture and would like to add a underbrace between the 2nd and 3rd row at the location unidentified by the 2 arrows pointing down. \documentclass{article} \usepackage{tikz} ...
3
votes
2answers
57 views

Replacing a single arrow in TikZ replaces all arrows

How may we replace the right arrow with inclusion arrow while keeping the bottom arrow straight? \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix,arrows,decorations.pathmorphing} ...
3
votes
1answer
43 views

How to globally change edge properties using TikZ?

If I want to change all edge properties (to e.g. rounded edges instead of mitered edges) in a tikz picture (picture globally), I can do so as follows: \begin{tikzpicture}[line join=round] This ...
2
votes
1answer
54 views

Beamer, TikZ and step by step colored figure ending in PGF Math Error (divide by 0)

I'm new to TikZ, and I'm trying to "animate" successive reading of values on the curve representing a mathematical function. The point is to achieve step by step visual enhancement to focus the care ...
1
vote
1answer
31 views

Listings and verbatim-like environments in a tikz node using newcommand

I have seen answers to this question floating around but none of them appeared to solve the problem. I want to be able to throw a code block into an already defined tikzpicture. So I attempted to ...
1
vote
1answer
32 views

Getting errors in the “graph” code using tikz

I've copied a code snippet from http://www.texample.net/tikz/examples/tkz-berge/ in order to see if I get it to run smoothly. I can not. Below is the snippet I've used: \documentclass[]{article} ...
1
vote
2answers
68 views

How do I trisect an angle using tkz-euclide?

Using the \tkzDefLine[bisector](A,B,C) command in tkz-euclide, you can bisect an angle. How can I cut an angle in three or more equal parts?
3
votes
1answer
66 views

Add plot to node in Tikz matrix

Using the code at the end, I was able to create this image. I would like to add a plot (I'm plotting kernel densities) to each of the nodes on the edge, and move their labels below the plot, ...
5
votes
1answer
53 views

Assistance fixing this drawing of interlocking tori using sketch/tikz

I am trying to draw an interlocking tori like this one: For this I have been looking for the web for similar images and then have tried to modify the code. So far I got to this: def torus { ...
3
votes
1answer
47 views

How to get xstring methods variables work with pgfmacros and vice versa in all situations?

I am trying to draw simple graph with my command: \documentclass{article} \usepackage{tikz} \usepackage{xstring} \usepackage{float} \begin{document} \newcommand{\lT}[4]{ \draw[line cap=round, line ...
3
votes
1answer
97 views

Absolute positions of text over a tikz image

I'm trying to create a composite figure in Latex, by layering two images (pngs) on top of each other with a text label added. Sadly, this seem surprisingly difficult to achieve in LaTeX. I tried the ...
3
votes
2answers
71 views

horizontally align group of nodes with respect to coordinate

I have one node (or rather, a coordinate) and a couple of nodes which are aligned in one "row" (via right=of, left=of). They are aligned below each other (via below right=of), \documentclass{article} ...
0
votes
0answers
33 views

Generating sequence of SVG images with Tikz/Beamer

I use Tikz and Beamer a lot when creating slides and I was wondering if there was a simple way of using the same framework to generate a sequence of SVG images (or any other format that could be used ...
3
votes
1answer
84 views

How to draw open-close interval in LaTeX

I am using the following commands to have half-open interval in a real line: \begin{tikzpicture}[scale=7] \draw[->, thick] (-0.1,0) -- (1.7,0); \foreach \x/\xtext in ...
2
votes
1answer
43 views

Tkz-berge graphs, equal arrows with unequal subfigures?

In the following MWE (alas, it is not small): \documentclass{article} \usepackage{tkz-berge} \textwidth16cm \begin{document} \begin{tikzpicture} \tikzset{VertexStyle/.style = { shape = circle, ...
3
votes
1answer
52 views

Undefined control sequence error when using tikz-uml package in LaTeX

I am trying to build a simple UML diagram in LaTeX using a tikz-uml package. I am failing when using \umlinherit command. My code and an error message are below, thank you for any ideas! ...
3
votes
1answer
65 views

How to fill a line one-sided using TikZ?

Usually, when drawing a line in TikZ, 'material' is added to both sides of the line to make it visible. Consider the image below (not sketched using TikZ). If I want to draw a black and rather fat ...
0
votes
1answer
51 views

Plot sin(x)/x using TikZ

Something is going wrong here... \documentclass[10pt]{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{figure}[!h] \centering \resizebox{.5\linewidth}{!}{ ...
1
vote
1answer
45 views

How to translate a figure on a path (rollercoaster)

Is it possible to make something like this: The best thing I could do was this: With this code: \documentclass[symmetric,justified,a4paper]{tufte-book} \usepackage[utf8]{inputenc} ...
1
vote
2answers
85 views

How to multiply string?

\usepackage{tikz} \usepackage{xstring} \begin{document} \newcommand{\nG}[3]{ \node[opacity = 0, text opacity = 1, minimum size = 10mm] at (#1, #2){#3}; } \newcommand{\writeSep}[4]{ \foreach \x in ...