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)

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
402 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
801 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
164 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
706 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
663 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
770 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
507 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 ...
7
votes
3answers
480 views

TikZ positioning: is it possible to use arithmetics?

I would like for the blue box (text3) to be below the other two boxes and to have the width of the other two boxes together. So basically I want to make the blue box (the large one in %Row2) wider ...
8
votes
2answers
2k views

add unit circle to a plot

I have a point-by-point plot (pgfplots option only marks) in which I display the real and imaginary part of some points in the complex plane. I would like to add the unit circle to the plot, for ...
2
votes
4answers
2k views

TikZ: Diagram of a perceptron

I'm trying to create a TikZ based version of the following diagram (taken from here), but I don't know how to approach it. It doesn't need to look exactly like the original, but the basic idea should ...
2
votes
2answers
2k views

Insert jpg image in the margin of beamer slide

I am using the Goettingen theme (beamer). I want to insert a jpg file in the margin (bottom right) of the current frame. I also want the image to be semi-transparent. Please help.
4
votes
1answer
847 views

Documentation for the animate package with TikZ

I'm trying to locate some detailed documentation on the animate package. When I look at examples here and in other places, there is really way too much unknown syntax to figure out. I was hoping ...
2
votes
0answers
60 views

How to adjust font size in TikZ state diagram [duplicate]

I want to decrease the font size of nodes to avoid the conflict of this edge penetrating the Node(D) I just want to decrease the size not anything else, IN ADDITION, if there is a way to decrease the ...
7
votes
1answer
788 views

Contour around multi-line tikz text

I am trying to produce a text inside a node which has a contour. Problem is: when using contour, text width seems to be ignored, so I can not use auto multi-line text. I discovered contours in tikz ...
15
votes
4answers
1k views

Color the faces of a graph

I want to modify the image (see code below) by shading in the regions formed by the dashed lines that contain a black dot. The goal is to obtain something like How can I shade these regions? ...
3
votes
1answer
473 views

pgfplots chart labels too close and not spaced evenly

i have a set of numbers as x-coordinates:{2.08, 2.09, 2.7, 4.9, 12.8, 29.3, 64.2}. the left part of the diagram is too tight because 2.08 and 2.09 are very close. i want to evenly distribute the set ...
1
vote
1answer
173 views

xstring macros inside foreach

I don't really understand what is the problem here, but I guess it has to do with expansion and fragile macros since when I do the same outside of \path it works. Code: \documentclass{article} ...
5
votes
1answer
325 views

star next to arrowhead in tikz

What's the best way to draw $\to^*$ arrows in TikZ drawings? The best I've managed to come up with so far is \draw[->] (A) to node[very near end] {$*$} (B);
3
votes
1answer
571 views

removing the numbering of the axis pgfplots

How can I remove the axes numbers on this plot Helix as well as the box enclosing it? Would it be possible to now add a tikz 3d axis with pgf plots? \tdplotsetmaincoords{72}{120} ...
11
votes
1answer
3k views

TikZ custom zigzag pattern

I'm trying to create a custom pattern made of zigzag lines. Thanks to the TikZ manual and to Decorating (with random steps) a filling pattern I'm almost there: \documentclass{article} ...
2
votes
1answer
998 views

New TikZ arrowhead

I'm looking how to use currarrow as a new arrowhead in tikz. Especially it's of the same size of latex or stealth and way smaller than triangle 45. Any idea how to make it? For now I use ...
4
votes
1answer
223 views

How can I place H_2 on top of a N ? (aspartic and glutammic metal complexes)

