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)

8
votes
1answer
294 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
832 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
314 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
253 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
566 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
2k 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
339 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
424 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
240 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
304 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
427 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
378 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
131 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
138 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
161 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
178 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
369 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
369 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
242 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
149 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
330 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
236 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
524 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
545 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
327 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
401 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
176 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
326 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
216 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
299 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 ...
4
votes
4answers
543 views

Tikz : node filling with text

Here is a minimal working example %!TEX TS-program = xelatex \documentclass{article} %%%%%%%%%% % Colors % %%%%%%%%%% \usepackage{xcolor} \definecolor{green}{HTML}{C2E15F} ...
3
votes
2answers
334 views

Position TikZ node relative to bounding box of overall picture

I would like to draw some points in TikZ, and position them relative to the bounding box of the overall picture. Specifically, I would like to give their y-coordinate explicitly, and have their ...
4
votes
1answer
811 views

tikz markers in a math equation of a node

I realize this is almost certainly impossible; however, I would love to see the TeX wizardry hidden here (and I actually also really desperately want this feature). So I have a tikzpicture, and ...
3
votes
2answers
203 views

tikz dim all colors

In tikz, is there a way using a scope environment of some form to "dim" a group of elements? By "dim", I mean that for every color (be it stroke, fill, or font): I want the color (R,G,B)!x to be ...
3
votes
1answer
129 views

tikz viewport/clipping

So I'm building a "flipbook animation" using tikz. Where each tikzpicture is a single page, and objects should be aligned across different pages. Now, the problem I'm running into is -- depending on ...
5
votes
1answer
256 views

Clashing multirow with tikz

In order to get a diagonal line in a cell, I picked up a piece of code from Diagonal lines in table cell The code adapted to my situation works fine until I decide to use multirow. Here is the MWE. ...
2
votes
2answers
825 views

Blockdiagram with dsp library

I am using the dsp library, http://www.texample.net/tikz/examples/fir-filter/, to create a blockdiagram. Now I got 2 problems. I defined two labels, r and d_i however they are not visible on the ...
9
votes
3answers
1k views

draw Fourier Series Expansion with tikz/pgfplots

This is a MATLAB code T=0.3; A=0.3; t=0:0.01:4*T; n1=length(t); N=100; s=0; signal=0; for i=1:n1 s=0; for n=1:N s=s+A*4/(pi*(2*n-1))*sin(2*pi*(2*n-1)/T*t(i)); end signal(i)=s; end plot(t,signal); ...
18
votes
2answers
1k views

Drawing a polyline between two nodes in tikz

I am a beginner with tikz and finding the following really difficult to do. I have defined and drawn node1 and node2 in tikz. You can figure it out easily from the picture. What I intend to do is ...
7
votes
1answer
854 views

Styles in TikZ trees not working as expected

I want to draw a "cut-out" region of a tree, and visually underline this by having dashed edges on top and on the bottom of my diagram (to symbolize the levels further up and further down). I am ...
9
votes
1answer
476 views

Generic point labels in pgfplots

I have loads of pgfplots which have one thing in common, they all containt one or two addplot with four points that I want to label with the same labels, namely: \tau_c= n \theta. Lets for simplicity ...