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)

9
votes
3answers
948 views

Draw an ellipse from the two focus points (foci) and the sum of the distances from foci to border

I have two nodes that I want and foci and I know what the sum of the distances should be (a constant times the distance between the focus nodes). The way I know of drawing ellipses takes as ...
4
votes
2answers
471 views

Drawing a central composite design

Please I would like to draw a central composite design using PSTricks, or possibly tikz. This is the cube with the axes showed below. I have tried pst-3d but this is not easy. If you had an example of ...
11
votes
1answer
455 views

How to decorate a path with arrows at certain coordinates?

Next example (taken from TiKZ manual) shows how to find intersection points between two paths. Once you know intersection points it's easy to decorate them with any marking. But if I want to use an ...
3
votes
1answer
633 views

how to draw XOR gate symbol as a node in tikz?

I want to draw a diagram as follows: This is my tikz code \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows,fit,calc,positioning,automata} \begin{document} ...
7
votes
1answer
446 views

Questions about pgfmath

\pgfkeys{/pgf/fpu} \pgfmathsetlengthmacro\x{5^2} \show\x -> 25.0pt % OK, thanks. \pgfmathparse{5cm^2} What is the meaning of ] in the following? \show\pgfmathresult % ->1Y2.0238983e4]. ...
8
votes
3answers
3k views

How to put two images side by side and put some symbol in the center?

I want to put two images side by side and put a comparison symbol in between them. Here is the tikz code : \documentclass{article} \usepackage{tikz} \usepackage[margin=15mm]{geometry} ...
10
votes
3answers
775 views

Decorate path with arrows at nodes

Standalone example: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \begin{tikzpicture} \draw[black, very thick] plot[smooth] coordinates {(4,1) (2,2) (1,3) ...
231
votes
2answers
26k views

Create xkcd style diagram in TeX

The unique style of the diagrams at xkcd has an informative but nice hand-drawn touch. I guess they are actually drawn by hand but just recently on our partner site for Mathematica someone asked how ...
6
votes
3answers
410 views

parindent in TikZ node

I'm playing around with the new ocgx package. It uses TikZ nodes to place text. Unfortunately, parindent does not work in the nodes. Is there a way to make it work? Edit (source code) ...
11
votes
2answers
618 views

Unexpected clash between babel and pgf spy

The following example taken from the pgfplots manual (p. 121) works fine only if the line loading babel is commented \documentclass{article} \usepackage[frenchb]{babel} % this is the troubelsome ...
1
vote
1answer
1k views

Opacity in TikZ, ruins whole structure in Beamer [closed]

I am making a presentation in beamer. I wanted to make a TikZ picture and change it's opacity, locally on specific items. When I did, the structure color changed... I will attach my preable as well ...
5
votes
3answers
3k views

Removing scientific notation in tikzpicture made by matlab2tikz

I am having a very hard time trying to figure out how to remove the scientific notations on the y-axis of my graphs. The graphs are made in MATLAB and then converted into TikZ files using the package ...
8
votes
1answer
395 views

Tikz bug with math in decoration text?

Following this example, I write: \documentclass{article} \usepackage{tikz} \usetikzlibrary{ decorations.text, } \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); \coordinate (b) ...
7
votes
1answer
659 views

Why do Beamer action specifications for TikZ nodes not behave like \uncover?

NB. I have completely rewritten this question to hopefully clarify things. Executive Summary When creating TikZ diagrams in Beamer, one can add overlay specifications to paths and nodes, as in ...
6
votes
1answer
404 views

Positioning equations with tikz diagram

I'm trying to annotate an diagram of a neural network with an equation that describes the activity of each node. I can't get the equation to the upper right, where I want it to be. I've tried using ...
1
vote
0answers
46 views

Error raised with node [closed]

I have the following code that raises "undefined control sequence" error on the line that draws redarrow. When I continue with compilation, it does produce the red arrow, but gives this error that I ...
1
vote
0answers
449 views

Arrow head not showing up [closed]

I am not sure what I am doing wrong, but the arrow head on the link from the bottom left box to the upper right box does not show up. I want it to be the same as the arrow heads on the other edges. ...
4
votes
1answer
292 views