Please consider the following code \documentclass{article} \usepackage{chemfig} \newcommand*\circleatom[1]{\tikz\node[circle,draw,fill=green!30]{\printatom{#1}};} \begin{document} ...
3
votes
1answer
85 views

Change name of generated “myfile_contourtmp0.table”

In a PGF axis environment, I am using \addplot3[contour gnuplot={number=20}]{30-0.1*(x*x)-0.05*(y*y)}; This command uses gnuplot to generate the file myfile_contourtmp0.table. My question is: How ...
6
votes
1answer
3k views

multiline label for node

Is there way of producing multiline label for node: \node[label=below:{unit\\cell}] (one){\tikz{\draw (0,0)rectangle (1,1);}}; The example produces "wrong" label output: untitcell However, ...
5
votes
1answer
263 views

Error caused by TikZ/PGF trigonometric functions

I'm a bit confused about a failure I'm seeing with an inline \cos call. In the code below there I perform contortions with \let, \pgfmathparse, and \pgfmathresult However, the commented line should, ...
9
votes
1answer
2k views

Why does loading pgfplots after tikz break the default layers in a tikzpicture?

Taking the MWE from Jake's answer to the question Background rectangles with equal width but 'fitting' height, I get an error when loading pgfplots after the tikz packages but not before. I'm assuming ...
7
votes
3answers
2k views

tikz-3dplot rotation around the x-axis

I'm trying to create a simple spherical quadrant grid using the tikz-3dplot package. The longitudinal grid lines look fine but when I try to create the latitudinal lines I get really strange results ...
10
votes
2answers
712 views

TikZ: Define pattern with reference to external picture

I want to fill a tikz-picture with a pattern, based on an external picture. Is this possible? If yes, how? I tried to define a new pattern with \pgfdeclarepatternformonly, but \pgfuseimage seems to ...
3
votes
1answer
2k views

Arrow end type [-] unknown - even though library is loaded

I am a beginner with LaTex and not comfortable enough to switch over just yet. At the moment I mainly use the smartdiagram package to easily produce high-quality flow diagrams for various documents ...
6
votes
2answers
3k views

joining two points on an arc

I am looking to join two points arc. I want the arc to travel counter clockwise. The two points are (3.15,0) and (-1.05,3.15). \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows, ...
2
votes
0answers
386 views

How do I replace an XYZ coordinate system on an already available plot? [closed]

I have an eps file looking like this: I have no access to the original dataset, so replotting it is not an option. I would like to replace the ugly 80s style coordinate system (Both the captions ...
16
votes
3answers
3k views

How to fine tune rotation of text along circular path?

After searching the web and finally coming from here (recreating a logo), I couldn't find an answer to what I am looking for. I want to rotate a text inside a circle and have a full control/fine ...
4
votes
1answer
491 views

Vertically center tikz-timing label of custom size

Question Once I re-size the text of my timing labels, the midpoint of the label seems to shift as indicated by the arrows from the code/image below. It aligns to the bottom of the text instead of the ...
20
votes
3answers
1k views

Isometric Elevation Grid in TikZ

Is there a (simplistic?) way to draw a 3D elevation grid like this in Tikz or PGFPlots? The blue line should be able to move up or down and, eventually, submerge the interior blocks. I've looked ...
3
votes
3answers
871 views

Curvy arrows between two tables (with tikz?)

I try to connect two arbitrary tables with arrows. The code example below should demonstrate how: say we want to connect the "1" in A with the "5" in B, the "2" in A with the "7" in B and so on. My ...
8
votes
2answers
5k views

Underbrace in Tikz

I'm trying to add an underbrace to a graph in tikz but when i compile run PDFLaTeX and View PDF, the underbrace doesn't look correct. Instead of curling down and inwards at the ends, it goes outwards ...
4
votes
1answer
1k views

Telecommunications Symbols

I am trying to draw some telecommunications objects to put in a more complex figure using PGF/TikZ. I know there must be a better way to do it and even write their names UE, BS, etc. . Any help is ...
2
votes
1answer
774 views

Trouble including a Matlab surf plot (pdf or png) with pgfplots

I have successfully used \addplot graphics before. Now I have a surf plot in Matlab, which I exported as png and pdf and I would like to include the image with \addplot3 graphics. I found some ...