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

How to automatically scale inline TikZ code in subscripts?

I want to use inline TikZ code to create my own subscript symbol. For example something like $V_{\tikz{ \draw [|->] (0,0) -- (2ex,0); }}$ The problem is that it is not scaled. The length of the ...
9
votes
1answer
886 views

Creating fancy section pages for Beamer

I am currently struggling to create fancy-looking section pages in Beamer to achieve the following layout: Based on my question on the matching TOC (fancy-table-of-contents-for-beamer) I came up ...
6
votes
1answer
505 views

Scale TikZ nodes and shapes for a given canvas size

I have the following code to produce an hexagon coverage area: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \usetikzlibrary{positioning} \usetikzlibrary{calc} ...
3
votes
1answer
456 views

Wrong plot alignment when using colorbar and groupplot

The alignment of the plot is wrong when I use colorbar, see figure. How can I fix this? Further I would like to know how I can make the small axis ticks black in stead of gray? Now you can't really ...
2
votes
1answer
246 views

Can't use animations with \input?

I have two different animations, made with TikZ and the animate package, that I want to include in a beamer presentation. When I had the code inside of my presentation's .tex file everything worked ...
4
votes
1answer
382 views

A line parallel to an edge in a TikZ picture

I have a graph in TikZ built using code like the following \node[...] (1) at (0,0) {1}; \node[...] (2) at (1,1) {2} edge (1); I would like to add a short line (with an arrow) parallel to the ...
3
votes
3answers
283 views

How to draw an 3+1 decomposition in tikz

I am trying to draw the following picture in tikz but I can't make it. Any suggestions on how this can be done in TikZ or somewhere else?
15
votes
5answers
978 views

Draw a chain of beads

I would like to reproduce this kind of figure: I'm wondering what's the best way to achieve that with TikZ. My guess is to draw an element composed of a circle + a link and to link this element ...
6
votes
2answers
512 views

Controlling Matrix like a shape in Tikz

Would it be possible to control a matrix in Tikz as accurately as possible as with regular shapes? For example, inside a Tikzpicture, I could simply control a shape's size by writing ...
6
votes
1answer
394 views

Proper way to align labels with nodes tikz

Consider the following code: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (1,1); \coordinate (B) at (2,2); ...
7
votes
1answer
707 views

Strange error when combining Beamer, Animate, Tikz and Listings

I'm working on some slides where I show how code is actually executed in Java. Therefore I'm working with the animate package to generate animations. Without going into details, I've written a macro ...
3
votes
0answers
449 views

My tikzpicture is to large for my beamer frame [closed]

I'm extremely new to LaTeX and this is my first post on this site. I have a major presentation coming in a couple weeks, and I'm in great need of your help. I export Geogebra code for my graphs, it's ...
6
votes
2answers
449 views

Wrapping a Feynman diagram in an ellipse or a circle?

I used a variation of the following code in order to create Feynman like diagram in latex using the answer in Drawing a scattering Feynman diagram with TikZ However, I want to wrap the diagram inside ...
8
votes
2answers
1k views

tikzDevice is not getting sizes right (knitr)

I am using OSX, pdflatex, R (cran), tikz/tikzDevice and knitr to create my documents. My problem is that the font sizes of the produced tikZ-file do not match the LaTeX document font sizes. Result / ...
15
votes
4answers
5k views

Drawing a scattering Feynman diagram with TikZ

I am trying to produce a scattering diagram with TikZ but I have become stuck. The Desired Structure I am trying to achieve this layout of lines, including their arrow directions. In my diagram. ...
0
votes
1answer
539 views

Beamer overlays - how to make things appear in different places? [closed]

So I just started using beamer and got introduced to the \pause command. But I want things to show up at different places on the screen, not necessarily from top to bottom. How to do that? ...
6
votes
2answers
269 views

Saving a list in a re-usable box

Pardon me if this is a dumb question, but I am a bit rusty about this. I want to store a list like one generated by the enumerate environment in a re-usable box that I may re-use within a TikZ ...
8
votes
1answer
596 views

decoration nodes not being placed on the circle they are intended to be on

I "placed" some nodes on a circular path but they aren't showing up in the correct place and they aren't even on the circle. What is going wrong? \begin{document} \usepackage{tikz, pgfplots} ...
41
votes
3answers
1k views