retrieve the length of a segment

I want to retrieve the length of a segment in cm for display in a node As in the example below, I would like to display the length of three vectors \documentclass{article} \usepackage{tikz} ...
2
votes
1answer
531 views

Fancy cloud quote-Arithmetic overflow

I ws trying to make a fancy quote...(Any ideas?) I couldn't find annything, so I thought of using a cloud... My code is \documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer} ...
6
votes
1answer
169 views

TikZ Externalize & Linegoal conflict?

I'm new to stackexchange, and did not find any information about this issue. I encounter an error whenever I try to use the TikZ's externalize along with (unrelated to TikZ pictures-) \linegoal. My ...
4
votes
4answers
580 views

How to scale a tikz picture?

I am using \documentclass[slidestop,compress,mathserif,12pt,xcolor=dvipsnames]{beamer} \graphicspath{{images/}} \definecolor{LHCblue}{RGB}{4, 114, 255} \usecolortheme[named=LHCblue]{structure} ...
1
vote
1answer
339 views

How to improve placement in a series of TiKZ nodes

I am a beginner in LaTeX, and TikZ trying to make an industrial document, with a series of keying patterns. I have managed to produce in the attached MWE what is needed, put I have to adjust manually ...
0
votes
1answer
1k views

TikZ-pgf directed graph: change arrow color and location

I have something like this: \SetVertexNormal[Shape = circle, LineWidth = 2pt] \SetUpEdge[lw = 1.5pt, color = blue] ... \begin{tikzpicture} \Vertex[x=0 ,y=0]{1} ...
2
votes
2answers
1k views

Circuitikz different ground symbol

Is it possible to make circuitikz draw a different ground symbol? I would like to have a ground symbol with only one horizontal line. Thanks.
3
votes
1answer
889 views

Tikz - change object border line type - combining solid and dashed line

I would like to help with improving next Feynman picture. A few guys helped me with location ellipse in the irregular shaped object (question 74335). The TikZ code is: \documentclass{article} ...
6
votes
1answer
2k views

Tikz inside table

I want to create a two column question with a Tikz shape. The problem here is that I cannot align the text and the shape. Text should have a left-top alignment, shape can have either center-center or ...
3
votes
1answer
847 views

tikz external use png as default instead of pdf

I have somewhat successfully set up my tikz external code using zeroth's very helpful advise Externalization to other format, Makefile. Add new rules to the makefile My aim is to generate pngs for ...
6
votes
2answers
792 views

TikZ circle size

Please which keys may I use to get the circles in the following two categories of the same size? minimum size and inner sep don't improve the output. Please, if needed, use any looping macro of your ...
14
votes
2answers
7k views

Easiest way to plot a function with PGF/TikZ

I am new to TikZ and/or PGF (whatever the difference is :/), as you can see. Anyway, I need to draw the graph of the equation x^(2/3) + y^(2/3) = a^(2/3), where a = 2. Any suggestions? Here is what I ...
5
votes
1answer
667 views

Nodes with cases with TikZ

