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
1answer
168 views

How can I place a line/arrow on an enlarged node's edge?

I'd like to connect the nodes by their edges, meaning getting the arrow on abc's end to touch the rectangle's left margin. It worked flawlessly with wordsa but I haven't been successful in finding the ...
5
votes
1answer
2k views

Declare function for tikzpicture

I'd like to declare a function that will be part of the equation that I then want to plot. The equation that I want to plot is defined as \frac{e^{-rT}N'(d_{2})}{S\sigma\sqrt{T}} The function to ...
8
votes
2answers
578 views

how to draw a diagram that forks out, then joins in the middle then forks out again?

Update: ref comments: I've slightly corrected the terminology and the title. I am using the term diagram now, instead of tree, and I am just asking on how to draw this diagram in Tikz. Any tool or ...
3
votes
2answers
1k views

Color with gnuplot generated TikZ file not working (other TikZ has color)

I have generated a tikz .tex file from gnuplot and I am attempting to simply \include{mytikzfile} in my main .tex file, which uses the revtex4-1 document class. Upon compiling I get a number of errors ...
8
votes
3answers
599 views

TikZ Matrix - How can I align content horizontally which is spanning over multiple cells/rows?

I'd like to finetune the big rectangle in the last column and its content, i.e. that it's all aligned to the third column's center. It is currently too far on the right: So far I have been unable ...
6
votes
1answer
402 views

How to set optimal level distance in qtree when different nodes have very different amount of text?

I am really a newbie in tikz (about 12 hrs experience) but I think I need to some hint on this. I am using tikz-qtree. Some of the nodes can contain more text than others. I set the text width to a ...
6
votes
2answers
917 views

Alignment problem of empty cells when doing multirow/multicolumn cells in TikZ matrices

This is a question which has been discussed here and here. One of the solution discussed is to use fit to cover empty cells. However, while trying it, it displayed an alignment problem between the ...
12
votes
1answer
1k views

Compiling a main document with many TikZ subfiles efficiently

What would be the most efficient way to compile a document of the article class with many TikZ subfiles? In the main document, I have added \usepackage{standalone} and then \includestandalone for the ...
6
votes
2answers
349 views

Tikz chain node loop to start of node

I'm trying to create a node in a linked list and let it point back to itself. \begin{tikzpicture}[list/.style={rectangle split, rectangle split parts=2, draw, rectangle split horizontal}, ...
4
votes
1answer
497 views

Error using htlatex with tikz forest package, invalid SVG generated

htlatex is supposed to support tikz with \def\pgfsysdriver{pgfsys-tex4ht.def} and it does on some tikz examples, but for some other examples, it gives bad svg images. UPDATE I was able to reduce the ...
5
votes
3answers
301 views

How can I complete this graph?

I am trying to draw a histogram graph using simple tikz codes. Here is my code \documentclass{article} \usepackage{tikz} \usepackage{pgfplots, pgfplotstable} ...
5
votes
2answers
407 views

TikZ: Using optional arguments in after part of \newenvironment*

How can I pass the optional arguments to a node being drawn in the after part of a \newenvironment*? In the before part this is easy since I can simply use #1. I tried using \edef, but that ended up ...
4
votes
1answer
1k views

ylabel style when axis y line=right

When I'm using axis y line=right, it appears ylabel style is not applied, as illustrated by this MWE: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \begin{document} \Large ...
9
votes
1answer
149 views

Use LaTeX3 variables within TikZ picture