Creating CAPTCHAs and other fancy distorted letters with TikZ

I try to do a little more spectacular that phrase ( Δελτιο Υλης) . Is the headline on a press material for my students. The fact is that I could accomplish this with gimp or a graphics program such as ...
6
votes
1answer
224 views

circle node on an ellipse

I want to put this node on an ellipse at about the 35% mark \node[draw, circle, inner sep = .08cm, scale = .75] (location) {2}; \documentclass{article} \begin{document} \usepackage{tikz} ...
12
votes
3answers
779 views

Fit only the height on a node

I've been trying to get the fit key in TikZ to scale a node so that it matches only the height of it's fit nodes but I haven't been successful. I'm trying to get the red box to be the size of the blue ...
5
votes
0answers
786 views

Making arrow heads smaller using “arrowsnew” [closed]

I want to make the arrowheads smaller on the $\delta v_A$ arrow and on the [<->] arrows. I made the file from this post Is it possible to change the size of an arrowhead in TikZ/PGF? but it ...
6
votes
1answer
270 views

Double unwanted arrow tip in Tikz

I'm trying to make an arrow with a round tip. The arrow comes exactly as I want it except that it gets a double tip, while I want only one. I checked the code multiple times but without success, maybe ...
5
votes
1answer
164 views

TikZ: using a bitmaps's dimensions as global bounding box

I'm using a tikzpicture environment to draw on a bitmap image in order to add annotations. I'm setting the width of my bitmap to \textwidth. I want to add annotations in the left or right margins of ...
4
votes
2answers
6k views

Drawing a rectangular shape with a border around it in TikZ

Could anyone please tell me how do I draw a rectangular shape with a black border around it? I want that for all my rectangles in the following TikZ picture: \documentclass[tikz]{standalone} ...
3
votes
0answers
154 views

Optimizing tikz code for less redundancies [closed]

I don't use tikz very often. When I do, I'm usually pretty happy with the result (and with how useful that manual is). But I always think the code I produced to get there could be optimized, as in the ...
6
votes
2answers
605 views

Rindler coordinate chart (family of parametric curves) in TikZ

Is it possible to make a plot like this with TikZ or other drawing packages? This plot visualizes a two parameter family of curves, given by T = x Sinh(t) X = x Cosh(t) The pink curves are ...
2
votes
1answer
311 views

Improve diagram TikZ

I want to improve the visual appearance of the following diagram. \documentclass{standalone} \usepackage{lmodern} \usepackage{mathtools} \usepackage{tikz} ...
4
votes
1answer
928 views

understanding how to rotate arrows in tikz

I have seen the post on the rotation of arrows and one of the post is mine. However, I don't understand how to do accomplish it myself. For instance, I am making a picture of Hohmann transfer where ...
5
votes
1answer
496 views

Putting text in a box: custom box : different color for each line

For a beamer presentation, I would like to enclose text in a box such that: - all the line of the box are blank, - except the upper left corner, and the lower right corner of the box which are color ...
1
vote
0answers
205 views

Why is centering a TikZ picture from an external file not the same as a centering a .png figure? [closed]

Why can't I put a Tikz picture inside \makebox? \begin{figure}[!ht] \centering \makebox[\textwidth][c]{\includegraphics[width=.8\textwidth]{./Figures/chapter5/procedure_contacts.pdf}} \end{figure} ...
5
votes
3answers
3k views

Using mathematical function in PGF/TikZ

I want to use ProbXpos for example to position tic marks and to position line ends. It seems to calculate as I intend, but how can I use the calculated value? The example below prints a sample result ...
3
votes
1answer
401 views

How to add text in a link tikzset

How to change tikzset the text is automatically added to the link \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{shapes,positioning,fit} \begin{document} ...
3
votes
2answers
797 views

Plotting floating point data with pgfplots

Is there a binary file structure supported by pgfplots to allow floating point numbers to be loaded and plotted? I understand the time taken to convert floating point data to a text file is small, ...
1
vote
1answer
164 views

How to stop pdflatex from mixing up already compiled tikz pdfs

