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)

0
votes
0answers
43 views

Pgfplots externalizing figures: (inconsistent) white borders

I'm using the external library \usepgfplotslibrary{external} \tikzexternalize[prefix=tikz_figures/] to externalize my figures from one document and include them in another. The problem is that the ...
4
votes
1answer
113 views

Is TIKZ sending ambiguous PDF instructions that only TEXstudio understands well?

TEXstudio is the only MAC software (although not originally designed for MAC) that has a PDF viewer that renders perfectly well dashed and hatched lines drawn with tikz. What does TEXstudio do that ...
3
votes
2answers
73 views

How can you use square brackets in tikz diagram?

I am trying to draw a sequence in TeX with Tikz where the vertices are $[X,Y]$, however I can't seem to get the code to work. Here is the code I am trying to use. \documentclass[12pt]{amsart} ...
12
votes
1answer
221 views

Demonic correspondence: Best practices when defining devils in TiKZ

tikzsymbols defines a series of symbols which can be used in text (or nested in larger pictures) and which can be customised in various ways e.g. scaling size, choice of colours etc. For example: ...
2
votes
1answer
73 views

How to plot a graph of arbitrary points in TikZ

I have this code: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} \begin{document} ...
6
votes
2answers
190 views

Drawing polygons

I would like to draw the following picture using TikZ: I've done this \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \foreach \x in {0,60,...,300} ...
4
votes
1answer
50 views

Tikz: clipping path from external file

I would like to use the data of an external file as the clipping path with Tikz. Something in the line of: \documentclass[10pt,tikz]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
3
votes
3answers
113 views

Annotate stoichiometric numbers below chemical reaction

I use the chemmacros packages to write chemical reactions in LaTeX, like this: \ch{CH4 + 2 O2 -> CO2 + 2 H2O} But now, I want to annotate the stoichiometric numbers below chemical reaction, as ...
4
votes
2answers
97 views

Trying to emulate CSS “object-fit” behaviour with PDF's and LaTeX/TikZ

I have a collection of PDF files (each exactly one page) each one with a possibly different size and aspect ratio. I'd like to create a document where I include each PDF into a box of the same size, ...
2
votes
0answers
164 views

Tikz issues: mood etc [closed]

I'm sorry if this has been answered before (e.g. see Tikz drawing different type of arrows) but: I am also new to the TikZ package, and I need to make this image: in tikz. Is there a quick way ...
0
votes
2answers
200 views

Drawing in LaTeX

I really like Tikz for drawing little and easy diagrams in my LaTex documents. However, I am not very skilled so I'm looking for someone to give me a help to realize this drawing (without colors: D). ...
3
votes
0answers
55 views

In TikZ, what are the coordinates “node” uses to “draw”? (the effects of the difference between “inner sep” and “outer sep”)

I'm trying to duplicate as best as possible a particular flow chart design from a textbook. The following code almost achieves what I want: \documentclass{article} ...
10
votes
1answer
143 views

Draw closed section of sphere using pgfplots

I want to draw a section of a sphere to represent its volume. I have currently got the following: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} ...
4
votes
1answer
124 views

How is TikZ meant to be pronounced? “tiks”, “tikz” or “tik-zee”?

Disclaimer: I'm not sure this question is on topic on either the main site or the meta site, but the question itself is definitely "meta". Knuth writes about the canonical pronunciation of TeX at the ...
2
votes
1answer
37 views

TikZ and tikzorbital: bacground and caption fill width correspondence

Current question related with my other question, TikZ and tikzorbital: problem with background. In prevous question, the problem with layers has been decided: All I need is just fill rectangle ...
5
votes
2answers
196 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
5
votes
1answer
129 views

Macromize a tikzfigure

I have this figure (/ 2 figures) \documentclass{article} \usepackage{pgfplots} \usepackage{subcaption} \newcommand{\xfigscale}{.5} \newcommand{\yaxscale}{.75} \begin{document} \begin{figure} ...
5
votes
3answers
112 views

In tikz, is it possible to define a node and set its position later?

