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

How to enable minor y ticks for a logarithmic axis

I am using pgfplots to create some plot with logarithmic axis. But Latex automatically shows minor y ticks for some of them and doesn't show them for the others. Here is an example (when I increase ...
1
vote
2answers
111 views

Hypersphere inscribed within hypercube

Let's consider a hypersphere of radius r inscribed in a hypercube with sides of length 2r. Than take the ratio of the volume of the hypersphere of radius r to the hypercube with side length l = 2r. We ...
5
votes
2answers
81 views

TikZ: How to change the width of background layer?

As shown on the picture below, the TikZ backgruound library allows to create the background with automatical width/height settings. \usetikzlibrary{backgrounds} \begin{tikzpicture} [show background ...
6
votes
1answer
85 views

Fail to translate a polar point by a vector

My objective is to draw the following trivial diagram (just for an illustration purpose). \documentclass[tikz,border=12pt]{standalone} \begin{document} \begin{tikzpicture} \draw (-2,0) circle ...
1
vote
0answers
48 views

distances before and after tikzpicture

I have the problem that before and after a tikzpicture plot the distance is much higher than it should be \documentclass[BCOR=3mm,11pt,headsepline,footsepline]{scrbook} \usepackage[ngerman]{babel} ...
3
votes
1answer
72 views

Decorating drawn arrows in tikz

I'm trying to define a custom command which is to be an arrow with a tilde (\sim) on top of it. So far I have \newcommand{\tosim}{\mathrel{% \tikz[baseline,label/.style={% postaction={% ...
3
votes
1answer
107 views

Pythagoras' Triangle

I would like to draw a triangle using Latex which represents length 1 along the horizontal axis, $\tan{\theta}$ along the vertical axis and $\sqrt{1+ \tan^2(\theta)}$ along the hypotenuse, with angle ...
3
votes
1answer
46 views

TikZ3 arrow tip specification for “no arrow” or “shift tip” option

A specification like this arrows={|>[sep=10pt]-} works perfectly giving something like |-->--------. I would like to use the sep option to shift the arrow in the same way but without the ...
0
votes
0answers
21 views

Move tikzpicture on a beamer slide [duplicate]

I'm trying to move a tikzpicture on a beamer slide. This picture is centered, but I want to move it around on the slide without manipulating the tikz code. Do you have any idea? This is a minimal ...
3
votes
2answers
52 views

Aligning forest trees and getting the bounding box right

I want to set the following figure: I managed to recreate it using forest, but for reasons I do not understand, my command \menge, which I use for sets things that the forest trees are much larger ...
4
votes
1answer
95 views

Convert tikz to \includegraphics

I have a paper that I wrote with a lot of figures generated with tikz, but I've been asked to supply a version that doesn't use any "nonstandard tricks", i.e. with the images included with ...
3
votes
0answers
39 views

\addplot table with input filename relative

I include plots using matlab2tikz to generate tikz-files. There was a nice feature added which enables external datasets. A file plot.tikz is generated with the following code (unnecessary code is ...
2
votes
1answer
65 views

How to recover this Tikz drawing that no longer compiles

Over a year ago I created a graphic in TikZ and made it public on wikicomon wikicomomns. I posted also the code to create the graphic. Since then I changed computer and when I tried to use the code I ...
2
votes
7answers
452 views

Draw a quiver diagram with TikZ

I would like to know how to draw a quiver diagram like this one. I know there exists TikZ or something like that, but I don't know the commands or packages necessary to draw it.
3
votes
1answer
56 views

Why the background of a pgf fitting node with minimum width equal to another (backgrounded) fitting node's width is shifted?

I have two pgf fitting nodes: one below the other, left aligned, with different (unpredictable) widths, and I'd like them be backgrounded, with backgrounds of the same width. For this, I got help ...
3
votes
1answer
58 views

How to move a set of nodes without modifying each coordinates?

The following is a trivial example to illustrate my problem. \documentclass[tikz,border=12pt,12pt]{standalone} \begin{document} \begin{tikzpicture} \draw (0,4) -- (5,4); ...
3
votes
1answer
70 views

Getting colored open circles to indicate the absense of a number in the domain of a function

The following code instructs TikZ to plot a function and its derivative. There are two modifications that I would like. Since the function is not differentiable at 0, I would like to have open ...
5
votes
2answers
48 views

Autogenerate aliases based on scope

I want to be able to refer to nodes inside a scope from outside the scope by specifying their scope and name as in TiKZ node name prefixes in scopes The solution proposed there renames the nodes so ...
5
votes
1answer
29 views

How are pic text and options supposed to be used?

I'm trying to use pic text but it has no effect on my code. This is a Minimal Example: \documentclass{article} \usepackage{tikz} \tikzset{seagull/.pic={\draw (-3mm,0) to [bend left] (0,0) to [bend ...
3
votes
0answers
24 views

Connecting two nodes from different forest trees [duplicate]

I want to draw the following figure without pstricks: What I have is the following code: \documentclass{minimal} \usepackage{forest} \usepackage[external]{adjustbox} ...
2
votes
1answer
70 views

HowTo: 3D plot of a surface element with normal vector

I'm new to tikz, and I'm trying to visualize a surface element, something like In contrast to the example image above (which I referenced from the web), I would like to draw the surface element in ...
3
votes
3answers
155 views

Drawing two edges, one is missing an arrowhead

I'm trying to define two parallel arrows as a custom command in my preample as follows: \newcommand{\toto}{\mathrel{% \tikz[baseline] \draw[->] (0ex,.96ex) -- (3ex,.96ex) (0ex,.16ex) -- ...
1
vote
2answers
128 views

How can I create good looking integral paths?

I'd be really grateful if someone could inform me of a method to replicate the attached diagram for inclusion in LaTeX.
1
vote
0answers
55 views

Tikz - dynamic letter

I've got the task, to create a pattern for a letter or something else. It must have a perspective view like in this example So I think I've just managed to create something that looks nearly ...
3
votes
1answer
88 views

TikZ&Titlesec: complicated part design

I am trying to do the design as shown on the picture below. The background includes two layers: vertcal line pattern and gradient layer where is lower color is transperent and upper color is white ...
2
votes
1answer
79 views

How to conditionally draw nodes of a tree in TikZ

I want to draw several trees with tikZ (Version 2.10) which are very similar in the sense that there is a first tree and the others are obtained by ommiting some of the nodes of the first one. I ...
4
votes
1answer
45 views

reduce the number xlabels in a plot

I have a huge dataset which I'm processing using lualatex. (Normal compilation runs out of memory). The data cannot be sampled as it has some spikes (see figure). So I use the whole dataset. For the ...
1
vote
0answers
50 views

Formatting pgfplots bar graph with tabular* legend

When I attempt to change the size of my bar chart so that it sits centered above my legend, I can't get the height and width to simultaneously fit my specifications. One dimension is always too small. ...
5
votes
1answer
72 views

TiKZ pattern on an angle?

I would like a result similar to that provided by pattern = sixpointed stars (or fivepointed; doesn't matter), but where the underlying grid is at an angle. I understand this can't be done with the ...
1
vote
0answers
82 views

SIMPLE mindmap combined tree

I want to combine a simple mind map with a tree. First I tried to get something like the following mindmap from pgf manual p. 79: Thanks to @cfr, I could get the mindmap to work. Using the source ...
4
votes
3answers
139 views

tikz: mathematical expressions in variable names without pgf macros

Consider the following diagram: I would like to be able to evaluate mathematical expressions in variable names. For example I would like to be able to write (a$\i+1$\j) in this code to generate ...
14
votes
1answer
363 views

Intersection of 5 ellipses

I would like to fill the intersection of each of my 5 ellisses with the same color (black for example). It works very well with two. But with a third or more, I don't know how to "save" the first ...
1
vote
0answers
93 views

I do not know the key

I use: \documentclass[hyperref={unicode,bookmarks=true}, clock,fragile]{beamer} \usepackage{amsmath,amssymb,amsfonts, mathrsfs} \usepackage[utf8]{vietnam} \usepackage{tikz,tkz-tab,pgf} ...
1
vote
3answers
224 views

drawing simple sequence diagram

I need to draw this kind of simple sequency diagram, but I'm not very good with tikz: \begin{figure}[!ht] \begin{center} \begin{tikzpicture}[node distance=2cm,auto,>=stealth'] \node[] ...
3
votes
1answer
109 views

How to draw some lines between figures in LaTex

I want to draw the following figure. How do I do this? Some lines between figures, and Can you give me this lines some color? Some color lines in figure, as following:
5
votes
1answer
49 views

Inherit backgroundpath when declaring new shape in PGF/TikZ

I am trying to create some basic optic elements (a beam splitter in this case) to be used in PGF/TikZ. Well, since I am quite new to PGF/TikZ (and even LaTeX), there is something I am not quite sure. ...
2
votes
1answer
35 views

How to test whether pic text is empty in TiKZ?

If I wish to add a pin to a node in TiKZ, I can do so like this: \documentclass[tikz,border=5pt]{standalone} \begin{document} \begin{tikzpicture} \node [draw, thick, circle, minimum ...
4
votes
1answer
86 views

Indicating the differential on a graph

i would like to indicate on a graph the error in estimating f(x) using a linearization to the graph of f. To indicate the distance between points A and B, I would like a thin vertical line, with ...
2
votes
1answer
45 views

“Dimension too large” while working with serial date numbers

I export plots using matlab2tikz and pgfplots from MATLAB to TeX. Most of my plots contain "serial date numbers", which are the days since January 0, 0000. As you can guess, the numbers get quite ...
1
vote
0answers
63 views

Highlight a group of nodes in a tikz graph

Is it possible to extend the approach of the question: Highlight a group of nodes in a tikz tree to a generic tikz graph? In particular I don't have a graph in form of a tree, so I can't specify the ...
6
votes
1answer
401 views

Drawing coaxial cables: TikZ or pstricks

I want to draw this. I don't find any way to do I can draw some things... but it's so bad! and it's not realistic! please HELP... \begin{document} \newcommand\innenleiter[3]{% ...
1
vote
2answers
65 views

Plotting a composition of the logarithm function (base 10) and a linear function

What is the code to represent a logarithm to the base 10? I would like to graph y = log_{10}(3x + 1) on the interval [-0.1, 6]. I would also like to graph the tangent line to the graph at ...
1
vote
1answer
58 views

Drawing arcs on a number line

I found this code in an answer to this question here Help drawing a very simple number line using TikZ \documentclass[letterpaper]{article} \usepackage{tikz} \usepackage{amsmath} ...
2
votes
0answers
66 views

Raising a matrix of math nodes in tikz

I'm drawing a series of diagrams with many parallel edges, which I typeset with many instances of paths, yshifted as necessary. I'd like to use the same code for all diagrams, but some of them ...
2
votes
0answers
61 views

fancytikzposter damage pdf

I am using fancytikzposter, but for some reason that I do not understand the pdf file generated cannot be opened from another computer, here is my code that I got from here. \documentclass{a0poster} ...
3
votes
1answer
67 views

Custom labels for ybar plot?

I'd like to make a plot where data is arranged in bars, but each bar has a custom label if it is greater than a thousand. For instance, instead of 18,000 the label would read "18k" and for 50 million ...
2
votes
1answer
90 views

To make Question environment Discussion environment

About minimal thing developed originally mostly by Gonzalo Medina in earlier discussions of mine (one of them here) \documentclass{article} \usepackage[framemethod=tikz]{mdframed} ...
2
votes
1answer
60 views

Tkz Berge Vertex Labeling [duplicate]

I'm creating a graph with tkz berge, but I want my own labels, not the ones given by the empty ladder sequence. Is there any way to overwrite the tkz berge labels a_0, a_1, etc. and give my own? ...
5
votes
1answer
96 views

TikZ picture beside text with nested enumerate environments

I have a block of text which contains nested enumerate environments and I'd like to place a TikZ picture to the right of that text in such a way that the text does not overrun the picture. I tried ...
5
votes
0answers
27 views

Cannot use pgf-blur twice with XeLaTex

The following code \documentclass{article} %\def\pgfsysdriver{pgfsys-dvipdfmx.def} %this line does not matter \usepackage{tikz}\usetikzlibrary{shadows.blur} \begin{document} \begin{tikzpicture} ...