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
1answer
358 views

Independent Columns Environment

I am creating a two-page syllabus with a tikz calendar in the left column and all of the content on the right side of the page. Currently the right content is just like a normal article class document ...
9
votes
1answer
2k views

Aligning a Tikz Picture in line with the surrounding Text

I'd like to align a Tikz Picture in line with the surrounding Text. Here is a MWE Example: \documentclass[a4paper,10pt]{article} \usepackage{tikz} ...
3
votes
1answer
263 views

Problems with nested comments and figures

Now this problem is probably too localized, but I do not see anywhere else to get help solving it. I have a large amount of important files, and these stopped compiling after switching from MikTex to ...
4
votes
1answer
162 views

Random scale of square makes a rectangle

Why does this code generates a rectangle, not a square? \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[scale=rnd] (0,0) rectangle (1,1); ...
9
votes
1answer
110 views

Defining and passing arguments

I would like to pass the arguments ->,line width=1.2pt to command \draw [] ... However, this does not work \newcommand\newstyle{->,line width=1.2pt} \draw[\newstyle] Is there any way to ...
1
vote
0answers
43 views

pgfplots: How to change the alignment of one single node [duplicate]

Possible Duplicate: How to display labels on points of a tikz plot I plot a scatter plot using pgfplots and automatically label every single mark with its description. When two marks are ...
16
votes
3answers
2k views

How can I know the default PGF line width?

Is there some macro that will tell me what the default PGF line width is? I have tried creating my own macro by cloning \pgflinewidth before it has been modified, i.e. ...
3
votes
1answer
765 views

TikZ edge thickness causing errors in foreach loop

I'm experiencing some weirdness in making a simple TikZ diagram (a comb-shaped graph with variable number of nodes). The weirdness comes from the style applied to the edge paths. Here's the ...
5
votes
2answers
1k views

PGFPlots: line opacity gradient?

Imagine a very simple PGFPlot, e.g.: \begin{tikzpicture} \begin{axis} \addplot+[no marks]{x^2}; \end{axis} \end{tikzpicture} How can I have the line "fade out" from the left to the right of the ...
14
votes
3answers
3k views

Plotting parametric curves