I'm trying to draw a diagram and my code is getting too cluttered and difficult to read. For code style purposes, is it possible to define a node in one place and mess with its positioning later? ...
3
votes
1answer
55 views

Passing parameters to \pgfdeclaredecoration

The idea was creating decoration that draws half full half dashed vector. Based on percusse's suggestion I wrote the following MWE: \documentclass{standalone} \usepackage{tikz} \begin{document} ...
5
votes
2answers
83 views

TikZ: define center of a picture

I have a TikZ picture which I want to include as a centered figure in my LaTeX document. However, the "centering" I am trying to achieve is somewhat special and best explained by the image below: ...
4
votes
2answers
82 views

Multiple Arrows on Lines

I have been trying to draw a diagram that looks a little bit like the MWE below shows; as the title suggests, I'm wanting to place labeled arrows (only two labels: a or b) indicating a direction in ...
8
votes
1answer
149 views

Arrows in tables, or matrices

I have been experimenting with LaTeX for a couple of years now, but still consider myself a neophyte. I spent much of yesterday trying to create a table. I am trying to create a table with three ...
2
votes
5answers
87 views

Rectangle between midpoints of rotated rectangles

I need to draw a rectangle between the midpoints of two rotated rectangles (shown below). How do I do this? My current code is shown below. Current code \draw[thick] (0,0) -- (6,0); ...
3
votes
1answer
58 views

Label on vector - tikz

I have a line segment and a vector which is orthogonal to it. I would to add a label to the vector, e.g., x or y. Is it possible to do this via a parameter to the below code? \documentclass{article} ...
4
votes
0answers
70 views

tikz: draw a piece of a path between given coordinates

I have a path in my application that I want to split up in smaller paths. These, I would like to draw with a label attached to them. Take the following image as an example: The upper arc is split ...
2
votes
1answer
34 views

Rounded corner box in itemized environment

