Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-pgf]

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.

3
votes
2answers
747 views

Where do I find the pgf manual v2.00?

This might be a very stupid question, but I don't manage to find the pgf manual v2.00. On CTAN I only found v2.10. (I'd like to find it because I want to follow Andrew's comment to this great answer.)
16
votes
1answer
5k views

Scaling “node distance” in tikz

Well, here's another TikZ question; this time, I have no idea how to find an answer. I would like to give all my nodes with relative coordinates: \node (A) {A}; \node (B) [right = of A] {B}; using ...
45
votes
2answers
6k views

Is there a tikz style for putting math in all nodes?

I'm finally trying out TikZ and am already infected with its programmatic philosophy. I would like to be able to do something like every node/.style = {math mode} (which is wrong) so that I can ...
5
votes
4answers
11k views

Using calc in TikZ

How to use function calc in TikZ? For example, suppose I have a function f(x)=x^2. Now, I want to find f(1) and f(2), and then I want \draw f(1) -- f(2);.
255
votes
8answers
151k views

Is it possible to change the size of an arrowhead in TikZ/PGF?

I'm trying to draw an arrow with a bigger head than normal. Is it possible without changing the style of the line itself?
30
votes
3answers
2k views

How can I work around this TikZ bug: (\x)^2 and \x^2 produce different results in TikZ plot?

I have some files with TikZ graphics that have suddenly changed appearance since I upgraded to PGF-2.10. Here is a minimal example: \documentclass{minimal} \usepackage{tikz} \begin{document} \...
23
votes
5answers
1k views

LaTeX equivalent of ConTeXt buffers

While creating a series of graphics (using TikZ) in ConTeXt, I frequently use ConTeXt's buffer to "copy-paste" code. Is there a LaTeX package that implements this feature? Since most LaTeX users may ...
14
votes
1answer
7k views

Controlling the amplitude of the snake function in TikZ

I have been using TikZ with some success, but I can't figure out why the following code doesn't produce anything: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \...
30
votes
2answers
3k views

naming paths inside a TikZ foreach loop