I am rather at a loss as to how this happened: I don't even know what MWE to paste in here. I'll just hope someone has seen something like the overlapping of tikz pictures before. In fact none of the ...
4
votes
1answer
163 views

Why won't putting \input inside a tabularx environment compile?

Putting a tikzpicture normpdf_2d.tex \input{./Figures/chapter6/normpdf_2d.tex} on its own is fine. but, putting it nto a \tabularx environment won't compile. Why? What property does this ...
1
vote
1answer
704 views

Gantt using Tikz

I would like to draw following picture in latex. I would like to have a suggestion if this could be easily possible by pgfgantt package? Or should I use tikz to draw this kind of diagram? In pgfgantt, ...
29
votes
4answers
38k views

How to plot functions like ‎‎‎‎‎x=f(y)‎‎ using TikZ?

To plot functions in the form of y=f(x), we simply write‎ ‎\draw ‎[‎smooth,‎samples=100‎,domain=0:‎‎2‎‎] ‎plot(\x,‎‎‎‎‎‎‎‎{(\x)...‎‎‎‎‎‎‎‎‎‎‎‎‎‎‎});‎‎ But how about functions like x=f(y)? How to ...
4
votes
5answers
662 views

How to write ‎y = (x / 6) ‎^ {3 / ‎7} in TikZ format to plot its graph?

How to write y=(x/6)‎^{3/‎7} in TikZ format to plot its graph in the following code? ‎\documentclass{article}‎ ‎‎\usepackage{tikz‎}‎ ‎\begin{document}‎‎ ‎‎\begin{tikzpicture}‎ ‎\draw ...
4
votes
1answer
290 views

Why does pasting the contents of a tikz file into my main file compile properly but not when using \input

If I place the contents of my tikz picture in my main.tex file it works like a charm using \usepgfplotslibrary{external} \tikzexternalize and subsequently: pdflatex --enable-shell ...
13
votes
1answer
385 views

tikz: Black hole eats pictures

While playing around with shadings I accidentally created a black hole (a zero-width rectangle) which ate all my pictures and text on the page: \documentclass{article} \usepackage{tikz} ...
2
votes
0answers
214 views

Chemfig artifacts next to bonds [closed]

When drawing reaction schemes with chemfig I get unwanted small dots next to certain molecules. These dots remain the same size weither I zoom in the document or not. \documentclass{article} ...
16
votes
1answer
2k views

Tikz: intersection of line and plane

I am struggling with drawing a plane and a intersecting line. I would like to have the line C,P',P in the image, disappear if it is "behind" the plane and have it reappear if it is not behind the ...
14
votes
2answers
1k views

TikZ: shade also the border of a node

I would like to shade a node and the border of the node. The following code works but I don't like it very much that I have to draw something after the node on the background layer. I would prefer a ...
7
votes
2answers
745 views

How to plot a discontinuous function curve and diagram of Markov chain with TikZ?

Please apologize my ingnorance of tips to use for asking questions. I would like to realise the plots and the diagram like those shown on page 158, 160 and 161 on this document Chaine de ...
5
votes
1answer
205 views

Scholarly debates and arguments with TikZ

I was wondering if there is a TikZ library to diagram scholarly debates. For example, dark grey nodes constitute an argument for thesis (7), while light grey nodes are reasons to resist that argument. ...
10
votes
3answers
1k views

TikZ: How to center captions below figures in matrix

I have three figures that I want to align in a matrix. Each figure is drawn in a different way and needs a caption that is centered below the corresponding figure. Here is what I currently have: ...
7
votes
1answer
766 views

Resizing pgf plots in an A0 beamer poster

I am creating a A0 scientific poster with the beamerposter package and I want to include TikZ/PGF plots. However, if I typeset these plots, the line width for the axis and for the data are too small. ...
3
votes
0answers
192 views

pin angle not accepted [closed]

I am trying to draw a pin with a 45-degree angle. For some reason, the angle is not accepted and is seen as the pin label: \documentclass[tikz]{standalone} \usetikzlibrary{intersections} ...
7
votes
1answer
506 views

Why does \addplot shift my graph of a \pgfmathdeclarefunction function to the right?

When plotting a \pgfmathdeclarefunctioned function the graph gets an offset to the right that is proportional to the number of times the function is called in the formula. I have boiled my initial ...