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)

2
votes
0answers
70 views

Load Graphics as Empty Boxes for Positioning and Quick Compiling [duplicate]

Is there a package that loads all images (tikz, pgfplots, images, etc.) only as empty boxes? This would greatly speed up compilation of documents when making edits to the content and layout when the ...
7
votes
1answer
456 views

Drawing multiple iterations of cellular automatons inline, possibly with TikZ

I want to illustrate the iterations of a cellular automaton picture-by-picture in some slides. For those not familiar with the topic, imagine a two-dimensional grid of square cells where each square ...
9
votes
2answers
266 views

Strange connection of nodes in TikZ

This question is in connection with Making a family of graphs in TikZ by a few definitions. In the following MBWE lines in the first diamond, that were expected to be vertical, have unexpected ...
3
votes
0answers
542 views

How to fit dot graph with dot2tex(i)

Currently I used the dot -Tpng to include graphs in my LaTeX document. However it produced sometimes suboptimal graphics I wanted to look into dot2tex(i). The problem I encountered is that previously ...
8
votes
2answers
352 views

Coding Dot Diagrams

Is there a way to code a group of dots, where by "group of dots" I mean a solid (or dashed) line enclosing one or more dots? For example, a circle with three identical solid dots (inside) is "a group ...
6
votes
2answers
449 views

Cut bottom of tabular by Zig-Zag pattern (in latex beamer)

I try to present a part of a huge table inside the latex beamer environment. A small part of this table is sufficient to understand what is inside so i decided to indicate the cut-out be a bottom ...
5
votes
0answers
1k views

Fitting TikZ picture in beamer: Difference between using \resizebox and \adjustbox? [closed]

\documentclass[10pt]{beamer} \usepackage{amsmath} \usepackage{amssymb} \usepackage[english]{babel} \usepackage{color} \usepackage{float} \usepackage[T1]{fontenc} ...
5
votes
1answer
370 views

tikz extending spring with constant number of segments

Is there as simple way to create a pdf animation with tikz of an oscillating mass attached to a spring which extends and compresses as the mass oscillates. The number of "spring elements" should be ...
5
votes
2answers
427 views

tikz matrix align/decorate cellpictures

I have a matrix of cell pictures, and want the first column to be right aligned and the second column to be left aligned. However I have trouble using the "nodes" key. example ...
9
votes
1answer
496 views

Drawing little semicircle to show that two intersecting lines are not connected [duplicate]

I want my diagram to show that two intersecting lines are not actually connected, but one passes above the other. The best result I would like to achieve would be a small semicircle as used in ...
5
votes
2answers
198 views

How to provide a mask highlighting an arrow tip over a cluttered background in Tikz?

I have a series of technical drawings that I use for background, highlighting features or adding dimensions and notes with Tikz. In some cases the background is very busy, and arrows tend to ...
8
votes
1answer
299 views

Newton finite differences with Tikz

I am trying to picture Newton's finite differences method with a Tikz tree. Unfortunately, a few nodes are doubled. Is the approach wrong or is there a solution? \documentclass{article} ...
4
votes
2answers
238 views

Making a specific cell of a dynamically generated tikz matrix BOLD

I want to make specific cells of a dynamically generated tikz matrix bold. I have tried many things: \bfseries, \mathbf, \textbf, \bf, using assume math mode=false in \pgfmathprintnumberto ... Here ...
7
votes
4answers
855 views

Tikz: drawing concentric circles with specified origins and the arc that connects the intersections

I would like to draw a few concentric circles with origins of P1 and P2 where all the circles are greater than the minimum distances. The min distances is where the circles will touch at one point ...
4
votes
1answer
321 views

Tikz: drawing an arc without using an angle

Can an arc be drawn without using an angle but two locations? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\a}{2.5} \pgfmathsetmacro{\b}{2} ...
2
votes
1answer
259 views

TikZ and tabular/multicol

I've just finished my first TikZ flowchart, and I have a couple of wished to improve it, but I can't seem to search my way to a solution. I would like do this in 2 colomns, with dashed a line between ...
8
votes
4answers
583 views