Is it possible to create named paths inside a foreach loop with the name depending on the counter? I want to write something like \documentclass{article} \usepackage{tikz} \usetikzlibrary{...
3
votes
2answers
250 views

How can I make RHEL server libraries compatible with tex/Rnw documents created on my Ubuntu desktop, re: pgf, tikz, expl3

I want to compile tex and Sweave documents written on a server that is redhat, but I get errors linked to pgf/tikz. The documents compile fine on my I have already used wget to download the expl3 ...
14
votes
2answers
11k views

Path From and To Same Node in tikz Flowchart

I'm working on creating flowcharts directly inside LaTeX documents using tikz. I am admittedly an extreme novice with tikz, although I have quite a bit of experience using LaTeX. My problem is when ...
8
votes
1answer
2k views

Fading a path in TikZ

I want to draw a path/plot in TikZ whose shade depends on the coordinate. For example, I want say something like \draw[color=black!\x] plot coordinates{ coord1 ... coord100}; i.e. the shade of the ...
20
votes
3answers
2k views

TikZ: “skipping” levels when drawing trees

I'm interested in using TikZ to draw rooted trees whose leaves should all be on the same level, pretty much like this: Please don't pay attention to the fancy style and colours, I'm only interested ...
14
votes
4answers
5k views

Aligning an enumeration item to the top of a tikzpicture

I've drawn a tree using pgf/tikz and am trying to place it in an enumerated list. A snippet of my complete code is as follows: \subsection*{Problem 2} \begin{enumerate}[1)] \item Max heap \item \...
17
votes
2answers
4k views

Placement of arrowtips with TikZ’s markings

With the decoration library it is possible to place arrow tips at arbitrary positions along a path. TikZ places the front end of the arrow at the specified position, which is often exactly what one ...
16
votes
4answers
2k views

Tikzpicture on every page

How can I include a tikzpicture on every page? I would like to create a complicated document template (page should be framed, and have a table to hold document information both in the header and ...
19
votes
1answer
1k views

Is it possible to clear tikz/pgf options?

According to the pgfmanual, setting options on a clipping path is Not Allowed, so \clip[fill=red] (0,0) circle (1); doesn't work. That's all very well, and the above is certainly avoidable. ...
13
votes
2answers
12k views

PGF/TikZ and Sans Serif Fonts

I have a TikZ/PGF file created directly by a graphing package of the form \begin{tikzpicture}{dimensions} ... \end{tikzpicture}. The file uses \pgftext[...]{\selectfont{Some text here or \boldmath$...
18
votes
7answers
13k views

A good tool to make electronic schematics and export them vectorially?

I have to make a relative simple diagram and import it to latex vectorially. What would you recommend me to do this? This question might not be best asked here, but I suspect a lot of you have ...
2
votes
1answer
379 views

Does \pgflowlevel{\pgftransformscale{}} do the same as normal tikz scale?

I am wondering the following. Somebody made a complicated tikz figure (our university logo). Now I am having troubles, because the width and height latex is reporting are not the 'real' width and ...
15
votes
4answers
5k views

Fitting a list of points with TikZ and its \foreach

I have a list of N points (e.g. {(0,0),(42,7),...,(0,1)}). I want to use them as coordinates in TikZ, to draw some things. And I would like to fit them into a node (using TikZ's fit module (cf. http://...
9
votes
2answers
1k views

How to use the results of `raw output` to create a smooth plot

As by my previous question on plotting an implicit curve I've got some output. But as you can see it is not quite what it should be (apart from your browser's downscaling by a factor 2 of course. The ...
18
votes
3answers
6k views

Plotting an implicit function using TikZ

How could one plot an implicit function, like (x^2+y^2)^3-4x^2y^2 using TikZ? I know gnuplot supports them, but they are drawn using a surface built from the function and intersecting the result with ...
8
votes
3answers
931 views

Why do I have so much free space on the left-hand side of my tikz diagram?

Inspired by How do you draw the "snake" arrow for the connecting homomorphism in the snake lemma? I created my own snake like diagram (see below). The entries are rather large and the ...
14
votes
2answers
14k views

Tikz/Pgf if statements

I'm having trouble writing if statements, I can find next to no documentation on them and what I want to do seems quite simple. I'm using the orbitals pgf/tikz example from here, and I'd like to ...
6
votes
2answers
3k views

How can I upgrade to pgf 2.10

http://sourceforge.net/projects/pgf/ shows that 2 days ago (25 Oct 2010) version 2.10 of PGF (Tikz) is released. I am currently using texlive 2010. Will pgf 2.10 come in texlive 2010, or do I have to ...
6
votes
1answer
631 views

What is new in pgf 2.10

http://sourceforge.net/projects/pgf/ shows that 2 days ago (25 Oct 2010) version 2.10 of PGF (Tikz) is released. What are new functionalities in this version? (not bugfixes, but features)
24
votes
5answers
7k views

Is it possible to reuse a part of a tikz image

I have a part of my plot that I want to repeat several times. To be exact, the part I want to replicate is: \draw[yscale=2.0,yshift=-3,xscale=0.1,domain=0:10] plot[id=gauss1] function{exp(-(x-5)*(x-...
3
votes
1answer
1k views

Why does my loop not show?

I have a big picture made, but I can't get my nodes to get a loop (an arrow to itself). My code: \begin{tikzpicture} \matrix (mat) [matrix of nodes] { |[draw,circle]|$(0)$ &[10mm] $\begin{...
22
votes
3answers
4k views

TikZ: multiple decorations on a path.

I would like to draw a squiggly line with an arrow somewhere in the middle of it. TikZ has a pathmorphing decoration that draws a squiggly line and a markings decoration to place an arrow tip. So a ...
201
votes
6answers
156k views

Correctly scaling a tikzpicture

I was wondering which is the correct way to scale a tikzpicture. I tried with \begin{tikzpicture}[scale=0.50] but what I obtain is that distances between elements are scaled but not their sizes or ...
30
votes
4answers
4k views

Getting a tikz picture to have an equation number

I make a lot of commutative diagrams and am trying to switch to Tikz from amcd,diagrams, etc. I often have to refer to these diagrams in the text and would rather have them as equations (i.e. with and ...
3
votes
1answer
594 views

Help me upgrade to PGF 2.0?

I just installed MacTeX 2010 yesterday, so I'm running TeXLive 2010. I need to upgrade my installation of PGF to 2.0 from 1.18, which is what comes standard with the MacTeX distribution. Could someone ...
20
votes
5answers
7k views

Modular arithmetic on node names in TikZ?

Say I have a bunch of nodes I've already created in TikZ---maybe v0, v1, ..., vn-1. I'd like to connect certain of these nodes in a systematic way, by doing arithmetic on the indices, ideally mod n. ...
18
votes
1answer
23k views

How can I change the legend's location in a pgfplot?

For a report I am preparing several figures that I exported from Matlab using the matlab2tikz script. However, the location of the legend does not please me. Here is an example plot: I want to move ...
8
votes
1answer
14k views

TikZ failing to draw [closed]

I'm trying to use TikZ to make flow charts in my LaTeX files, but I'm getting an error. Here's the LaTeX I'm using: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} Some text \...
21
votes
1answer
9k views

Cycle option when drawing between nodes in TikZ

Cycle lets you close curves when drawing, and \coordinate (a) at (0,0); \coordinate (b) at (1,0); \coordinate (c) at (0.5, -1); \draw (a) -- (b) -- (c) -- cycle; works fine. Shouldn't also \node (a)...
2
votes
1answer
2k views

How do I use \pgfextractx, \setlength and so on together, to achieve a task using paths?

The following code attempts to absolutely position two nodes with rectangular outlines, then draw a line that goes from the right-hand side of one to the left-hand side of the other, along orthogonal ...
4
votes
1answer
228 views

Why do these two tikzpictures result in different output?

The following document has two tikzpictures in it, and they result in slightly different output. Why is this? I don't understand how the use of draw works in one but not the other. In the first one, ...
61
votes
5answers
11k views

How do you draw the “snake” arrow for the connecting homomorphism in the snake lemma?

How does one draw the "snake" arrow for the connecting homomorphism when using the snake lemma? I'd also be interested in drawing similar arrows act as "carriage returns" when considering a long ...
14
votes
2answers
2k views

chemical laboratory equipment

I want to include some drawings with Erlenmeyer flask, Bunsen burner and so on in LaTeX. I browsed the http://texample.net gallery. I found some examples for chemical structures, molecules and so. ...
10
votes
4answers
4k views

How can I turn off “fill” mode in TikZ within the one command?

I want to draw an ellipse and its centre point in the one command, like so: \draw (1,0) [fill] circle (1mm) node[below]{$1$} ellipse (5 and 2); I want the centre point filled but not the ellipse. ...
1
vote
1answer
457 views

How to get rid of vertical space above title from slide 2

Using this minimal example I get a vertical space above the title bar on slide 2. This seems to be an unfortunate interaction with CVS versions of pgf/TikZ (I am using the build from 28 September 2010,...
4
votes
2answers
1k views

Lining up edges of a tree with TikZ

I'm drawing trees with TikZ and \begin{tikzpicture} \node {$C$} child[missing] child{node {$i$} child[missing] child{node {$j$}} }; \end{tikzpicture} produces edges that don't ...
4
votes
3answers
2k views

How to get TikZ nodes not to change alignment?

I'm still working on rendering a nice block matrix. I've been using BMAT but it is irrelevant for the question at hand. I want to connect various entries in an array/matrix/BMAT by lines, and I'm ...
12
votes
1answer
21k views

Tikz node labels more below than below

I am using the tikz package. Is there a typografical/semantic/other reason why \draw(2,0.6) node[\label=below:$b_1$]{} -- (2,4); produces a label more below than \draw(2,0.6) node[below]{$b_1$}; ...
23
votes
8answers
11k views

Electric circuits in TeX, LaTeX, and Friends

What are some ways to draw electric circuits in TeX systems? I'm making this community wiki since I haven't found a question related to this. I was thinking along the lines of circuitikz. What do ...
3
votes
2answers
774 views

Beamer: how to convince “includeslide” to include the last slide of a frame

I'm using \includeslide to create copies of my Beamer presentation slides in handouts, but have hit a small snag. By default, it appears to choose the first slide in a frame unless I specify the page ...
22
votes
4answers
4k views

Draw only some segments of a path in TikZ?

Is there a good way to create a path in TikZ only some segments of which are stroked? I want to create the whole path in a single command so that it can be filled, but I also want to stroke some ...
2
votes
1answer
373 views

using easybmat and tikz packages together?

In continuation to this question, I was looking for a way to add nice diagonal lines inside a BMAT matrix to express a band structure of the matrix. However, a LaTeX file with both TikZ and easybmat ...