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
37 votes
1 answer
15k views

Add a legend title to the legend box with pgfplots?

I am using the awesome pgfplots package to draw some plots. I usually use \addlegendentry and get a nice default legend box. There are some options for legend box placement and layout (e.g. number of ...
  • 11.6k
5 votes
1 answer
957 views

Placement of tokens in tikz/petri

Is there some easy trick to make \node[place,tokens=3]{} place 3 tokens in a row (and not in a triangle)?
  • 4,814
8 votes
2 answers
2k views

TikZ: Labeling objects and referencing them

According to the TikZ manual I can use name= to assign a label to the drawings, but when I do the following: \begin{tikzpicture} \draw [ blue, thick, name=e1] (10pt,10pt) ellipse (50pt and 30pt); ...
  • 4,131
7 votes
2 answers
1k views

Animated scrolling marquee across an entire page.

I would like to have a scrolling marquee across the entire width of a page. I am intending this for a Beamer presentation, but the solution doesn't necessarily have anything to do with beamer. I ...
  • 4,190
13 votes
4 answers
5k views

Why is this let expression not working in TikZ (calculating a midpoint)?

I have a rectangle in TikZ and the top left and bottom right corners are called (topleft) and (bottomright) respectively. I wanted to have a label midway down the left hand side of the rectangle, so I ...
  • 9,834
14 votes
1 answer
863 views

Resulting document size when Including a graphics file multiple times - pgf vs. graphicx

In his answer to the question Tikz: using external images as building blocks. Stefan Kottwitz says: The pgf way may be preferred if the document size matters and graphics are multiply used or if ...
47 votes
1 answer
22k views

Tikz: using external images as building blocks.

I would like to create a custom vector drawing in Inkscape and then use it many times in many tikz pictures. Is it possible? Should I use PDF or SVG or other output from Inkscape? How to use external ...
  • 8,173
11 votes
2 answers
5k views

Drawing a curve with TikZ

I want to draw something like this using TikZ: I can probably make the curve using controls but that wouldn't allow me to draw the points on it.
's user avatar
88 votes
5 answers
115k views

How to install a current version of TikZ?

TikZ is undergoing lots of development with new features being added, but the versions distributed with standard TeX releases are often a little old. How do I get the latest version? If I want to be ...
  • 85.7k
4 votes
1 answer
581 views

Tikz and enlarging part of the draw. [closed]

I plotted a number of curves on the same figure using tikzpicture. but i am having a problem with enlarging part of the curves on the same figure. I searched for that and i found something similar on ...
  • 41
43 votes
4 answers
7k views

Using TikZ in journal articles

I had not been aware of Tikz before joining this site, but am impressed with what it appears to be able to accomplish. Before I jump in and start learning all about it though, I wanted to see if ...
25 votes
4 answers
7k views

Is there a way to tune ball shading in TikZ ?

I want to create a Go stone in TikZ. "ball color" option in node style is almost OK. Here is my result: But I don't like the stones, they are "too balish". The "reflection" should be less spot-on ...
  • 8,173
40 votes
9 answers
9k views

How to draw triangular grid in TikZ?

Is there an easy way to draw a triangular grid in TikZ, like this?
  • 583
1 vote
1 answer
901 views

Tikz: Strange color change. [duplicate]

Possible Duplicate: Using opacity in TikZ causes strange rendering in Acrobat. This is a nice pice of TikZ for typesetting Go boards (gobans). \documentclass{standalone} \usepackage{tikz} \...
  • 8,173
11 votes
2 answers
2k views

Undocumented useful commands in Tikz

\tikzstyle{...}=[...] This command seems to be extremely useful since it allows to re-use the same style in multiple TikZ pictures. Is is used in a few places in TikZ manual (pgfmanual.pdf), but why ...
  • 8,173
13 votes
4 answers
4k views

Checkers board in TikZ.

What is the best way to draw checker board in tikz? I'm interested in what is the best way to draw many circular pieces on board. (the checker background is not important)
  • 8,173
5 votes
1 answer
3k views

TikZ: How to encapsulate shade in node?

I have this shaded circle: \shade [ball color=black!80!white] (0,0) circle (1); Is it possible to encapsulate it with node style and fixing the circle radius?
  • 8,173
17 votes
3 answers
9k views

Grouping objects and applying operation to the group

Forgive me for my perhaps naive questions, I am beginning to discover Tikz potentials. To ease certain operations as moving objects or transforming them, I want to know if there is a mechanism in ...
  • 4,131
12 votes
2 answers
3k views

How two connect any arbitrary nodes of tree in tikz

I need to be able to connect any arbitrary nodes in a tree to each other. I am using the tree package in tikz to create my tree. I cannot figure out though how to connect to nodes by let say a draw ...
  • 4,131
30 votes
3 answers
8k views

Placing nodes along an ellipse in TikZ

Is anybody aware of a simple way to place nodes at arbitrary positions along an ellipse? Ideally I would want to mimic notation like \draw (0,0) ellipse [ x radius=2, y radius = 1] node[pos=.3] {...
  • 526
4 votes
2 answers
838 views

Source specials for PDF?

Normally I write my LaTeX with Emacs/AUCTeX viewing in xdvi, which has the very nice "source specials" feature that I can hit a key command in Emacs to jump to the current location in the output dvi ...
  • 1,485
7 votes
2 answers
3k views

Subdividing and Filling a Tikz Rectangle

I have two nodes (drawn as rectangles) in my picture, one filled in green, the other red. I wish to produce a third 'rectangle' which shows the effect of splicing these two rectangles and stitching ...
11 votes
3 answers
4k views

How to horizontally draw a line passing through a point A until it reaches the border of a node B using TikZ?

Given point A and a node B with an ellipse shape, how to draw a line from A horizontally until it reaches the border of B?
  • 5,295
20 votes
3 answers
14k views

Why yshift doesn't work in this TikZ example?

Any idea why yshift doesn't work in the following TikZ example? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (2.5,0)...
  • 5,295
61 votes
5 answers
29k views

Script to automate externalizing TikZ graphics

Is there a script to automate externalizing TikZ graphics? (As suggested by Scott here)
  • 16.8k
31 votes
4 answers
10k views

How can/should I include annotated images?

It's often the case that I'd like to include some graphic in a LaTeX document and overlay it with some text or other annotation, maybe including arrows or other simple graphics. The annotations can be ...
  • 11.5k
39 votes
4 answers
12k views

Multirow/multicolumn cells in TikZ matrices?

Is it possible to make TikZ matrix cells span multiple rows/columns, like they can in LaTeX tables using \multirow or \multicolumn? Specifically, I'd like to typeset something like the following in a ...
  • 1,241
26 votes
3 answers
5k views

Rounded corners in TikZ trees.

When I use TikZ tree with nodes with rounded corners, the connecting lines do not touch the nodes (near corners) but end where would rectangle end. Is there an easy way around it? \documentclass{...
  • 8,173
8 votes
3 answers
5k views

How to create custom Tikz nodes?

I don't want to change style only. I want to create node that takes 3 numbers and display them with appropriate decorations. For instance: \mynode{5,6,7} Should display node with "a=5", "b=6" and "...
  • 8,173
53 votes
2 answers
26k views

Aligned equations inside of TikZ node.

How can I create a tree node with an aligned math equations inside? \begin{align} \end{align} doesn't work \begin{minipage}{100} \begin{align} ... \end{align} \end{minipage} Gives a lot of ...
  • 8,173
18 votes
5 answers
7k views

Drawing arrow heads without the tails in TikZ?

I have an ellipse in a TikZ diagram and I would like to indicate a direction using an arrow head, but do not wish to draw the path leading up to the arrow head. I currently have \draw[->] (0,2) ...
  • 9,834
14 votes
5 answers
13k views

Better way to calculate coordinates in Tikz?

I am great fan of pgf and tikz in general to produce great looking figures. But I don't like the amount of time I have to put in to draw a complicated picture, because I have to provide all the ...
  • 303
15 votes
2 answers
6k views

How does TiKZ calculate positioning of picture on page?

I'm trying to use \beginpgfgraphicnamed to externalise some complex figures in a large document, using the latest released version of TiKZ (2.00). This produces standalone PDF images but for me the ...
27 votes
4 answers
4k views

Problem with defining shortcuts for TikZ matrices

For answering a question yesterday I wanted to define a shortcut for creating a matrix inside a tikzpicture. As a minimal example, consider \newcommand\mymatrix[1]{ \begin{tikzpicture} \...
  • 85.7k
25 votes
5 answers
12k views

In TikZ, is it possible to nest nodes?

My use case: I am drawing chemical schemes. Each molecule contains several nodes. However, I also want to put each molecule into a "wrapper" node, so that I can use the usual anchors in combining ...
  • 1,557
2 votes
2 answers
534 views

Meaningful error messages when using LaTeX instead of PDFLaTeX

When I have TikZ images or I include .png graphics, I need to use PDFLaTeX instead of plain vanilla LaTeX. (That is, I need to use PDFLaTeX all the time, rather than just when I want to produce the ...
  • 70.8k
91 votes
5 answers
31k views

How can I create a pdf document exactly as big as my tikz picture?

I often create pictures in tikz that I want to either send to someone, or include in an email. The problem with that is that there is a big white space around and and especially below my pictures. To ...
  • 25.8k
20 votes
4 answers
11k views

What is a good way to draw Dynkin diagrams in LaTeX?

I'm about to start writing something up which includes a fair number of Dynkin diagrams, and I can think of several ways of going about it: Just draw the darn things in, e.g., InkScape, and include ...
  • 1,390
67 votes
11 answers
25k views

How to draw a torus

Is there an easy way to draw a contour image of torus below with tikz? Or for that matter with any other graphics package.
  • 85.7k
8 votes
1 answer
2k views

Automagically externalising PSTricks and TikZ pictures [duplicate]

My thesis currently has a few PSTricks and TikZ pictures. It takes a while to compile over here Scott says he has some scripts to automate externalising TikZ pictures. I'm looking ideally for ...
  • 12.1k
8 votes
3 answers
2k views

How do I create pasting diagrams in TikZ?

I've been toying with the idea of switching over from Xy-pic to TikZ for all of my diagramming needs, but one feature that's very important to me is the ability to create 2-categorical pasting ...
102 votes
11 answers
43k views

How to speed up LaTeX compilation with several TikZ pictures?

The slowest part is a dozen of diagrams in TikZ.
  • 8,173
6 votes
3 answers
2k views

How do I set the minimum width of a subfigure?

I have: \subfigure[blah blah blah.] { \begin{tikzpicture}[/MyStyle] ... some stuff... \end{tikzpicture} } But "some stuff" is not that wide and the text in the subfigure produces a lot of ...
  • 16.8k
140 votes
5 answers
85k views

How can I use \linebreak inside a node, in tikz? [duplicate]

This is my code, which doesn't work: \documentclass{article} \usepackage{tikz} \begin{document} \tikz \node {start\linebreak{}stop}; \end{document} The \linebreak command doesn't work. In order to ...
  • 10.3k
10 votes
3 answers
2k views

Why \linebreak doesn't work when text width is not set? [duplicate]

This is the code I have: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes} \begin{document} \tikz \node[rectangle split, rectangle split parts=2] {first\nodepart{second}second\...
  • 10.3k
13 votes
1 answer
5k views

Aligning matrix nodes in tikz

Another question about aligning nodes using matrices in tikz. Consider the following: \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (...
  • 535
49 votes
3 answers
96k views

What is the correct way to caption a `tikzpicture`?

I have some trees drawn with tikz and I'd like to have some text associated with them. I can use \caption within figure, but not tikzpicture. UPDATE: Thanks for your advice. figure seems to put my ...
  • 591
132 votes
3 answers
148k views

What is the correct way to center a \tikzpicture? [duplicate]

Possible Duplicate: Should I use center or centering for figures and tables? What is the correct way to cause a \tikzpicture to be centered? By default it appears to be aligned with the left ...

1
633 634 635 636
637