Decimal separator and axis label centering with Tikz

The following code creates a figure with Tikz without the use of pfgplots (that I want to avoid here): % compilation: pdflatex --jobname=Runge-f1 Runge.tex \documentclass[12pt]{book} ...
14
votes
2answers
1k views

How to draw an Euler angle rotation sequence with TikZ?

For some lecture notes I want to illustrate successive unit axis rotations using Euler angles. I am quite happy with what I came up with so far: However, I am failing at drawing the angles in ...
6
votes
3answers
1k views

Circular arrow in 3D to indicate a unit axis rotation

I would like to indicate the directions of rotation and symbols used for the respective Euler angles. This would look nice using small circular arrows around the axes, as shown below: In this ...
4
votes
1answer
341 views

pgfplots: using macro for tick label

I would like to use a macro to define the label of an extra tick in a pgfplots picture. When the macro uses a greek character it generates an error: ! Missing \endcsname inserted. Here is my MWE: ...
1
vote
1answer
435 views

Alignement of tikz-pictures and tables in subfigures

Basically, I'm trying to explain the depth-first search. I'd like to align my images in the following manner: I'd like to put two graphs in each single line, with the corresponding 'table' ...
6
votes
2answers
243 views

Tikz: connecting two vectors from the focus of an ellipse to the edge

I would like to draw 2 vectors from the focus to the an arbitrary point on the ellipse (not necessarily arbitrary but if I can see how to do that, I can pick my locations afterwards). The solid ...
5
votes
1answer
308 views

Complex Count in \foreach for number line

I am looking to create simple number lines. I have asked a similar question: Resetting numerical labels in \foreach commands on a numberline. But now I am in a different situation. I know how to ...
4
votes
1answer
451 views

Missing mark at legend for tikz bar chart

