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
607 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. ...
2
votes
1answer
338 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
2k 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
2k 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 ...
10
votes
4answers
5k 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 ?
4
votes
1answer
248 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} ...
2
votes
1answer
98 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
628 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
22 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 ...
3
votes
1answer
129 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) ? ...
11
votes
2answers
588 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. ...
3
votes
1answer
340 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
263 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 ...
14
votes
2answers
568 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
487 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 ...
3
votes
1answer
376 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
230 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 ...
3
votes
1answer
457 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
339 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} ...
2
votes
2answers
241 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
114 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 ...
5
votes
1answer
203 views

Wrong positioning of month label tikz calendar

I have the following code: \begin{figure}[t] \centering \begin{tikzpicture} [every calendar/.style={ month label above left, month ...
2
votes
1answer
117 views

placing invisible links at certain coordinates?

Does anybody know if this is possible using TikZ? I'm trying to create links over a picture that i have layed on the background of a frame or at least placing them on some nodes in a TikZ code.
2
votes
0answers
249 views

Why arrow head not shown for this code? [closed]

\begin{tikzpicture} \tikzstyle{every node}=[draw,shape=circle]; \node (v3) at (4, 0) {$v_3$}; \node (v5) at (2, -2) {$v_5$}; \draw [->] (v3)--(v5); \end{tikzpicture} The above code gives me: ...
8
votes
1answer
259 views

pdflscape and tikzpagenodes problem

I am having problems getting the tikzpagenodes package to work with the pdflscape package. I want to access the nodes (current page text area) and (current page marginpar area) when rotating a page to ...
4
votes
2answers
741 views

Draw a grid for obtaining coordinates to pass to includegraphics' viewport option

I want to include only parts of an image. For this, I use the viewport option of graphicx's includegraphics. To find the coordinates, I go by trial and error, adapting the viewport argument until I ...
4
votes
1answer
831 views

tikzpicture vertical line from one node to the other [duplicate]

Assume there are two nodes A and B, with B below A. These nodes are of different width. Connecting A.south to B.north results in a slanted line. I wonder how I can connect A.south to B with the ...
2
votes
1answer
639 views

Blurry Show Background

I am trying to create a frame for each of my figures. Something's like this - a plain white rounded rectangle with a blurry shadow. Could this be done in latex? Could you show me how?
6
votes
1answer
1k views

SWOT Matrix using TikZ

I am trying to draw a SWOT matrix using TikZ. Clearly the procedure that I present in the MWE is not optimized. Also the text (namely on the left side) is not correctly aligned. ...
4
votes
2answers
1k views

tikz - trapezium node - fix angle and height, adjustable width

Using TikZ, I want to draw trapezium nodes all of which have a fixed height and angle(s), but whose widths vary. I can't find any combination of parameters that does what I want. Specifically, with ...
5
votes
1answer
254 views

How to eliminate spacing in tikzpicture?

It seems that, when using Tikz, nodes and/or the tikzpicture environment add space around a drawing. An example is shown in the following MWE, where a simple square is drawn three times. First it is ...
1
vote
1answer
530 views

Disable “clip” and “use as bounding box” in TikZ

Problem I use a tool which generates TikZ-Code (R with tikzDevice, to be precise). But the generated picture has a wide white border which I want to remove. When I manually (or with a script) remove ...
7
votes
2answers
626 views

Is it possible to load a TikZ library locally?

Is it possible to load a TikZ library and make it local to a tikzpicture? I'm writing a long document, and feel like the different TikZ libraries required for different diagrams are "littering" the ...
2
votes
2answers
519 views

Displayed Math in tikz-cd diagrams

I have been using tikz-cd package to produce diagrams however I'm not finding a way to use displayed math within it. My point is that when I use the product sign for instance inside of it, it simply ...
0
votes
1answer
265 views

How to get horizonzal alignment right for nested rectangles?

I know that nesting tikz pictures is considered bad, but I did it anyway as I don't want to mess around with manual positioning. I'm nesting several rectangles similar to another question for circles. ...
9
votes
1answer
288 views

Setting weekend background color

I'm making a calendar in LaTeX with tikz-pgf and I would like to set to gray the background color for the weekend. In the examples I found on the Internet and in the documentation, I can see how to ...
3
votes
1answer
236 views

TikZ arrow tip is displaced

My quetion is twofold: 1) I want to have a timeline graph with some intervalls. This is my code: \draw[->|] (8,5)--(10,5); \node[] (sh4) at (9.5,5.5){$s^{\text{h}}_{4}$}; \draw[|<-] ...
15
votes
1answer
216 views

Is there a nag package for TikZ?

It turns out that I've been using several deprecated commands, such as \tikzstyle and right of. Is there any way to have TikZ or pdfLaTeX warn in those cases, such as nag does?
6
votes
1answer
398 views

Adding a normal vector to a curved mesh area

How can I put a normal vector on the outer blue mesh? TeXample \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{amsmath} \usetikzlibrary{arrows} ...
6
votes
2answers
512 views

TikZ matrix decoration

What I'm trying to achieve is a code structure to draw this kind of diagram: I need to decorate a two-rows matrix grouping one or more columns with a square bracket above them, and then again with ...
1
vote
1answer
847 views

opacity and shading of an ellipse

I am making a picture of the tidal force effects on the Earth. My current picture is decent but I would like where the bulging occurs on the edges to be little bit darker in blue, but I don't want ...
5
votes
2answers
347 views

How to use declared TikZ functions in \foreach condition?

How is it possible to use a declare function in the condition of \foreach? Here's my MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[declare function={a = 0; b = ...
7
votes
1answer
431 views

How to shade a line and how to offset a line?

Newbie here. Could anyone tell me how to (1) shade a line and (2) how to offset a line? I have a very simple graph, This is a mesh used in finite element analysis, I have already used tikz to build ...
3
votes
1answer
358 views

Automated table for excercise points in tikz

I'm a computer science student. And I write most of my excercises in LaTeX. So I often have to create a table for excercise points, with different numbers of excercises and different amounts of points ...
11
votes
1answer
547 views

How to draw an unbalanced curly brace in TikZ?

How can I draw curly braces where the "pinch" is not in the middle of brace, i.e. one of the "legs" is longer than the other, using TikZ?
1
vote
1answer
1k views

Adding coordinates to grid in tikz

Is there a simple way to add coordinate (left and bottom) to the grid in tikz?
0
votes
0answers
40 views

How to draw \leadsto line? [duplicate]

I wish to replace straight line with the \leadsto line. I tried \draw[leadsto] (s2)--(s3); however it can not work. Below is my code \documentclass[tikz]{standalone} \usepackage{tikz} ...
6
votes
1answer
1k views

How to make a zero-size node?

How can I make a node with zero size and node distance, such that a node that is positioned to the right of it lies on the same spot? My solution to the first node in a node-drawing loop was to start ...
2
votes
1answer
97 views

How to refer to the corner of a node?

Is there a node suffix for the corners of a node? I'd like the brace in this example to go from the lower-left corner of the first box to the lower-right corner of the last. ...
2
votes
0answers
26 views

node at sloped path and/or not respecting every path/.style [duplicate]

I'm producing a schematic Nyquist plot, and I want to create an arc between the x-axis and a straight line, which should be denoted PM (phase margin). I use the intersections library to find the ...