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)

26
votes
4answers
1k views

Can fuzzy borders be added to external pictures programmatically?

In my opinion, external pictures are often more pleasing to the eye on a white background when they have fuzzy rather than "sharp" borders. For instance, compare this to that Adding fuzzy ...
1
vote
0answers
109 views

Issue with PGFPlots text [closed]

I'm trying to generate some plots using TikZ, with the following code: It's not about babel, fontenc, or inputenc; I've tried removing them to no avail. \documentclass[a4paper]{article} \usepackage{...
6
votes
2answers
676 views

Scaling the sieve of Eratosthenes in TikZ

Consider the following code, taken from Alain Matthes' answer here. Code \documentclass{article} \usepackage{tikz} \makeatletter \pgfutil@ifundefined{pgfmath@function@isprime}{% \newif\ifpgf@...
3
votes
2answers
2k views

TikZ picture positioning in landscape

I wrote a large game tree (using automata package) and need to display it in landscape mode. I already tried to use both textpos and geometry (newgeometry command) packages but without any positive ...
11
votes
1answer
2k views

Computing value using pgfmath for use in coordinates?

Why can't I use the outcome of using pgfmath in a TikZ coordinate? Here is a (minimal) example that does not work: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}...
9
votes
1answer
595 views

Connecting nodes with brace in TikZ

How would be possible to put a brace instead of a "line" connecting nodes and add some text above it with TikZ?
2
votes
1answer
644 views

coordinates, nodes and arrows in tikz

I like the idea of defining a bunch of coordinates and then creating the desired diagram from them, but now I have the following problem. The MWE below demonstrates it: the arrows connecting the two ...
3
votes
2answers
705 views

LaTeX - PGF groupplot - polar axis

I can't find the answer anywhere, is it [and how] possible to make a group plot of multiple polar graphs? For grouping, I use pgf.groupplot library, for polar axis, I use \begin{polaraxis} from pgf ...
3
votes
2answers
1k views

Contour integrals

I checked this post in here Drawing complex integration but what I want is draw the one that exclude zero and negative real numbers instead of positives. I tried to play around with the code in the ...
14
votes
3answers
1k views

Drawing a 3D cone