I am trying to plot some parametric curves, however I always get an an error saying "Dimension is too large". Is there any way to fix this? \begin{tikzpicture}[scale=.2] \draw[very ...
8
votes
1answer
404 views

Error when creating a surf plot with matlab2tikz

I'm using matlab2tikz to generate the tikz code for my figures. When compiling the document with the figure code as below, i get an error: Package pgfplots Error: No such element: ...
2
votes
1answer
557 views

is it possible to include tikz picture from a file

I have a tikz picture in a tex file \begin{figure}[ht!] \begin{center} \resizebox{.4\textwidth}{!}{\begin{tikzpicture}[ .... \end{tikzpicture}} \end{center} \end{figure} The ... portion is quite ...
5
votes
1answer
339 views

Automatic generation of tikzfading

I have a question similar to TikZ Fading Speed and defining a fading-style directly in the fill command but I can't figure out how to get a nice solution. I would like to, given a list of increasing ...
7
votes
2answers
797 views

TikZ/PGF: Simple function is not plotted. Where is the mistake?

I'm just starting to learn TikZ/PGF. I would like to draw a simple function, f(x) = x² to start with. \documentclass{article} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
11
votes
2answers
1k views

Custom shapes in TikZ

I am trying to define a new shape in TikZ following the instructions of section 75.5 of the manual. Reading the question Drawing mechanical systems in LaTeX, I started to think that a "mechanical" ...
16
votes
2answers
2k views

Use a custom shape as a “building block”

I want to create a custom shape (not a big one) and use it in custom places. The shape is a camera and is quite simple: \draw [fill=black](0,0) -- (2,2.5) -- (-2,2.5) -- cycle; \draw ...
5
votes
1answer
244 views

Auto Generate Table with Tons of + and -

i want to create a table containing lots of "+","-" and "0", which depend on the column and row number by (quite simple) mathematical formulas which are known to me. I could enter the signs by hand ...
7
votes
1answer
161 views

TikZ: Access coordinates of decorated paths?

Is it possible to access the coordinates of the decoration of some paths? I draw two paths, e.g., with: \begin{figure}[t] \begin{tikzpicture} \draw [red,decorate,decoration={crosses, ...
6
votes
1answer
239 views

how to split a rectangle?

I hope somebody can help me. I am search for a split of a rectangle like this: \node[rectangle,draw,minimum width=3cm, minimum height=3cm] (rec) {}; \node[name=v1,minimum width=3cm * 0.16cm] at ...
6
votes
1answer
3k views

3D surface plots in TikZ

I need to plot a surface plot using TikZ. I have the (x,y) coordinate and the corresponding function value in a table form. I have not done 3D plots before in TikZ and hence I would appreciate any ...
6
votes
2answers
594 views

How to draw saturation symbol inside a node in TikZ

I'm working on a block diagram using TikZ. I'd like to create a symbol like below, which means I have to draw 5 lines inside a node and write a letter in the upper-right corner. What's the best way ...
6
votes
2answers
2k views

Curves in polar coordinates

Why there are different units used for rectangular and polar coordinates? \begin{tikzpicture}[scale=2] \draw[->] (-1,0) -- (1,0); \draw[->] (0,-1) -- (0,1); \draw node [red] at (-1,.25) ...
12
votes
1answer
471 views

tikzpictures give huge pdf files when processed via dvips and ps2pdf

I have written a paper that includes a couple of TikZ pictures and submitted it to a (Springer) journal. I was quite shocked when I got the pdf file they produced from my source file, since it was ...
6
votes
2answers
162 views

Filling an area in a graph positionned with the positionning library

to me the following MWE should work: \documentclass[a4paper,11pt]{article} \usepackage{xunicode}% for XeTex! \usepackage{fontspec}% for XeTex! \usepackage{xltxtra} % for XeTex! ...
13
votes
1answer
1k views

Embedding python in tikz

I just discovered the python package, and I'm trying to use it in Tikz code. Unfortunately, this doesn't work: \documentclass[oneside]{memoir} \usepackage{pgfplots} \usepackage{python} ...
13
votes
1answer
486 views

Moving tiles of the pattern in TikZ

One of the problems with patterns is that you never know how individual tiles are going to be laid over the area. E.g. if you use star pattern, sometimes stars on the left side of the area shall be ...
3
votes
1answer
276 views

how to set the location and font size of the graph?

Now I write some code to draw the graph. However, the graph is too large, I just want to put it in the left half of the document. So how to set the font size and location of the graph? Also, I want ...
8
votes
1answer
698 views

How to generate many anchors inside \pgfdeclareshape?

In defining a new shape with \pgfdeclareshape, I have problems to add many anchors with the \foreach statement. Each anchor is defined with three arguments. In the example, the argument #1 is OK but ...
4
votes
3answers
913 views

How to draw bigotimes and diamond with tikz?

I want to draw two figures using tikz. One is bigotimes and the other one is diamond, as you can seen in the picture below. But I don't know how to draw them. Could someone help me?
1
vote
0answers
641 views

is there a package to draw graphical models? [closed]

I would like to draw a few graphical models in latex. Is there a package that does that well? I found the following package: http://www.mpi-inf.mpg.de/~dietz/probabilistic-models-tikz.zip but the ...
3
votes
1answer
472 views

I want to draw block diagrams,what's wrong?

I want to draw the circuits below, however, the code doesn't work. would someone help me? \documentclass{article} \usepackage{tikz} \usetikzlibrary{circuits} \usepackage{verbatim} ...
3
votes
1answer
1k views

LaTeX TikZ - auto resize block to fit text

I got this kind of code in LaTeX using TikZ: \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{document} \tikzstyle{block} = [draw,rectangle,fill=blue!50,text ...
9
votes
1answer
1k views

Comma in the formula in tikz

I'm trying to compile a picture with the following formula in the label \begin{tikzpicture} \node[label=left:$f_{23}(r(x_2,\tau)) $] (F012) at (0,2) {}; \end{tikzpicture} However, every time I put ...
34
votes
2answers
965 views

How to make a diagram composed of superimposed layers where the viewer can make each layer visible or invisible independently of the other layers?

This question led to a new package: ocgx (I have edited the question as ocgtools looks like it is the right package to use, rather than animate.) I am trying to use LaTeX with the TikZ package ...
16
votes
4answers
14k views

How to draw an ellipse?

As I know, I can draw a circle using: \draw (1,0) circle (2) I try this kind of method to draw a \draw ellipse, failed. Would you tell me how to draw a ellipse? What's wrong with the code below? ...
3
votes
1answer
552 views

use tikz to draw a rectangle enclosed by an oval

I use the code below to draw a rectangle enclosed by a oval, however it doesn't work. \documentclass{beamer} \usepackage{tikz} \usepackage{animate} \usepackage{fp} % parameterized tikz graphics ...
3
votes
1answer
193 views

How to force the alignment of a macro-generated TikZ picture?

I am a beginner in LaTeX, trying to use it for industrial documents. The code below draws a series of mechanical keys, whose geometry and color codes are defined by a standard. However when I place ...
6
votes
1answer
384 views

Making a box in beamer — circling nodes

Is it possible to make a box around two nodes in a tikzpicture? Specifically, I am making a 2 by 2 box, and I have some labels outside of the box. For example, I have a + and a 0 in the same row ...
0
votes
0answers
54 views

Installing TikZ and PGF for WinEdt in Windows 7 [duplicate]

Possible Duplicate: How do I update my TeX distribution? I have tried to follow http://www.texample.net/media/pgf/builds/pgfmanualCVS2012-05-18.pdf to install TikZ and PGF for windows, but ...
1
vote
0answers
76 views

how to install Tikz and PGF on WinEdt6.0 [duplicate]

Possible Duplicate: How can I manually install a package on MiKTeX (Windows) Now I want to use Tikz and PGF, and I referred this instruction How to install a current version of TikZ? ...
1
vote
1answer
273 views

making a box in beamer — adding labels diagonally

I would like to add a label that is diagonal to the following box, underneath the n', such that it is horizontally just below the box. Basically, I would like to "subtract" the difference between the ...
3
votes
2answers
271 views

Numbers as markers with \foreach and additional macro based on counter

First issue I would like to plot several curves using the \foreach command and have their number in the sequence as markers. Here is the code I came up with : \documentclass{article} ...
6
votes
2answers
759 views

Coil path decoration without straight segment

When a path is decorated in TikZ, a straight line segment might be added at the end, depending on the length of the path. This is undesirable in some cases, and a very nice versatile resolution for ...
5
votes
2answers
298 views

making a box in beamer — center aligning the title

I want to center align the word prediction in the following. I would appreciate any help in doing so. \documentclass[professionalfont, fleqn]{beamer} \usepackage{tikz} ...
2
votes
1answer
331 views

making a box in beamer — pausing within frame to show new content using only

I am trying to use the only<1>, only<2>, etc... feature of beamer for a frame. However, when add it to the program, it is not compiling. I would appreciate any help. Also, how can the ...
12
votes
2answers
598 views

How to improve the creation of repeating patterns with TikZ?

I am a beginner in LaTex, trying to use TikZ to draw a series of RF cables for industrial documents. On the MWE below, I cannot find a way to prevent overlapping the threads of the braid while ...
5
votes
1answer
441 views

When to use TikZ styles?

I planned to illustrate how a quadtree data structure I'm using is implemented, showing all internal pointers and arrays. The image will look something like this: (Here, if a pointer points at the ...
8
votes
2answers
629 views

How to make inner and outer regions transparent?

The white regions are required to be true transparent (preserved in both PDF and PNG). How do you do this in TikZ or PSTricks? The following diagram is just an example for illustration.
3
votes
1answer
455 views

Making a table as a box in beamer in whch 2 cells are highlighted

I am trying to make a table similar to: How to construct a confusion matrix in LaTeX? I prefer to do it in tikz. I would also like to highlight 2 cells in the same row or 2 cells in the same column ...
14
votes
1answer
18k views

How to draw circle, square, and triangle marks in TikZ picture?

The below is part of my TikZ picture: \begin{tikzpicture} \draw (0,0)--(10,0); \filldraw (0,0) circle (3pt); \end{tikzpicture} I want to place a "square mark" to denote the point at (10,0). How can ...