I’m new to LaTeX3 and don’t understand why the following doesn’t work \documentclass{article} \usepackage{xparse} \usepackage{tikz} \ExplSyntaxOn \tl_new:N { \g_tobi_color_tl } \tl_set:Nn { ...
5
votes
2answers
209 views

Arc around a node in TikZ?

I have the following code: \documentclass[12pt, openany]{memoir} \usepackage{amsmath} \usepackage{tikz} \begin{document} \[ \begin{tikzpicture}[node distance=2cm,auto] \node (A) ...
11
votes
0answers
397 views

Why isn't the arc drawn on the good plane using tikz-3dplot in Tait-Bryan convention

As some people on tex.sx, I used the tikz-3dplot and changed some commands to use Tait-Bryan convention instead of the default Euler convention. As you can see on the following picture, the rotation ...
2
votes
1answer
271 views

How to fix venn diagram

I would like to make a venn diagram with Tikz, but instead of labeling A, B or C each circle I'd like to give some other names. However, having read the manual I've changed their labels but each new ...
5
votes
1answer
297 views

Line spacing in TikZ multiline nodes inside tables

I'm trying to typeset some multiline TikZ nodes inside a tabular environment. Somehow, the space between lines gets considerably shortened. Here's my code: \documentclass{article} \usepackage{tikz} ...
9
votes
3answers
2k views

how to draw nodes with same size

I would like to make 12 nodes with same sized circles. Currently, the radius of a circle for single digit number and two digit numbers are different. Let r1 be the radius for single digit numbers. ...
6
votes
1answer
289 views

Draw bivariate normal distribution in x-z plane

In draw-a-bivariate-normal-distribution-in-tikz, the bivariate normal distribution was plotted on the x-y plane. Is it possible to plot this on the x-z plane/y-z plane?
7
votes
1answer
728 views

Connecting subplots

Is there a way to draw a sort of connection between subplots in TiKz/pgfplot, like in this example? I'm looking to achieve something like this: But I would need to draw the "x 2000" line between ...
4
votes
1answer
154 views

Where is the error? - TikZ (angles)

In my thesis I'm doing a drawing with TikZ, but I get an error that I do not understand. Consider this code (simplified from the original, but still quite significant): ...
10
votes
1answer
441 views

TikZ: When I use the draw let … in command to draw a trivial arc, I get dimension too large

\documentclass[convert = false, border = 2cm]{standalone} \usepackage{tikz} \usetikzlibrary{calc, intersections} \begin{document} \begin{tikzpicture} \coordinate (O) at (0, 0); ...
5
votes
1answer
269 views

Space node values evenly

I'd like to space out the node values on the bars so that they are clearly visible. What do you recommend for the ones that are partially hidden? Can I do this automagically? Also I'd like to use the ...
3
votes
1answer
345 views

Omit overlapping xtick labels

So right now I have something like this: As you can see, the xticks on the second (smaller) plot are a complete mess. Is it possible to just show 3 values (the first, midpoint and last ones)? ...
4
votes
1answer
292 views

Problem with environments, arabic and tikz

Here a question also about my last topic. I want to create an environment that put a pretty box around my theorem and its title. Here is a code with the desired output : \documentclass{report} ...
1
vote
1answer
181 views

Scale only dataset read from file without scaling whole graphics

I have datasets which vary strong in range. So i want to scale my dataset to adjust it to my template, so that the grids, axes and so on are identical with the neighbour-subfigures. What is the ...
1
vote
3answers
907 views

How can I draw tikz arrows on a calculated triangle?

I am going to need a lot of vector triangles and would like to do them with TikZ. My TikZ experience is close to not existing. Therefore I would like to ask you, if there is a possibility to draw ...
5
votes
1answer
1k views

Tikz-pgfplots and matlab2tikz doesn't capture subplots well

I use matlab2tikz to convert this matrlab figure: % This file was created by matlab2tikz v0.3.3. % Copyright (c) 2008--2013, Nico Schlömer <nico.schloemer@gmail.com> % All rights reserved. % ...
5
votes
2answers
776 views

TikZ: Make node height span several others

How can I make the Z node span the total height of the ABCD column? My current code is: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,positioning} \begin{document} ...
3
votes
1answer
1k views

Problem with Texmaker and TikZ

I have a problem with TikZ and Texmaker. I would like to know why Texmaker doesn‘t work with the command: \draw [->] .... inside the environment tikzpicture. I don’t know the reason, maybe I ...
2
votes
1answer
331 views

tikz setting font size to pts

I'm using tikz to create color boxes containing text. However I haven't been able to set font size within these boxes using pts. I found a snippet in this question that defines a Boxed command: ...
5
votes
1answer
613 views

Shading a bell shaped curve in TikZ

I have the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1] \def\normalt{\x,{4*1/exp(((\x-3)^2)/2)}} \def\y{2} ...
2
votes
1answer
241 views

