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)

7
votes
1answer
127 views

Can a transformation be made to apply to the rest of the commands in a TikZ picture?

One nice feature of TikZ is that you can apply a coordinate transformation in the middle of a \draw command (or \path, etc.) and it will automatically apply to the rest of whatever is in the command. ...
17
votes
1answer
2k views

Tikz for large files

I have a question regarding the use of TikZ. I have five large sets of data (15000 points) and I want to use TikZ to plot my data, but obviously the amount of memory isn't sufficient. Can anyone give ...
8
votes
2answers
4k views

lines with variable width in TikZ (to convert handwritten Xournal files to tikz)

I am trying to convert handwritten text or handdrawn sketches to TikZ. Usually the thickness of a pen stroke varies when the writer applies more or less pressure to the surface. I am looking for a ...
2
votes
1answer
961 views

Using a tikz figure in an IEEE paper

I'm trying to include a tikz figure in a IEEE paper. I have the IEEE.cls, and IEEE.bib files in my current directory, but I can't seem to compile with pdflatex. I've used tikz successfully before, and ...
4
votes
1answer
706 views

How to achieve double border line between some columns of tikz matrix?

I've read TikZ matrix as a replacement for tabular which nicely explained how to get table with borders in the first place. Now, I'd like to have let's say thicker border (or double border line) ...
5
votes
1answer
251 views

PGF align plain TeX

I don't get the excepted result with the following code \input tikz \tikzpicture \node[draw,align=center] {Hello \hfil\break World}; \endtikzpicture \bye There is no break after Hello. I don't ...
10
votes
1answer
3k views

drop shadow framed environment using mdframed & tikz

I'm attempting to make a drop shadow environment using mdframed and tikz. So far, I have (perhaps naively) tried \newmdenv[tikzsetting={fill=green!20,drop shadow}]{myshadowbox} I know that ...
16
votes
2answers
2k views

Vertically-centering multiple TikZ pictures, preserving baseline height

I've often need to write out equations between pictures, which are drawn using TikZ. However, to display them properly, I have two requirements: any common features must be on the same horizontal ...
5
votes
1answer
2k views

Transparent background on page 1

I try to include a 'Watermark' in some documents. To achieve that I use eso-pic and tikz. The problem is, that I don't get transparancy in one-paged documents. As soon as the document has more than ...
4
votes
1answer
417 views

TikZ arrowheads to match xy-pic?

I’d like to make arrow tips in TikZ that match with xy-pic’s standard arrowheads. The methods from this similar question look appropriate, but I thought I’d check first: has anyone else already ...
2
votes
1answer
189 views

Why does tikz change the behavior of \vfil on my first page?

Note the way this renders when using pdftex. \input eplain \beginpackages \usepackage{url} \usepackage{color} \endpackages % comment in the following 4 lines % \input tikz % \enablehyperlinks % ...
8
votes
1answer
282 views

An indentation problem with TikZ nodes and foreign document classes (babel)

I'm new to LaTeX and i'm struggling with TikZ, especially flowcharts. I'm dutch and therefor I'm using the documentclass 'rapport1': \documentclass[11pt]{rapport1} \usepackage[dutch]{babel} This ...
1
vote
0answers
635 views

Reproducing a 3dplot example from texample.net using pgfplots: drawing angles with pgfplots in 3d [closed]

I am trying to reproduce the 3dplots example from www.texample.net using pgfplots: So far, I did not come far at all, actually. One problem is that pgfplots does not allow to work in spherical ...
9
votes
1answer
912 views

Can \usepackage{color} and \input tikz work together in Plain TeX/eplain?

I use Plain TeX and Eplain. In my document I'm using both the color and url packages inside the \beginpackages..\endpackages block. Just now I tried adding \input tikz.tex (as the TikZ manual states) ...
5
votes
1answer
144 views

pgfkeys: allowing one key to activate another key

I have two custom keys: key1, which is boolean; and key2, which accepts a value. The idea is that key1 activates a feature, and key2 customizes the feature. However, if key2 is used, I want key1 set ...
4
votes
1answer
1k views

Scaling and positioning TikZ figures in equation environments

I am trying to use TikZ figures as part of an equation, but I am only able make either the positioning or the scaling appear correctly. For instance, giving my figures the correct size using ...
1
vote
1answer
347 views

