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
0answers
1k views

Problems by enlarging tex memory [closed]

I have a problem with the tex memory while using pgfplots and a very huge dataset in Ubuntu. Under Windows with MikTeX I have the following settings and the texfile compile without any problems: ...
3
votes
1answer
486 views

Arrow scaling problem. How can I zoom properly a very tiny part of a drawing?

Thanks to this solution, I can draw tangent line to a path. I'd like to zoom a very little part of my drawing. Here it is the code: \documentclass{standalone} \usepackage{tikz} ...
5
votes
1answer
416 views

With TikZ, How do I use a labeled coordinate that's inside a node?

In the following diagram, I'm trying to draw a line from the center of the red dot (inside the blue node) to the green node. The coordinate of the red dot is labeled "thepoint", so this should be ...
9
votes
3answers
355 views

How to learn to create General (Functional) Shadings wifth pgf?

In the section called General (Functional) Shadings in the PGF/TikZ manual, there is an "explanation" of the command to create a general functional shading. The author of this section assumes that ...
3
votes
2answers
1k views

Remove “white parts” of tikz picture

I have a tikz picture, which consists of a visible part on the left side and a white part on the right side (for some constructive reasons). Now I would like to redefine the size so that the new ...
8
votes
3answers
1k views

Cut-off cone in TikZ

How would I draw the following cone using TikZ? I have no clue how to incorporate the "cut-off". I want to draw a picture of the cone given by the points (y, t) for y in R^d and t in (0, infty) such ...
1
vote
1answer
860 views

Migrating from tkz-2d to tkz-euclide

I want to use the example in http://www.texample.net/tikz/examples/morleys-triangle/. I changed the tkz-2d into tkz-euclide (as tkz-2d is superseeded by this package), but tkz-euclide doesn't know ...
8
votes
3answers
1k views

How to draw a circular cone

I want to draw the circular cone given by the equation z²=x²+y². (I do not mind using any given package.) I tried to use the pst-solides3d package with the help of its manual to generate the ...
5
votes
3answers
502 views

Visualization in LaTeX of hamming distance

I have for example the following two strings: 1: 00101101 2: 00100100 I would like that each number will be place in a box and the boxes with the number one should be higher then the ones with ...
7
votes
5answers
1k views

Tangents to a circle from a point outside of it (tikz)

I'm trying to plot in TikZ the two tangents to a fixed circle passing through a given point. In some details, given an arbitrary circle centered at C with with radius r, and a point P outside of the ...
10
votes
1answer
557 views

Automatically add fractions and reduce the result (if neccessary)

I'm trying to figure out how to reduce fractions. Adding fractions is no problem, see this example: \documentclass[parskip]{scrartcl} \usepackage[margin=15mm]{geometry} \usepackage{tikz} ...
0
votes
1answer
1k views

tikzpicture blank in preview

Using preview-latex to preview the tikzpicture environment shows either a blank rectangle in pdf mode or simply produces no preview file in ps mode. I am using aquamacs 23.3a, using auctex and gs ...
12
votes
2answers
762 views

Automatically avoid more than one node when drawing a path

Background Andrew Stacey's answer to Automatically connect nodes without overlapping other nodes or connections presents code to make a path avoid a node by going through a corner of that node ...
9
votes
3answers
681 views

Adding vertical noise to a path

For a presentation I want to make a figure showing a graph of a signal with noise. I draw the signal as curved path \begin{tikzpicture} \draw [thick,blue] (0,0) .. controls +(50:3) and +(160:2) .. ...
4
votes
0answers
170 views

Quote style like on owni.eu [duplicate]

Possible Duplicate: Block quote with big quotation marks How can I reproduce with TikZ the quoting style from Owni.eu http://owni.fr/2011/09/13/increvable-droit-dauteur/ in a environment? ...
6
votes
3answers
519 views

Conditionally including a TikZ figure

I have the following construction for a figure. The background is, when \submit is defined, only the caption is included, but no figure. Otherwise the figure is included. The problem is that I have ...
0
votes
1answer
378 views

Improving code to draw several cycles trigonometric

How can I improve this code to generate three cycles varying the height of the trigonometric tangent? Note that I managed to correctly draw the red line, but could not improve the green line. What I ...
8
votes
2answers
3k views