Problem with tikz picture and polyglossia with XeTeX

The problem is that the section headings disappear and herein there is a minimal example \documentclass{report} \usepackage{setspace} \usepackage{fontspec} \usepackage{polyglossia} ...
2
votes
1answer
851 views

TikZ externalize fails to recognize changes [duplicate]

Using XeTeX(xelatex) [i got the same using pdflatex] on Debian I am trying to save some compilation time using tikz external. Yet, the figures are never updated unless I delete the corresponding ...
4
votes
1answer
220 views

problems with tikz and arabi package

I have some problems and I hope you can help me. When I put a tikzpicture and use the arabi package, the picture is not displayed in the dvi or pdf file, and this without a single error. I have a ...
2
votes
1answer
92 views

Vertical labeled markers

I have a plot with four curves, and I wish to add vertical marker to pinpint the exact moment the curve drops below a certain threshold, much like this: I'd like to be able to control the width of ...
1
vote
0answers
229 views

Making Diagrams in TIKZ [closed]

I am making a diagram of a cellular reaction pathway and I'd like the chain of reactions to be surrounded by a large circle, which will of course be the cell membrane. For the life of me though, I ...
2
votes
0answers
56 views

Error with $ when using math in TikZ figure [duplicate]

I am drawing some figures with TikZ for a beamer presentation. I want one figure to look something like this: Additionally, I want to add labels under the intervals (the sections in between ticks ...
3
votes
0answers
166 views

Magnified plot / Vertical Markers [duplicate]

I've been trying to use the spy library to magnify a part of my plot, but I don't really understand how it works, and I can't find a manual/tutorial anywhere. Right now I am doing something based on ...
6
votes
2answers
263 views

TikZ: add “alt tag/caption/invisible text” for accessibility

I'm using this amazing tex.sx answer tikz star macro for rendering a x-out-of-y stars graphic for my skills on my resumé. The resume is done with xelatex and exported to pdf. Because it is a resumé, ...
6
votes
1answer
1k views

matlab2tikz imagesc TikZ/pgfplots equivalent

I'm using matlab2tikz to export imagesc figures into TikZ/pgfplots code. This process gives me a TikZ file and a rasterized png version of the image with colours matching the colourbar at the time of ...
7
votes
1answer
1k views

Energy level diagrams with TeX

Do you have any experience with creating energy level diagrams with TeX as shown below ? What software/packages would you recommend me ? I've heard about TikZ, but I don't have any experience with ...
2
votes
0answers
93 views

Brownian Motion [duplicate]

everybody! I need your help, I'm struggling with the visualization of the Brownian motion and would like to reproduce the following graph: I have already found a similar topic (How to draw Brownian ...
3
votes
2answers
592 views

\pgfplotstableread and subfiles

Is there a way to use a folder structure with subfiles and \pgfplotstableread? I have the following structure: main.tex \documentclass{article} \usepackage{pgfplots} \usepackage{subfiles} ...
6
votes
1answer
634 views

How to decorate a line with arrows and circles

I would like to draw an arrow (ray of light) overlayed with perpendicular double headed arrows and circles (to show both s & p polarisation), but I am struggling with decoration commands. I have ...
2
votes
1answer
369 views

Subnodes in a vector in TikzEdt

I am trying to display two vectors in two differnt nodes, and then, link some elements using arrows. \tikzstyle{line} = [draw, -latex'] \begin{tikzpicture}[node distance = ...
26
votes
4answers
2k views

Fill of a thermometer

The objective here is to create a fill of the thermometer to a desired degree being this in Celsius or Fahrenheit. Of course optimizations in the code below are welcomed like how I create the labels ...
8
votes
2answers
503 views

Highlight and use arrows in an equation In a robust manner

I am trying to give a very simple analogy to what I am trying to do with LaTeX. I simply want to write two vectors, one below or next the other, and then, use nodes to link the last two elements of ...
9
votes
1answer
253 views

Problems at page boundaries trying to highlight `\lstinline`

I was trying the code given in Colored background in inline listings, which is actually the same than in How to redefine \lstinline to automatically highlight or draw frames around all inline code ...