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)

4
votes
1answer
35 views

Missing \endcsname in tikz draw

I tried to do some calculations in TeX to help me draw a picture and I can't get over this error: ! Missing \endcsname inserted. <to be read again> \numexpr l.12 \draw ...
3
votes
1answer
74 views

Creating a graphical representation of a table of contents in TikZ

I struggle creating a graphical representation of a books contents with TikZ. An example I've created in Powerpoint is attached. I am especially interested in relative positioning and no declaration ...
12
votes
3answers
143 views

Tikz-diagram: Additional right angle and space

I'm trying to recreate this diagram: Mine already looks pretty good but the connection between the Environment and Sensornode lacks the 2nd right angle and space for the measured by text. How ...
1
vote
0answers
20 views

TIKZ with the siamltex1213 class

pdflatex does not work with siamltex1213 class as mentioned in this question. Also TIKZ does not work with this class as mentioned in this comment. Are there any workarounds for using TIKZ with the ...
3
votes
2answers
49 views

How to insert degree Celsius symbol in node text in pgfplots/tikz?

Here is my code. \resizebox{\textwidth}{!}{ \begin{tikzpicture} \selectcolormodel{gray} \begin{axis}[xlabel=Voltage,ylabel=Current,title=IV Characteristics of PV Module] \node[label={Set 1}] at (axis ...
2
votes
2answers
70 views

Categorical product in tikz?

There are many examples of the coproduct in tikz with straight edges, however I can not find any (that work) or without a special package (other than tikz) for the product. I would just like to be ...
3
votes
1answer
67 views

Fit large tikz image on page without white space

I am working on an agenda in knitr (using XeLaTeX). I use tikz for rounded edges around a tabular environment in the monthly overview. This is the first of several pages of the overview: As you ...
3
votes
1answer
48 views

Foreach loop to use path intersections directly

Here is the MWE, I want to intersect two paths and loop through all intersection points with a loop, not knowing before hand how many intersection points are there, and definitely hoping I do not have ...
2
votes
2answers
83 views

Draw a convex hull with tikz

I want to draw a convex hull with tikz. \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture} \def\us{(0,2),(1,4),(2,0),(3,2),(4,1),(6,2),(6,4)} \foreach ...
7
votes
0answers
38 views

TikZ: Mixing color with white and setting opacity with a white background yields different results

I noticed that 25% opacity with a white background yields a different result for me than mixing 75% white into the color. Why is that, and what would be the correct way to not have opacity but the ...
2
votes
1answer
86 views

Why more margin on the left?

I have this figure: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{fit,arrows,calc,positioning} \begin{document} \tikzstyle{b} = [rectangle, draw, fill=white, node ...
6
votes
2answers
143 views

Generate the n-th letter of the alphabet in a tikz loop [duplicate]

The following code draws 10 nodes, labelled from 0 to 9. \documentclass[a4paper,10pt,landscape]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \i in {0,...,9}{ ...
4
votes
1answer
33 views

Tikz: Align left/width of different fit boxes so multiple fitboxes align nicely vertically

The Tikz fit functionality is very nice, but what (1) if I want to align multiple fit boxes to the same left/width location so that all fit boxes matches, so different fit boxes are nicely aligned ...
2
votes
2answers
39 views

Tikzpicture: How to caption with multiple axis

Is there a way to caption multiple axes with tikzpicture? I don't want to use subfigures since each axis (and its corresponding figure) is connected via an arrow to another axis. I have something ...
2
votes
1answer
25 views

Tikz: How to fit also the text of a node inside a box?

Assume I want to cluster certain nodes in a box, however I also want the node text to get boxed. The following MWE place the node in the box, however the below (or left/top/right) placed text, not. ...
0
votes
0answers
20 views

How to update tikz-cd (TexLive)?

My tikz-cd is out-of-date. I have found this version which seems the latest: http://pgf.sourceforge.net/ Then I unzip the package, put the "pgf" from the package to my ~/texmf directory. But I ...
1
vote
1answer
48 views

Vertical colorbar (in tikz) + subfigures (png)

I have an issue with the placement of a colorbar. The colorbar is defined separately in a tikz-environment, as suggested in this topic. My goal is to place one colorbar together with 4 png pictures ...
11
votes
2answers
106 views

tikz-3dplot: Rotate arc around specific axis

\documentclass[tikz]{standalone} \usepackage{tikz-3dplot} \begin{document} \begin{tikzpicture}[scale=2] % draw arcs \draw[canvas is zx plane at y = 1, line width = 1pt] ...
3
votes
3answers
197 views

How to create this graphic with TikZ?

I want to create a graphice like the following: Below is my code: \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{arrows} \newcommand{\psign}{+} ...
3
votes
1answer
41 views

How to change label distance in a TikZ diagram

I'm a complete beginner when it comes to TikZ, so please excuse some stupidity on my side. I'd like to TikZ a tower of fields, however the distance of the inner labels and the edges is too big. I'd ...
5
votes
0answers
73 views

Watercolor in tikz

Is it possible to fill a shape with a coloring that looks like watercolor like in this image using tikz or pgfplots? Src: http://bartoszmilewski.com/2015/07/29/representable-functors/
4
votes
2answers
71 views

Placement of labels in tikzpicture

I have constructed a polygon using tikz and would like to know how to label the points in the manner shown in the diagram below I have constructed my polygon as follows: \documentclass{article} ...
1
vote
1answer
44 views

Gnuplot-Tikz-TeXstudio setting problem

I am a beginner in making graphs of functions by TeX itself - until now i have solved these issues by including .eps pictures. Now i am on doing things better and nicer. I started to use Tikz packages ...
2
votes
0answers
35 views

Table of Contents style fit to part style

I am using titlesec and TikZ to customize my \part style. I would appreciate to use the \part style for the \tableofcontents title. Is there any way to do it ?
2
votes
1answer
84 views

Simple Probability Tree

How do I make the following probability trees in LaTeX? Thanks for the help!! Probability Tree 1: Probability Tree 2: \forestset{my label/.style={if n=1{edge label={node [midway, above left, ...
1
vote
1answer
36 views

Tikz : node in margin right to other node interacts with tcbtheorem

I am currently trying to use Gonzalo Medina's answer to create a framed environment for a margin note Consider the following simplified code : \documentclass[oneside]{book} ...
4
votes
1answer
42 views

How to increase space between the bottom border of a boxed figure and its caption?

I am trying to generate a space (6pt) between the boxed figure and its caption. Since I am using tikz code \includegraphics did not work. Also I tried \setlength{\abovecaptionskip}{6pt}, ...
7
votes
2answers
189 views

How to draw this image using tikz?

Beyond the solution to this particular diagram, can you explain if there is a general set of steps that you would follow to obtain this code? My guesses: Would conversion to vector graphics give ...
1
vote
1answer
41 views

why does tikz connect my nodes?

I use \usepackage{pdflscape} \usepackage{tikz} \usetikzlibrary{automata} and my code looks like this \begin{figure} \centering \begin{tikzpicture} \node[draw,align=center,text ...
1
vote
1answer
42 views

How to correct tikz '\draw' location by hand?

I want to make a brace to the right of two nodes but I don't want it to be attached to but I want some extra space. For the starting location my solution seems to work well but for some reason the ...
3
votes
2answers
72 views

Typesetting a node in bold font

How do I typeset ${\mathrm{HR}}(\ray{r}, \, P)$ in a node in bold font? I apologize for the cumbersome code. The command for the pertinent node is in the last line. \documentclass{amsart} ...
7
votes
1answer
73 views

Tikz spy - empty zoom with pdflatex

I have issues getting the spy library to work on my current installation. I am running TeXmaker with MikTeX 2.9 (with all packages updated) on Win8.1x64. I read about the issues others are having ...
1
vote
2answers
95 views

Draw a circular node with a sine cirve in it to resemble the symbol a short sine wave

How can I do this in TikZ: I want to draw a circular node with a sine curve in it to resemble the symbol of a short sine wave like in the diagram shown in the link below. I can draw a circle but I ...
3
votes
0answers
37 views

getting confused with pgf

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east, legend style={draw=none} ] \addplot[forget plot,cyan,domain=0.001:8] {abs(log10(x))}; ...
4
votes
1answer
121 views

How do I make solid headers?

I am trying to replicate the formatting of a certain standardized test. It looks a little bit like this: I'm going to try memoir and tikz a little bit today, but I was wondering if there is an easy ...
1
vote
1answer
69 views

Linear regression on modified datas

I would like to create a linear regression on modified data. My raw data is on a file called data.dat like that : x,y 1,2 2,3 3,4 4,5 5,8 6,9 7,34 If I do something like the code below, I get the ...
1
vote
1answer
35 views

clear me the doubt in positioning legend option

\begin{tikzpicture} \begin{axis}[ axis lines=middle, samples=100, ymax=5,legend pos=north east ] \addplot[cyan,domain=0.001:8] {abs(log10(x))}; \addplot[red!70!black,domain=-2:4] ...
1
vote
1answer
55 views

Normal distribution with discrete histogram inscribed

How can I produce the following image with tikz? I have seen the codes for plotting the normal curve, but how to get the rectangular shapes inscribed right at their centers? The red is not so ...
5
votes
1answer
61 views

PGFPlots polaraxis axis labels are swapped (or in the wrong place)

I have some problems with axis labels when using the polar axis, if I set the X and Y label they appear in the wrong place. When using the polar axis; x coordinate is the angle (azimuth, phi) y ...
3
votes
2answers
34 views

Code Error From Geogebra for Tikz

I try many changes in this code, but I don't see the error. Can someone help me? \documentclass[10pt]{article} \usepackage{pgf,tikz} \usetikzlibrary{arrows} \pagestyle{empty} \begin{document} ...
1
vote
2answers
44 views

An error using “Positioning” package to place the titles of a hexagon and a pentagon

In the following tikzpicture environment, I have a hexagon and a pentagon aligned along their horizontal axes of symmetry. (In the hexagon, the vertex A is furthest to the right, the vertex B is the ...
1
vote
1answer
79 views

Typesetting a title on a tikzpicture (Version 2)

I have two very similar-looking polygons in different TikZ environments. Each polygon is symmetric across a horizontal line. I want to put them in one TikZ environment with the axes of symmetry ...
3
votes
2answers
337 views

Help me in drawing log(x) curve

\documentclass[addpoints]{exam} \usepackage{tikz} \usepgflibrary{arrows} \begin{document} \begin{questions}\usepgflibrary{arrows} \question Draw the graph of $f(x)=|\log x|$. Solution: ...
1
vote
1answer
32 views

I get problems when I use the same tikzmark label in every slide

Inorder for my tikzmark to be displayed properly, I need not to use different names for each tikzmark. It troublesome to keep track of the names, is there a work around this problem. In the below ...
1
vote
1answer
45 views

Error when compiling using tikzmath

I am trying to learn how to use Tikz and its library Tikzmath to make graphics. I am trying to practice by drawing a series of circles along a line. My code is as follows: ...
2
votes
2answers
56 views

tkz-kiviat : increase label length and get the right legend

I want to draw a spider/kiviat diagram. I am using the tkz-kiviat library but I have some problems. Here is my MWE \documentclass[xcolor={dvipsnames}]{beamer} \usetheme{Warsaw} ...
0
votes
0answers
26 views

Drawing solids made up of identical unit cubes [duplicate]

I need to draw some solid figures that are made up of unit cubes so that some pair can be fitted together to make cuboid or cubes.
4
votes
2answers
47 views

Translating a node style from tikz to tikz-cd

I'd like to switch from tikz to tikz-cd to draw diagrams of arrows (I just started practicing, so I don't know much), and I can't figure out how to translate the following node style: ...
9
votes
1answer
125 views

Parameters in a caption

I have a simple figure with a code like this: \begin {figure}[htbp] \centering % \begin{tikzpicture} [scale=1] \def \r {1/4} % y-scaling % % PARAMET. \def \a {1} %x^6 \def \b {-6} ...
5
votes
1answer
155 views

How to draw a series of simple circle packing illustrations, possibly with Tikz?

For an industrial problem, I would like to be able to draw a series of layouts of the cross section of multistrand electrical wires. These can be simplified by packing in a circular envelope a given ...