Here is the MWE: \documentclass{article} \usepackage{tikz} \newcommand{\rbox}[1]{ \begin{tikzpicture}[remember picture, overlay] \node[rounded corners=3pt, draw]{#1}; ...
8
votes
2answers
128 views

TikZ: draw lines connecting border of shapes

Being new to TikZ, I am trying to draw several (labeled) circles which are connected by lines. In its simplest form, I am doing this via \documentclass{article} \usepackage{tikz} \begin{document} ...
1
vote
0answers
48 views

Making TeXworks use tikz package

I need to create a document (I am using TeXworks) that requires the following packages/libraries: \documentclass[spanish]{article} \usepackage[activeacute]{babel} \usepackage[utf8]{inputenc} ...
4
votes
1answer
117 views

Can I instruct the Forest nodes to be at a certain level?

The MWE below is a machine-generated organizational chart. It works almost fine, except for those employees, who report to more than one supervisor. I had to add regular TikZ nodes and draw the ...
2
votes
1answer
80 views

Generating Picture

I'm trying to generate the picture that I created on Geogebra in Tikz code. The picture came as luck as I was playing with some functions. Now, I'm using the following code to produce the picture on ...
0
votes
0answers
67 views

Draw figures in tikzpicture (covering spaces and liftings)

I need help to draw these two pictures, in two different tikzpictures. I would really appreciate if someone could help!
1
vote
0answers
42 views

How to group box plots in pgf / tikz?

Grouping bar charts is easily done using pgf / tikz, e.g., \begin{tikzpicture} \begin{axis}[ width = 0.85*\textwidth, height = 4cm, major x tick style = transparent, ...
3
votes
0answers
43 views

Node size in graph with pgf 3.0

I want to draw some graphs with pgf 3.0, but the size of the nodes are not being taken into account when laying out the graph using spring layouts. Here is an example document: ...
6
votes
1answer
121 views

TikZ: Make stealth decoration follow arc

In this MWE \documentclass[border=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture}[path/.append style={ decoration={ markings, ...
4
votes
2answers
124 views

Draw cosine and sine function with periods 1?

I want to draw $\sin(2\pi x) and $\cos 2 \pi x$ $\in [3/4, 5/4]$ in the same coordinate system. How do I do this ? \begin{tikzpicture} \begin{axis}[domain=3/4:5/4,legend pos=outer north east] ...
4
votes
1answer
91 views

Invoke gnuplot through pgfplots to get a matrixplot

I have a code which gets two parameters and depending on them the code has different runtimes what I want to illustrate in a matrix plot. I'm writing the thesis in LaTeX the obvious method for me, ...
-1
votes
0answers
60 views

Figure plot using pgfplots

Please help me code this figure in LaTeX. I am a beginner in LaTeX.
5
votes
1answer
112 views

Shape missing using pic in TikZ

Why the shape (sB) is unknown in the following code ? How to avoid this ? \documentclass[]{standalone} \usepackage{tikz,xparse} \usetikzlibrary{calc} \tikzset{pics/.cd, % Marque croix ...
3
votes
1answer
67 views

tikz: Different styles across a line

I need to have a line partially dotted. I have accomplished it with an horizontal line, by inserting a node to delete that part of the line and then drawing a new line. However, for bended lines I ...
4
votes
1answer
103 views

Include TikZ element inside tikzpicture

I'm making a graphic representation of the results in a competition. Each team has gotten points in five different categories, and I want them represented in a bar per team, two sets of points above ...
5
votes
1answer
100 views

Add circle to Smith chart using PGF

I'm using the Smithchart library with PGF/TikZ, and I'm trying to add a simple circle in the middle of the chart. However, the circle is plotted using the "smithchart coordinate system" so it looks ...
1
vote
1answer
54 views

Tikz nodes with `fit=(top)(bottom)` slightly missized

I like to create textboxes via TikZ. I start with that flexible example. And, Yes :) I do create texboxes. Here it is. But I still have two problems.. Q1 I use fit to create light gray ...
4
votes
5answers
157 views

Dependence graph with TikZ

im trying to do some like this with tikz: I try to do it like \begin{tikzpicture}[every node/.style={draw,thick, align=justify, % Blocksatz in Noden anchor=north% Anker der child node für ...
0
votes
0answers
25 views

Tikz graphs side by side [duplicate]

I have written following code to put the two tikz graphs side by side but I didn't succeed. Can some help me out. \begin{figure} \begin{subfigure}[b]{0.32\linewidth} \centering ...
4
votes
3answers
201 views

Draw a rectangle with rounded ends in TikZ

I want to draw some round-ended rectangles to use as labels, so I thought a filled arc either end would work (silly me :-) \draw [fill](0,0) arc[radius=5pt,start angle= 90,end angle=270]; \draw ...
2
votes
0answers
59 views

tikz-3dplot, geodesics and adressing endpoints in polar coordinates

I am trying to draw geodesics on a sphere. While many approaches, like for example this one, i am more interested in another way. If i specify two points, say qand p on the Sphere, i would like to ...
1
vote
1answer
75 views

Drawing curves on an arc with tikz

Im not really adept at drawing with tikz, could anyone help me with a specific diagram? i need a circle or an ellipsoid with two curves on it that do not intersect. Something like picture included ...
4
votes
1answer
106 views

Slide number limit when using a progress bar?

I have been using the code for a progress bar given by @GonzaloMedina in this post for a nice progress bar. This code is customizable and gives very nice progress bars I find. However, I realized that ...
3
votes
2answers
95 views

Colouring one side of a rectangle defined by \draw

I create a rectangle like this: \draw (2,2) -- (2,4) -- (6,4) -- (6,2) -- (2,2); I would like to give the red colour to the side defined by points (2,2) and (2,4). I tried doing \draw [red] (2,2) ...
3
votes
1answer
69 views

Problem with plotting 3d plot in Latex, I have a sample Matlab plot

I have a Matlab plot shown below which I want to replicate in Latex. The data for Matlab is: i_whole=[ 0 0 0 0 0 3.7000 3.8000 3.8000 4.2000 3.7000 ...