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)

4
votes
1answer
502 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
238 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 ...
9
votes
1answer
2k 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 ...
15
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
1k 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
355 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
183 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
215 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
488 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 ...
8
votes
1answer
680 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
134 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
870 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
321 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}% ...
8
votes
2answers
217 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. ...
28
votes
3answers
11k 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
580 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 ...
4
votes
1answer
1k 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} ...
7
votes
1answer
3k 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 ...
17
votes
1answer
3k 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
442 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
563 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
515 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
235 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
618 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
1k 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 ...
75
votes
10answers
17k 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
311 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,% ...
33
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
2k 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
713 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
1k 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
303 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
450 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, ...
6
votes
1answer
454 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 ...
20
votes
3answers
1k 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 ...
26
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 ...
19
votes
1answer
3k 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
456 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 ...
11
votes
1answer
977 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
668 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
289 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} ...
3
votes
1answer
645 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
833 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
335 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 ...
7
votes
2answers
2k 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 ...
5
votes
1answer
1k views

Decorating (with random steps) a filling pattern

\fill[pattern=north east lines] (A,B) rectangle (C,D); How to make so that the stripe the pattern creates is of style decoration = {random steps, segment length = 0.5mm, amplitude = 0.15pt}
3
votes
2answers
440 views

Why is tikz so much slower when plotting a huge amount of data than WYSIWYG plotting tools?

I was wondering why a tikz/pgf plot of a data file containing several thousand data points needs a couple of minutes to compile while creating the same plot with a WYSIWYG plotting tool (like Grace) ...
7
votes
3answers
799 views

Help on TikZ diagram

I'm very sorry about dull question, but I am totally confused by TikZ. Would anyone help me to draw following diagram, please? What I've done so far is as follows. \documentclass{article} ...
11
votes
1answer
3k views

TikZ Styles that set Nodepart Styles

In the following, I'm using user-defined macros to set the type style for the nodeparts for class nodes (\texttt{\textbf{#1}}), interfaces (\texttt{\textit{#1}}). Using the \tikzset command I also ...