Japanese tikz-qtree

I'm having trouble using the example code from tikz-qtree to typeset a Japanese syntax tree. Here's my MWE: \documentclass[10pt,letterpaper]{article} \usepackage{xeCJK} \setCJKmainfont{MS Mincho}% ...
9
votes
2answers
239 views

Specify which picture variant to show

Inside a frame I am including a .tex file containing a TikZ picture with several overlay specifications such that they result in 9 variants of the same picture, that is, that frame has 9 slides. ...
36
votes
3answers
18k views

3D bodies in TikZ

Is there like a library that has default geometric figures like the ones shown below. Am not acquainted yet with 3D diagrams in TikZ.
11
votes
2answers
683 views

Can I have a glow around a box in TikZ?

What I was wondering is, if I can have a glow effect for a box I am drawing with TikZ. Neither search here nor the (excellent) TikZ manual returned any results. There is a circular glow option, but I ...
5
votes
3answers
2k views

Ammeter and Voltmeter for the circuit TikZ library

How can I make the Voltmeter and Ammeter symbols look like in the follwing picture using the circuits.ee.IEC library? I just managed to do this: \documentclass{article} \usepackage{tikz} ...
8
votes
1answer
4k views

Circuitikz symbols in TikZ circuit library

Some time ago, I asked about Relationship between tikz circuit library and circuitikz?. wh1t3 wrote: "However, as far as I know there is nothing the circuitikz package does that the TikZ circuit ...
22
votes
1answer
5k views

Global variables for all tikz drawings in a document