I want to create some thing like this , but instead of a box, I use another object (a dog silhouette). Here is what I have so far \begin{tikzpicture} \begin{scope}[scale=0.25, xshift=70, yshift=...
7
votes
1answer
3k views

Change TikZ nodes color to grayscale

Say you have some code like this: \documentclass{standalone} \usepackage{tikz} % \PassOptionsToPackage{monochrome}{xcolor} \begin{document} \begin{tikzpicture} % \selectcolormodel{gray} \node[...
1
vote
1answer
177 views

How to set the distance between to subfigures each with a tikz-pic inside?

My code is as follows. I want to increase the distance between the two diagrams: \PassOptionsToPackage{usenames,dvipsnames,svgnames,table}{xcolor} \documentclass [11pt,a4paper] {article} \usepackage{...
1
vote
1answer
570 views

Using Tikz Fit to draw a node covering a Tikz chains

A chain of nodes is drawn using tikz chains. I would like to draw a rectangle node covering the chain nodes (or, multiple rectangle nodes covering subsets of them). I am using tikz fit. ...
2
votes
3answers
379 views

Adding nodes to specific positions and without circles around them(but only labels)

Based on a previously asked question by me I already have the following code: \documentclass [11pt,a4paper] {article} \usepackage[usenames,dvipsnames,svgnames,table]{xcolor} \usepackage{amsmath,tikz} ...
13
votes
1answer
952 views

How to vertically center the \vdots in this node?

I'd like the \vdots in this chain to have the same distance to both of the arrows. I know that I could manually shift the node so that it looks right, but there must be a better solution. How? \...
6
votes
4answers
2k views

Brace diagram in TikZ

I apologize if this has already been covered in some other posts, but I couldn't find it anywhere and I'm not even sure if "brace diagram" is the correct name in English. I have found some examples ...
4
votes
1answer
2k views

Put numbers in legend using pgf pie

I would like to have the numbers that are inside the pie chart to be in the legend. How can I make that happen? Here is the MWE: \documentclass{article} \usepackage{pgf-pie} \usepackage{tikz} \...
3
votes
1answer
1k views

How to put nodes or rectangles inside a node?

I've created a chain of nodes. In each of those nodes, I want to put other rectangles with text inside. This is how I want each chained node to look like (please excuse my touchpad drawing): I ...
17
votes
1answer
1k views

Brackets around matrices in TikZ

I'm writing a custom package for labeled matrices using TikZ. I noticed an inconsistency in TikZ. This is best illustrated with the following MWE: \documentclass{standalone} \usepackage{tikz} \...
3
votes
0answers
889 views

“No shape named intersection-1 is known” error in TikZ [closed]

I want to draw a circle with arrows ending not perpendicular but straight on the surface. I managed so far to draw the paths I need and I already read about the naming of paths, but I get an error as ...
2
votes
1answer
179 views

What packages do I need to learn as developer to learn LaTeX?

I am a web developer and I often have the need to convert the the webpage to pdf. I have just discovered latex and pretty much liked it. But as there are many packages available , I am not into book ...
4
votes
1answer
347 views

Autoconnecting tikz-matrix nodes

I have this flowchart: \documentclass[tikz]{standalone} \usetikzlibrary{shapes,arrows,matrix,decorations.markings} \begin{document} \tikzset{ base/.style={draw,minimum width=2cm,minimum height=1cm}...
7
votes
1answer
3k views

Horizontal alignment of text nodes of varying length in Tikz matrix like in Tex tabular

In tablular, we use {r|c|l} to define alignment. Is there anything similar for Tikz matrix. For example, by using matrix, the following MWE produces matrix of nodes, which appear to be center aligned ...
3
votes
1answer
581 views

Create a banner for section style

I am wondering if there is any way to change the default style for sections. I would like to create a banner (across the page) with a dark-gray background and the section title in white. It would be ...
29
votes
6answers
2k views

Design of an asteroid belt in TikZ

How can I construct an asteroid belt in TikZ? That is my question: I get everything right, but I do not know how to make the asteroid belt. I have no code to add besides the preamble with TikZ ...
2
votes
1answer
602 views

Pgfplot figure off-center

I create a tikzpicture in standalone mode (see code below). Then import the resultant .pdf file into my document via \includegraphics (see pic). However the axis labels are cut off and part of the ...
11
votes
2answers
827 views

How can I improve those voltage annotations

In France, we draw an arrow above or below a dipole to represent the potential difference between its two poles. I'm trying to automate this using the ideas of the tikz circuits library (not circuitz)....
3
votes
1answer
783 views

Draw an automaton with more states and bent arrows

I want to draw this automaton: But I drew it with a bad way !! \documentclass{article} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} \begin{...
0
votes
0answers
181 views

Create automata with LaTeX [duplicate]

I failed to create this automata with LaTeX: \documentclass{article} \usepackage{pgf} \usepackage{tikz} \usetikzlibrary{arrows,automata} \usepackage[latin1]{inputenc} \begin{document} \begin{...
4
votes
1answer
950 views

Model Railway planning

As there are so many fancy things which are able to do with LaTeX, is there a possibility to create layouts for model railroads? I know only special (mostly Windows) programs, to do that, e.g. http://...
2
votes
1answer
475 views

tikzpicture and pdf - x axis partially disappears

I would like to know why the x axis partially disappears, given the following code. Is it a PDF problem? Also, is there any option to connect the midpoints automatically but not in a smooth fashion? ...
7
votes
1answer
4k views

How to change xticklabel or yticklabel style to Percentage?

When using tikzpicture in the pgfplots package, how can I change use PERCENTAGE for xticklabel or yticklabel. Here is a simple example: \documentclass[a4paper]{article} \usepackage{pgfplots} \...
4
votes
2answers
4k views

Referencing TikZ matrix nodes and drawing

I'm struggling with a matrix where I want to put drawings into the cells, but would still like to reference the cells as it is possible with (text) nodes, e.g. for annotation. I know that I can ...
16
votes
5answers
11k views

TikZ editor for Mac OS

I'm looking for an editor like tikzedt for Mac OS X. Or something similar in order to write and see quickly the result. Any suggestion ?
7
votes
1answer
441 views

Transparency group and decoration markings

How can I set the transparency so that the arrow belongs to the same transparency group as the path? \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{...
2
votes
1answer
129 views

How to have 2 lines in a block?

I'm using the schemabloc package, and I want to have 2 lines of text in a bloc... Diode under Protection, and Oscillator under Boost in the following example Here it is: \documentclass{article} \...
5
votes
1answer
982 views

Preview TikZ figure in AUCTeX?

I am using AUCTeX on Emacs. Recently I began to draw pics using TikZ, but the problem is AUCTeX doesn't generate preview of this environment. (However, it does generate preview for the general figure ...
2
votes
0answers
26 views

How to refer to a relative position within a node? [duplicate]

I've included an external image in a TikZ diagram as follows: \node (A) {\includegraphics[width=4cm]{image.png}}; The image is 100x100 pixels, and I need to draw a path from pixel (64,32). Is there ...
4
votes
1answer
180 views

Options passed to a path inside insert path style

Is there a way to give to the \path (inside mypath style) the options given to the \draw and \fill commands (ideally, the path should be drawn and red then filled and blue) ? \documentclass{...
15
votes
2answers
1k views

Intersection of 2 lines not really connected in TikZ

In the code below I repeat one line (one with opacity=0 and other without it) in order to draw the intersection of 2 lines that are not connected. I am seeking a better way to achieve the same result. ...
4
votes
1answer
793 views

How to increase numbers precision in TikZ histogram

I entered fixed point numbers in the following code: \begin{tikzpicture} \centering \begin{axis}[xbar,bar width=0.2cm,legend style={at={(0.5,-0.15)}, xmin=0,xmax=0.8,anchor=north,legend ...
5
votes
1answer
324 views

Creating borders within the specified margins

I've been trying to get borders for specific pages for my thesis, using tikz. Unfortunately, the borders exceed the margins specified, and since I have to submit a bound copy of the thesis, this is ...
16
votes
2answers
961 views

How to turn off an environment (e.g. tikzpicture) for faster draft compiling

I'm currently writing my thesis and have been looking for ways to speed up compile time. I can shave off a lot of time by using draft mode so that images aren't processed, but I have several TikZ ...
5
votes
2answers
888 views

Argument to \input or \include statement?

I produce a lot of plots in Matlab which I export to TikZ with matlab2tikz. In matlab2tikz I can specify the plot width and height, for instance. This works out quite nicely, but as I write my ...
4
votes
1answer
798 views

How to avoid superfluous space in the initial state of a tikz automaton

When drawing tikz automata, I always omit the inital text and only use an arrow to indicate that a state is initial. To this end, I add \tiksset[initial text={}] to the preamble of my tex file. ...
1
vote
0answers
231 views

Drawing lozenges in Tikz [duplicate]

I'm creating a simple flowchart using Tikz, and I'd really like the "decision" nodes to be lozenge-shaped (think "tilted parallelogram") rather than square, in order to fit text better. Here's a ...
4
votes
1answer
628 views

tikz day list calendar to show only Sundays

I would like to create a list calendar of days showing only Sundays, and be able to annotate the day as well. The following loathly hack sort of approximates to what I want, but has a number of ...
10
votes
1answer
470 views

tikzmark position erratic in overprint environment of beamer

My aim is to highlight a term in an equation, and draw an arrow pointing to another one. Here's my code \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows,calc,tikzmark}%decorations....
2
votes
2answers
316 views

Tikzpicture horizontal alignment with to[grid with coordinates]

I'm trying to align horizontally three grids, two of them in one figure. Below is the sample code: \documentclass[twocolumn]{article} %% ---------------------------------------------------------------...
2
votes
1answer
130 views

TikZ object misaligned with main document: slightly shifted to the right

The TikZ picture is not aligned with the main content of the document. It slightly shifts to the right. Notice how the words go outside the frame on the right side. Any hints on how to correct this ...