How to draw a cube with TikZ where all faces have a distinct color?

For each face, to show a distinct color I guess we have to use opacity, but at this point, this problem seemed out of my hand. Could anyone help me out? My attempt \documentclass{article} ...
5
votes
2answers
1k views

node names and nested loops in TikZ

I'm trying to draw a (part of a) lattice. To achieve that I use two nested foreach loops, like this: \foreach \x in {-1, 0, 1} { \foreach \y in {0, 1, 2} { \path node (\x.\y) at (\x+\y-1, ...
7
votes
1answer
4k views

Using the commands \pgfmathparse and \pgfmathresult

How do I use the commands \pgfmathparse {tan (pi/3 r)} \pgfmathresult to draw the green line in the figure below? \begin{tikzpicture}[>=latex,scale=2] \draw circle (1); \draw[->] (-1.2,0) -- ...
5
votes
3answers
291 views

Correcting TikZ code

foreach how to fix the code below so that the center of the figure is at the origin (0,0)? \begin{tikzpicture} \fill[blue] circle (2pt) node[right] {$(0,0)$}; \draw (-3,1) -- (3,1); \draw[blue] ...
30
votes
2answers
5k views

Rounded corners on only one side of a TikZ node

How can I make rounded corners on one side of my node (only right, only left)? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [fill=gray, rounded ...
13
votes
3answers
7k views

Example of fancy table using TikZ package

Can anyone share me several fancy table templates? I want to make this thread like a reference so that each time I need a template, I could just go here. If you can, please provide a screenshot for ...
1
vote
1answer
403 views

tikz — scaling of arrows

I declare a new arrow in TikZ via: \pgfarrowsdeclarecombine{combined}{combined}{latex}{latex}{|}{|} In the first example you see that the left left arrow doesn't end at the coordinate (0,0). How ...
14
votes
2answers
2k views

Export Mathematica 8 plot to TikZ

Is it possible to generate a plot in Mathematica 8 and then somehow export the data so that I can plot it using TikZ? I do not like how Mathematica's plots are rendered and would like to use proper ...
4
votes
1answer
899 views

“rotationally correct” AC source symbol in TikZ

I've been looking for a particular symbol for AC sources (the kind of circle with wavy line) and seemed to have found it here: AC source symbol in TikZ circuits.ee.IEC library. Unfortunately there is ...
6
votes
1answer
831 views

CMYK ConTeXt colors in TikZ

Colors defined via the internal \definecolor macro in ConTeXt cannot be used in TikZ when the CMYK system is used. Is there a way to convert them or tick a setting so that TikZ can use them? Minimal ...
7
votes
3answers
1k views

How do I control how tikzpictures are grouped within figures?

I want to be able to control how tikzpictures are grouped within a figure. I've got several tikzpicture within a figure set to \centering. Is there a way to control how close the tikzpictures are ...
12
votes
1answer
1k views

Automatically connect nodes without overlapping other nodes or connections

In making a tree diagram with TikZ. Say that I've got the following nodes \node(a) {\(A\)}; \node(b1) at ($(a)+(4,1)$){\(B_1\)}; \node(b2) at ($(b1)+(0,-1)$){\(B_2\)}; \node(c) at ...
12
votes
1answer
3k views

How to do something like “inner sep west”? — specify inner sep on just only one side

I'm wondering how to create a node with TikZ which has different inner separations/padding on each side. Imagine something like this: \node [inner xsep=10pt, draw=blue, very thick, rectangle] (box) ...
5
votes
1answer
1k views

How to fill area under plot using a color map?

I have one diagram showing a function f(x,y) like imshow does, and a second diagram that shows the probability distribution P(f). Find below an image of the situation. The code for the plot at the ...
4
votes
1answer
172 views

saving computed number registers for access outside body of “let” operation

Section 14.15 of the PGF manual (pp 150-) describes the let operation. On pg 152 (first example) it is applied to saving coordinate (tuple values) to point registers p1 and p2 using the coordinate ...
6
votes
2answers
2k views

Incomplete \iffalse using pgfmath naming a TikZ node

In trying answer Is it possible to use a macro to name a TikZ node?, I attempted to use the solution provided at pgfmath expansion - call a command from within a pgfmath environment, but this yielded ...
6
votes
2answers
1k views

Section like heading with Tikz

I'm trying to make a new section-like heading with TikZ. I basically want it to look like this (nevermind the funky background): But I can only get something like this: In my LaTeX document I ...
7
votes
2answers
1k views

Position a node a certain distance away from another node at a certain angle in TikZ?

Like the title says, is it possible to position a node a certain distance away from another node at a certain angle from that node?
2
votes
2answers
740 views

Centering ellipses inside a rectangular node

The following TikZ picture consists of a rectangle containing two ellipses. I'm constructing this by putting a TikZ picture environment inside the node of an including TikZ picture environment. I've ...
12
votes
2answers
3k views

How to nest a graph within a node in TikZ and draw edges between the graphs?

I'm trying to draw a graph and have a separate graph within one of the outer nodes. I seen this question, but I don't understand how the matrix nodes will help me. I would also like to draw edges ...
9
votes
2answers
647 views

Is it possible to use a macro to name a TikZ node?

Is it possible to use a macro to name and reference TikZ nodes. For example: \begin{tikzpicture} \node (0) at (0,0) {X}; \node (\mymacro{2}{3}) at (1,2) {Y}; \draw (\mymacro{2}{3}) -- ...
0
votes
3answers
3k views

Margins in \framebox

I have the following code: \documentclass{article} \usepackage{tikz} \begin{document} \framebox{\begin{tikzpicture}[color=black, line width=0.4mm] \draw (0,0) rectangle (5mm,5mm); ...
3
votes
1answer
776 views

pgfplot: Pin drawn on top of ybar stacked plot

I need to label some components of a stacked bar plot in pgfplot, and I would like the pin to be visible to the center (rather than the edge). I believe it is currently being drawn to the center of ...
7
votes
2answers
359 views

How to emphasize within a listing two successive identifiers separated by a space?

I have this pgfplots code that I want to put in a lstlisting environment: \pgfplotsset{ every axis x label/.append style = { font = \small }, every axis y label/.append style = { ...
5
votes
2answers
1k views

Drawing checkered torus (doughnut)

How to draw a checkered torus (doughnut) in LaTeX? I have seen the example of drawing a torus. But I also need to make a $4 \cross 4$ chess board on it. It'll be more helpful if I can also change the ...
5
votes
1answer
977 views

Navigation system coordinates in tikz-3dplot

I am using tikz-3dplot and trying to represent navigation system transformations. In navigation systems, the orientation of the vehicle axis is given in terms of Roll, Pitch and Yaw. These are ...
0
votes
1answer
501 views

How to draw a \mapsto in TikZ?

Does anyone know how to draw a line which looks like \mapsto by using \draw[...]... in TikZ?
7
votes
1answer
2k views

Overlay LaTeX/TeX coding easily on PDF with 300 pages

I've been looking for a way to overlay TeX/LaTeX i.e maths language etc (everything LaTeX is designed for) onto a background document containing 310 pages combined together in a PDF file. So far I ...
2
votes
1answer
1k views

Use of Tikzpicture and Includegraphics

The following codes output only the line but the figures are disappeared. Could anybody suggest how to force both the drawn line and the figures in the output? Many thanks! \begin{figure}[ht!] ...
1
vote
2answers
151 views

Do I have to declare explicitly that point?

I have already defined 2 nodes crect and celli, and I would like to draw a line from crect to the point on the right of celli, it seems that the following does not work: \draw[->] (crect) -- ...
3
votes
1answer
1k views

How to write inside an ellipse in TikZ?

I have drawn an ellipse: \node (elli) [ellipse, minimum height=3cm,minimum width=2cm, draw] {}; I would like to write some elements in it as the figure below shows. The position of the elements ...
12
votes
1answer
13k views

How to make this rectangle a node (TikZ)?

I have drawn a rectangle with a fixed position: \[\begin{tikzpicture} \draw[thick] (3,1) rectangle (5,3); \end{tikzpicture}\] I would like to make it a node with a name (for instance rec), so ...
7
votes
1answer
1k views

Scale tikzpicture to the remaining height of a beamer frame

Often in a frame (of beamer), I have some texts on the top and a resized tikzpicture on the bottom: \begin{frame} \frametitle{...} some texts ... some texts \[\resizebox{!}{???}{ \begin{tikzpicture} ...