Sorry if this question sounds too elementary. I am new to TikZ, although I have experience with LaTeX. Say I have multiple TikZ statements in a LaTeX document like the following: \tikz\draw[line ...
5
votes
1answer
522 views

TikZ: placing a line (transformed into a sinusoidal shape) parallel to an edge connecting nodes

I am drawing a little sketch, where a line enters a circle, and three other lines come out. Above each line, there is to be a tittle sinusoidal curve (almost as if I used a construct like \node (a) ...
7
votes
1answer
739 views

Using \Alph on \foreach loop argument

Here's basically what I try to do: \begin{tikzpicture} \foreach \x in {1,2,3,4,5} { \draw (\x,1) node{\Alph{\x}}; } \end{tikzpicture} However if I do that, I get ERROR: Missing number, ...
6
votes
2answers
556 views

How do I create an algorithmic Tikz code to obtain a list of numbers which is conditionaly defined by a recurence relation?

Suppose, our initials are $a_{1,0}=0$, $a_{1,1}=1$ and $a_{1,j}=0$ for $j<0$. For given an integer $n$, define $$a_{i,j}=\begin{cases} a_{i-1,\frac{j}{2}} & \text{ if $j$ is even},\\ ...
0
votes
1answer
262 views

Different color display between Adobe Reader and Yap

Today I have been realized some drawings for my scientific article using PGF. After converting the DVI to the PDF file I have noticed that my grid which has been supposed to be gray was somewhat ...
4
votes
2answers
924 views

PGF/TikZ Clipping & Drawing: How to customize lines?

I have gotten some undesirable behavior with PGF/TikZ related to clipping and drawing paths with different color, say gray. So I tried with no success to exchange between \clip[draw=gray], ...
3
votes
1answer
1k views

3D plots with pgfplots

I am trying to plot 3D plots with pgfplots. I have started with an example from documentation: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{pgfplots} % ...
12
votes
3answers
2k views

TikZ: placing square brackets (or open rectangles) perpendicular to lines forming a circle?

I am drawing a little sketch depicting an experiment (code below): At the arrows (under % Outgoing lines in the code) to the right I would like to place little rectangles with their long side ...
106
votes
10answers
31k views

List of available TikZ libraries with a short introduction

Quick links: Summary ❧ Intersections library ❧ Arrow tips library ❧ Calc library ❧ Mindmap Library ❧ Shapes library ❧ Paper Folding Library ❧ Chains Library ❧ Shapes library Very often I ...
2
votes
0answers
449 views

TikZ: compiler error for coordinate calculating, calc library [closed]

\documentclass{standalone} \usepackage{tikz,pgf} \usetikzlibrary{decorations.markings,% snakes,fit,scopes,arrows,calc,shapes.misc,positioning,% ...
35
votes
2answers
2k views

How can I draw a cake using TikZ?

It is always someone's birthday. I would like to use TikZ to draw a birthday cake. There are all sorts of cakes. What I would like is a cake that looks nice and tasty. Preferably a cake with lots of ...
12
votes
1answer
3k views

plot within a plot: zoom into a plot so that the magnified part is framed by axis with ticks and tick labels

I want to zoom into a plot much like it is possible by using the spy library but I want the spy-in node to contain its own ticks and tick labels with a finer grid than the original plot. To clarify ...
5
votes
1answer
985 views

Aligning x- and y-axis with lattice points on a graph using PGF/TikZ

This question is a consequence of a previous question that I posted on the group regarding the plotting of lattice points or a trellis on an axis (ref. Drawing lattice/trellis graphs using PGF/TikZ). ...
8
votes
2answers
2k views

Drawing Lattice/Trellis Graphs using PGF/TikZ

I am trying to draw a graph containing lattice points and vectors. I wish it to look something like this: I am not sure how to go about it, however, I would ideally like to be able to use ...
1
vote
1answer
371 views

How can I assign a node name while wrapping minted environment?

I was thinking how can I frame particular pieces of minted environment for beamer slides. I had a choice either to use overlays and split code across several blocks ( Beamer vs. Minted: overlays ) or ...
4
votes
1answer
480 views

Centering text within custom shape

On page 628 of the TikZ manual, it describes how to code the text anchor for a custom shape so that the label text is placed with its centre at the origin. I've done this to create a simple shape, ...
7
votes
1answer
501 views

How to use pgfkeys with “to path”

I'm not sure if the title is correct but I'll try to explain my problem correctly. I always work on the pgfvectorian package and I try to add some useful macros. One of these macros is to place an ...
24
votes
3answers
2k views

todonotes and tikzexternalize

In my document I use todonotes and TikZ/pgfplots. After activating the externalization in TikZ I realized that todonotes are all exported as well (because they are based on TikZ). This behaviour is ...
27
votes
3answers
2k views

Parametrize shading in table through TikZ

I wanted to do some shading in a table according to its values. For example, if you see the table below: a b c d a 90 10 0 0 b 0 80 10 10 c 0 0 95 5 d 0 10 5 85 I want to ...
29
votes
1answer
6k views

Transparent node with opaque text?

Is there a simple way to create a transparent node with opaque text? Preferably without having to use a postaction or redraw the node. In the example below I'd like to achieve the effect of the first ...
8
votes
3answers
570 views

How to make a thick line connect completely with the side of a box in TikZ?

In my figure, I have a thick line that connects with the side of a box. However, the line does not connect completely with the box. Also, the line covers part of the box (which I don't want). So, I ...
13
votes
1answer
2k views

How to change the line width of the lines connecting spies and the spied region

I was experimenting with the spy library. It worked quite well, except for influencing the line width of the spy connections when using the connect spies keyword, or the width of the outline of the ...
11
votes
4answers
882 views

Draw an arc over 360 degrees

I have the following problem with tikz: I want to draw some circular arcs, but unfortunately these arcs have degrees which pass the 360° line. I would like to be able to draw these arcs with one ...
12
votes
1answer
352 views

How to inverse top and bottom ?

I would like to get 100 "above" the radius, if I consider that the radius comes from the center towards the circle. A little example : \documentclass[landscape]{scrartcl} \usepackage{tikz} ...
4
votes
1answer
795 views

Curiosity - 3D animation in TikZ

Is it possible to create animations shown in the link below in TikZ http://ubcsanskrit.ca/lesson2/writingtutor.html to start animation click on any of the letters on the page. I know it may not be ...
30
votes
2answers
925 views

An Example from the Microtype Documentation

While exploring the depths of the microtype package with regard to LuaTeX I came across this innocent looking page 18 from the microtype.pdf 2.5 beta-08. As the blue note in the margins hints a ...
1
vote
1answer
375 views

tikz code doesn't compile when opened after a while

I finished my phd a couple of months ago, compiled it then completely just fine. I opened it today to make changes and during compilation I get error messages about "missing number treated as zero". I ...
9
votes
2answers
3k views

Defining variables in TikZ

I'm trying to define random variables - for example to draw some random points of the form (r,r) when r is a random number. I tried \def\myrandomnumber{rnd}, but that seems to give me a new random ...