I need to make something that should look like this (sorry for such low quality of picture) So I type this but it's doesn't work correctly: \begin{tikzpicture} \node (A) at (0,0) {$ \vec{\bf ...
13
votes
1answer
557 views

Tangent on parabola

I really was working on this now for a long time. I need a tangent line on a parabola; here is my working example: \documentclass{minimal} \usepackage{tikz} ...
7
votes
1answer
535 views

Tikz arrowhead size in tree using decorations?

Tikz is weird when in comes to decorating tree edges. I'd like to draw a tree with a snakey line with an arrow in the middle. What sounds simple is somewhat tricky but I found a solution with a ...
7
votes
1answer
1k views

pgfplots axis enlargelimits [duplicate]

Possible Duplicate: Image with axis I want to place an image against the edge of an axis frame, but because of the (unknown to me) value of the enlarged limits, I can't find the coordinates ...
8
votes
1answer
225 views

Usings tikz, how can I specify a coordinate with the x value from the coordinate in one system and the y value from the coordinate in another system?

Usually, I would use (a, b |- c, d) to get the coordinate (a, d). But what do I do when (a, b) and (c, d) are in different coordinate systems? In particular, my first coordinate is (axis cs:a, b) ...
5
votes
2answers
826 views

How to evaluate tikz expression before printing as text?

Edit: In response to the comments, the question has been edited to include the MWE. The accepted answer (by Gonzalo) is still valid. Here's my code: \documentclass{article} % *** MISC UTILITY ...
4
votes
0answers
133 views

Change color of \pgfshadepath{ball}{0} [closed]

There is already a predefined shading for spherical objects, which is invoked via the "ball" option, but I haven't found a way to switch its color from the default blue to red when using it outside of ...
6
votes
1answer
501 views

Binary Red Black Trees, adding a pointer?

I want to illustrate the algorithm for rotation on red-black trees. How can I draw an external (and temporarly) pointer on the leaf '5'. The arrow should must come from above-left with a label ('y' ...
7
votes
2answers
1k views

Move TikZ cloud in a better position using beamer

I am trying to manipulate the exact position of a TikZ cloud but I am not sure if I'm doing any effort at all. As you see in the aforementioned picture the space between items is not beautiful. So ...
9
votes
1answer
316 views

How to fit ellipse into another object - using intersections and calc library

I would like to ask, how to place ellipse into any object, so that the length of the main arm is defined by line1 (point A, B) in my code: calculate the coordinates of the ellipse midpoint rotation ...
4
votes
1answer
119 views

How can I create one variable for coordinates?

Currently, if I want to make my TikZ images independant of coordinates, I use \newcommand\AX{0} \newcommand\AY{1} Can I create one coordiante for one point? How can I access the x-part or the ...
7
votes
1answer
449 views

Addressing overlay specifications in TikZ-pictures

I was creating a mindmap for a presentation using as reference tikzpicture in beamer. My code is: \documentclass{beamer} \usepackage{lmodern} \usetheme{Copenhagen} \usepackage{tikz} ...
84
votes
10answers
5k views

How can I draw an egg using TikZ?

I would like to draw an egg-format element, but I have only found ways of drawing ellipses.
1
vote
2answers
372 views

Generate plot with embedded tools useable externally

I use a both latex and M$ Word for my technical reports, depending on the person I have to deliver it. To generate my plot, I love using the tikz2pdf script given by Hans Meine but as far as it ...
4
votes
1answer
321 views

Alignment of block diagram in hexagon type of layout

I am trying to build a block diagram with some control flow using TikZ. The blocks in the diagram should be aligned like the vertices of a hexagon. Also the \centering macro is not working for me. ...
8
votes
1answer
633 views

Compiling tikzmanual example with chains and branches

Does someone know how I must compile the example of the tikz/pgf user manual (v2.10) in section 28.5: \usetikzlibrary{chains} \begin{tikzpicture}[every on chain/.style=join,every join/.style=->, ...
10
votes
2answers
804 views

Draw a railway network in Tikz

I need to make several diagrams of a railway network, each of them representing different scenarios. Here is an ugly example of what I want: And here my first attempt to reproduce it: As you can ...
3
votes
1answer
273 views

Problem with tikz-pgf and \pgfmathabs

This is a follow up question to Problem with pgfmathsetmacro in foreach loop with pgfplots. In short I also want to use \pgfmathabs to get the absolute value of a number in that example (with \i as ...
4
votes
1answer
835 views

Control output grid with in pgfplots while doing everything else automatically

A nice feature of pgfplots is that it automatically chooses reasonable values for maximum/minimum x and y values and for the x and y unit vectors which especially effects the grid size and the labels ...
1
vote
1answer
1k views

adding text onto pdf pages

This is related to the post How can I superimpose LaTeX / TeX output over a PDF file?. One of the answers is (which is the one I'm using now): \documentclass[12pt]{article} \usepackage{pdfpages} ...
10
votes
2answers
514 views

tikz and atbegshi

The following doesn't show watermark on page 1. How can I get watermark on page 1? \\ has no effect. How can I force line break? \documentclass{article} \usepackage{lipsum} \usepackage{graphicx} ...