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.

Filter by
Sorted by
Tagged with
5 votes
1 answer
1k views

Drawing paths with TikZ from a DB with DataTool

I have written this code and it works: ... \DTLsetseparator{;} \DTLloaddb[noheader]{DBcurva}{Curvas.csv} \begin{tikzpicture} \foreach \columna in {1,3,...,\DTLcolumncount{DBcurva}}{ \edef\listaPuntos{...
user avatar
3 votes
2 answers
713 views

Unexpected tikz/counter behaviour

What I've been trying to do, futilely, is to use the foreach[counter=\xi] x in {1,2,3} statement in tikz/pgf with LaTeX. This fails, every time. Whatever. So I moved on to trying to use a counter, ...
user avatar
  • 3,057
5 votes
1 answer
2k views

Tikz array as argument

Problem I'm drawing flow diagrams in Tikz, and they basically include a header, followed by a list of flow components set below an arrow. I've written functions to take arguments in Tikz before, but ...
user avatar
  • 3,057
6 votes
1 answer
2k views

Using `easybmat` and `beamer` together

I've written an article using the easybmat package and now it is time to create the beamer slides....however, as you can see here, in order to load both the easybmat and tikz (or pgf?) one needs to ...
user avatar
5 votes
1 answer
427 views

Figure-macro with TikZ: account for y-axis labels

How can I account for the space taken by the y-axis labels? Can I somehow \setbox the axis labels, or something similar? Because now, the y-axis labels stick out of the text block width (because I ...
user avatar
  • 24.9k
132 votes
7 answers
54k views

Cool Text Highlighting in LaTeX

LaTeX has soul. ConTeXt, of course, has beautifully marked up "sharpie" highlighting, where you can put sweet hightligher under your text for free! In the pictured example, you can see highlights ...
user avatar
13 votes
2 answers
3k views

Why does setting the paper size with KOMA-Script require TikZ?

Maybe I am just too tired, but I simply can't explain what is going on. The file \documentclass[a5paper]{scrbook} \usepackage{lipsum} \begin{document} \lipsum \end{document} produces A4 sized pdf ...
user avatar
  • 85.4k
6 votes
1 answer
2k views

How to make tikz center the cells of a matrix?

I want to construct complicated things in tikz matrices (but don't we all), and when I'm done, I want the rows and columns of the matrix to align along the centers of these complicated things. Here ...
user avatar
7 votes
1 answer
3k views

Tikz with positioning does not work with DVI

I have the following Tikz picture: \begin{tikzpicture} \node (a) {A}; \node [below=2cm of a] (b) {B}; \end{tikzpicture} When I compile this code with PDF-LaTeX, I get the expected result: "B" ...
user avatar
44 votes
7 answers
54k views

Package for pie charts

I want to create a pie chart in LaTeX. Do you know a package which manages that? I tried datatool which uses tikz as backend but seems to be unusable due to mysterious floating point errors.
user avatar
4 votes
5 answers
377 views

How to delete a locally installed version of pgf?

I have a locally installed pgf in my local texmf tree. Now my tex distribution finally caught up and the version of pfg in the package manager is newer than my locally installed version. How can I ...
user avatar
  • 18.7k
2 votes
1 answer
1k views

Problem with installing current version of TikZ.

I have installed Texlive 2010 on Ubuntu 10.10 from .iso image. now I want to upgrade my pgf. After following these steps, I receive this error: ! I can't find file `pgfmathfunctions.code.tex'. l.16 \...
user avatar
  • 2,637
27 votes
2 answers
4k views

Defining a new environment whose contents go in a TikZ node

I would like to define an environment which typesets the contents in a box, and I'd like to use TikZ (I'm aware of alternatives like fancybox). So I would like something like \newenvironment{abox}% ...
user avatar
  • 4,762
3 votes
2 answers
798 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.)
user avatar
  • 36.7k
17 votes
1 answer
6k 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 ...
user avatar
52 votes
2 answers
8k 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 ...
user avatar
6 votes
4 answers
15k 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);.
user avatar
  • 13.8k
342 votes
8 answers
246k 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?
user avatar
  • 10.2k
32 votes
3 answers
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} \...
user avatar
30 votes
6 answers
2k 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 ...
user avatar
  • 61.1k
17 votes
1 answer
10k 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} \...
user avatar
  • 1,797
35 votes
2 answers
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{...
user avatar
  • 85.4k
3 votes
2 answers
268 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 ...
user avatar
15 votes
2 answers
13k 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 ...
user avatar
  • 153
9 votes
1 answer
3k 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 ...
user avatar
  • 1,344
20 votes
3 answers
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 ...
user avatar
18 votes
4 answers
8k 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 \...
user avatar
20 votes
2 answers
6k 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 ...
user avatar
  • 85.4k
17 votes
4 answers
3k 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 ...
user avatar
  • 7,891
20 votes
1 answer
2k 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. ...
user avatar
17 votes
2 answers
15k 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$...
user avatar
24 votes
8 answers
22k 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 ...
user avatar
  • 5,201
2 votes
1 answer
482 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 ...
user avatar
  • 13.3k
18 votes
4 answers
7k 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://...
user avatar
  • 183
9 votes
2 answers
2k 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 ...
user avatar
  • 5,311
19 votes
3 answers
10k 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 ...
user avatar
  • 5,311
8 votes
3 answers
1k 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 ...
user avatar
  • 449
16 votes
2 answers
19k 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 ...
user avatar
  • 3,057
6 votes
2 answers
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 ...
user avatar
  • 13.3k
6 votes
1 answer
655 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)
user avatar
  • 13.3k
28 votes
5 answers
8k 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-...
user avatar
  • 13.3k
3 votes
1 answer
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{...
user avatar
  • 13.3k
24 votes
3 answers
5k 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 ...
user avatar
  • 85.4k
296 votes
7 answers
291k 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 ...
user avatar
  • 3,063
33 votes
4 answers
6k 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 ...
user avatar
  • 463
3 votes
1 answer
612 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 ...
user avatar
22 votes
6 answers
8k 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. ...
user avatar
18 votes
1 answer
25k 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 ...
user avatar
  • 19.1k
8 votes
1 answer
15k 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 \...
user avatar
25 votes
1 answer
15k 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)...
user avatar
  • 642