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)

5
votes
2answers
903 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
120 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
137 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
145 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
173 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
346 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
343 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
230 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
137 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
292 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
229 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
485 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
487 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
106 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
313 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
367 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
156 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
318 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
209 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
289 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
493 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
299 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
733 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
196 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
123 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
244 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
752 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 ...
8
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
924 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
774 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
441 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 ...
5
votes
1answer
972 views

Tikzpicture and matrix

I want use tikzpicture for draw my matrix, U=[matrix], using this code \begin{align*} U&= \begin{tikzpicture}[decoration=brace] \matrix (m)[matrix of math nodes,left delimiter=[,right ...
6
votes
2answers
2k views

Easiest way to draw a 3d coordinate system with axis labels and ticks in tikz

What's the easiest way to draw a 3d coordinate system in tikz with axis labels and ticks like the following one: Is there any additional package which does this (with adjustable parameters)?
3
votes
1answer
3k views

Plus-minus sign in a circle?

I’m using \oplus and \ominus in a manuscript and I need an “\oplusminus”, that is, a ± in a big circle. Whatever I use will probably end up being published (though maybe only four times in the whole ...
9
votes
2answers
4k views

tikz center node below 2 other nodes

I want to create a node below 2 other node but place it exactly in the middle of the two nodes. Here's what I have so far... \documentclass[12pt]{article} \thispagestyle{empty} ...
3
votes
2answers
369 views

TikZ: Text blocks with minimum spacing AND “preferred” anchor

I'm new to TikZ, and I'm trying to solve a problem which should be easy, I found many related examples but none helped me. Given the following MWE: \documentclass{article} \usepackage{fontspec} ...
4
votes
1answer
156 views

Equal separation between south of one node and north of another

I am new to TikZ and am trying to get these three boxes with equal spacings between the outer frames of the boxes such that the two arrows are the same length. I am going to have a flow chart with ...
3
votes
2answers
141 views

tikzpicture breaking into many pages

I want two put two columns of several images. In order to facilitate the modification of the image number and the style, I have used the command \foreach. My problem that the picture would split into ...
3
votes
2answers
1k views

Set the size of pgf picture?

I have a pgf picture which I insert with: \input{m1.pgf} But the image is too big. Instead of regenerating a smaller image, I'd rather take advantage of vector graphics, and have XeLaTeX scale it. ...
2
votes
1answer
249 views

How to insert N images using TikZ's \foreach?

I'd like to avoid having to copy & paste the same code 50 times in my input file, so I'm trying to use the automation offered by TikZ's \foreach. I do not know why this code generates 101 errors. ...
4
votes
0answers
543 views

PGFPlots pattern bug [closed]

I tried to compile the example in How to combine fill and pattern in a pgfplot bar plot? to answer the question here PGFplots ybar patterns not showing and the pattern doesn't appear when I use ...
7
votes
1answer
674 views

Tikz: precise callout positioning

Code: \documentclass{standalone} \usepackage[utf8]{inputenc} \usepackage[english]{babel} \usepackage{tikz} \usetikzlibrary{positioning,calc,shapes} \usetikzlibrary{backgrounds} \begin{document} ...
7
votes
1answer
95 views

How can I add something to a variable with a number

I currently have an image like this: which is created by the following LaTeX code: \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} ...
4
votes
1answer
349 views

Parallel line segments connecting points in tikz

Assume that we have two coordinates (a) and (b). I want to draw a line which is a parallel translation of the line which connects (a) and (b). I would like to have something like ...
34
votes
3answers
928 views

Why doesn't TikZ's \foreach iterate over the last element of the list?

This code \documentclass{report} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[dashed] (1,-1) -- (1,2) node[above] {$1$}; \draw[dashed] (2,-1) -- (2,2) node[above] {$2$}; \foreach ...