I have the following code: \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label First Second Third test 30 30 40 }\datatable \begin{axis}[ xbar ...
5
votes
1answer
389 views

Fibre product in LaTeX

I would be thankful if anyone can guide me in writing commands for a fibre product in LaTeX. I would also like to know how to change the angle of the diagram as I want it to be.
5
votes
2answers
1k views

Probability density function of Uniform Distribution

Can anyone help me about drawing pdf of uniform distribution function in Latex? I am newbie in this and could not find anything helpful. Thanks!
0
votes
0answers
43 views

some PostScript specials could not be rendered (tcolorbox+DVI) [duplicate]

I can't see tcolorbox in DVI file after running LaTeX. The error is "MiKTeX Problem Report Message: Some PostScript specials could not be rendered. Data: Error: /undefined in pgfo Operand stack: ...
4
votes
1answer
1k views

TiKz: Text inside circles overlaps

How can I fit the text squarely inside the circles without it overlapping like this? \documentclass[tikz,border=12pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} ...
0
votes
1answer
136 views

heading breaks with twopage option for book class

I had to switch from oneside to twoside option for book class to get the binding right. Unfortunately this breaks the chapter headings if they land on even pages (on uneven pages the heading looks ...
10
votes
1answer
139 views

Arrows disappear if 0.9999 is replaced with 1 in TikZ

A slight change in TikZ code makes arrows disappear. I want to know what went wrong. Consider the following code: \documentclass[tikz]{standalone} \usetikzlibrary{arrows,decorations.markings} ...
6
votes
1answer
1k views

Setting camera projection angle in tikz to enhance the depth perception when drawing 3D figures

First please see the following example using MATLAB drawing command >>surf(membrane); We can adjust the camera angle using MATLAB's built-in command camproj, the effects are as follows: ...
0
votes
1answer
162 views

How to prevent unwanted cropping in a tikz picture? [duplicate]

I am trying to make a series of engineering drawings with TikZ for an industrial catalogue. I would like to get only the drawings. The following MWE crops the bottom of the picture, and I would like ...
11
votes
1answer
179 views

Draw offset of polylines

I'm afraid that I have a followup question to this one. Consider the following MWE \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} ...
11
votes
2answers
1k views

Tikz and babel error

This code works correctly: \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \tikzset{ every picture/.prefix style={ ...
4
votes
0answers
377 views

Tikz Nodes in margin gets overwritten by page-wide tikz environments

I'm trying to improve the typesetting of openly licensed books created by my company. We do the typesetting of all our books with LaTeX. The design of these books requires coloured environments that ...
11
votes
1answer
372 views

Presumed error of pgfplots in the “cutting” of a surface

I'm struggling with a 3D representation through the use of the package pgfplots. I'm faced with an alleged error in pgfplots (from my point of view). Consider the txt file (which is attached here) and ...
2
votes
1answer
246 views

Tikz: draw a line between nodes in a loop

Code: \documentclass[tikz]{standalone} \usetikzlibrary{positioning,calc} \begin{document} \begin{tikzpicture} \def\names{{"1", "2"}} \foreach \i in {0,1} {% \ifnum\i=0\relax \node (\i) ...
3
votes
1answer
151 views

How to compute a length and set a text width with pgf [duplicate]

Follow up on How to create a shape for commenting a zone on a picture after answer of Claudio Fiandrino. I have slightly modified the code and would like to compute the text width automatically. ...
5
votes
1answer
343 views

Draw box around plot or fill plot area in tikz/pgfplots

I want to create a plot in tikz/pgfplots with a number of \addplot table commands. Each of the tables is the result of a simulation. I need to add a box around each simulation's result or fill the ...
4
votes
3answers
238 views

angled lines of unkown length in TikZ

I am trying to create angled lines from a point to specific border. Here is a minimal example: \documentclass[margin=2mm]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
538 views

Best way to draw a flowchart in tikz

After going through some flowchart examples in tikz and some examples in TexSX, I understand that people generally adopt two techniques to draw flowchart diagrams in tikz Define all types of blocks ...
4
votes
1answer
559 views

Expanding tick marks and labels beyond data set

I am looking to expand the y- and x-axis values beyond the data for visual reasons. I tried to force the ticks and labels, but it did not work. I wish the two axis to start at zero and end beyond the ...
3
votes
1answer
108 views

Hiding Decimal Results from PGF Output

I have this \foreach statement which results in even numbers with decimals. I would like to omit or hide the decimal from the results. How can this be done simply? I have seen a few answers to much ...
2
votes
1answer
333 views

Relative shadow on TikZ figure

Consider the following very nice TikZ drawing of the Sun--Earth--Moon system from Jubobs (see here): Code \documentclass{article} \usepackage{lmodern} \usepackage{tikz} \begin{document} ...
7
votes
3answers
410 views

Drawing a particular part of flowchart in tikz?

This might be simple, but looks like a daunting task to me. The following is a portion of my flowchart roughly drawn in google drawing. The bubbles (actually dots) indicate that there is a ...
3
votes
1answer
177 views

Positioning labels to an existing empty plot using tikz

Can you help me in correctly positioning labels to an existing empty plot using tikz ? My problems are: my labels are too far from the axes; my labels are not centered. Here is the empty plot ...
11
votes
2answers
328 views

How to create commands for automating the commenting process on some zones of a picture

I have a lot of comments to make on different pictures, I can do it with the following command for ex: \begin{tikzpicture} \node[anchor=south west,inner sep=0] (image) at (0,0) ...
9
votes
2answers
1k views

tikz matrix: color entire row

Goal: I would like to color entire rows of a tikz matrix. Background: I did some googling, and I got the following. Debugging: I know what is wrong (it's only coloring the individual nodes, rather ...
0
votes
1answer
217 views

Editing images using TikZ [closed]

Can I edit images from the internet or pdf files (snapshots) using TikZ to get this non blury good quality graphics in my pdf file?
5
votes
2answers
302 views

Highlighting intersections

I would like to highlight the region C in the Euler diagram below. I tried to play around with fill opacity command, but I was not able to highlight C alone. Should I use the intersections libraries ...