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)

23
votes
4answers
2k views

Get derivative of a function

I want to write a macro, which takes a mathematical function as argument and returns a plot using pgfplots of the function and of its derivative. I guess that this isn't possible using just LaTeX; ...
3
votes
1answer
1k views

Problem with pgfmathsetmacro in foreach loop with pgfplots

Any idea, why the following doesn't work and how to fix ist: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
5
votes
1answer
329 views

TikZ: Draw the smallest rectangle containing given points with sides parallel to coordinate axes

I need a TikZ macro to draw the smallest rectangle around a list of points, with sides parallel to the coordinate axes. In a perfect world it would work with any number of points greater than 1, but I ...
3
votes
1answer
301 views

TikZ keys: turn on a feature and set a parameter at the same time

I have a custom shape defined using TikZ. This shape has an optional part; if this is to be drawn, the colour has to be specified. So I'd like to be able to use the following syntax: \node [MyShape] ...
3
votes
1answer
586 views

Customizing arrows with Tikz

I'm working with Tikz package and I want to create a new arrow tip. So I used the following code which I found in internet: \documentclass[a4paper]{article} \usepackage{tikz} \usetikzlibrary{arrows} ...
6
votes
1answer
832 views

pgfdeclareshape with variable dimensions using pgfkeys

I am trying to define some shapes for TikZ using \pgfdeclareshape. I would like to use options to make their size adjustable, however I do not get it to work. This example compiles, but the size of ...
6
votes
2answers
950 views

Color gradient for bars in pgfplots

I want that each bar in my diagram has a color gradient from black to white (from left to the right). However, for the following code, the gradient exists for the entire diagram such that the left bar ...
5
votes
1answer
1k views

How to loop through a list of tikzpicture within animateinline?

I have the following code which uses animateinline and several tikzpicture for it's animation effects: \documentclass{beamer} \usepackage[utf8]{inputenc} \usepackage{tikz} \usepackage{ifthen} ...
4
votes
2answers
1k views

TikZ: Drawing the same data with scatter plots and parallel coordinates

I am new to TikZ and trying to recreate the following image (which was created in R): (Translation: correlation = +1, correlation = -1, two clusters, circle, normal distribution) Each "column" ...
3
votes
1answer
2k views

Help to draw an arrow in TikZ

How to draw a red arrow to make it look like the rest of the arrows in the picture? How to define the parameters for the red arrow: line thickness, width, start and end? ...
3
votes
1answer
292 views

Print macro output instead of executing

I am attempting to debug a Tikz/PGF script. I have a STY file that generates Tikz/PGF scripts, but the output graphic isn't quite what I want it to be. In order to debug the problem, I was hoping ...
4
votes
0answers
2k views

Patterns in TikZ [closed]

I am trying to make a simple TikZ picture consisting of some rectangles with pattern fills. This is roughly what I have added. \documentclass{amsart} ...
7
votes
1answer
503 views

Clash between ocgcolorlinks option of hyperref and patterns library of TikZ

I have stripped down to the following MWE after some experimentation. As it is, it works without any problems. \documentclass{memoir} \usepackage[ocgcolorlinks]{hyperref} \usepackage{tikz} ...
4
votes
1answer
626 views

Neuroscience Graphics with TikZ

Does anyone know of packages for displaying neuroscience schematics with tikz? For example, I would like to place a raster plot next to the diagram of a Markov process to help explain how Markov ...
17
votes
3answers
2k views

Draw a closed liquid-droped shaped curve with TikZ

I am trying to draw a closed liquid-droped shaped curve using TikZ, but I don't know how. I tried to draw it using coordinates but I don't think that this is the solution. I am using ...
4
votes
1answer
3k views

Scaling tikzpicture to fit on page with caption

I have a full page that I have managed to scale down with a \resizebox. Unfortunately, after I discovered this in a MWE, I put it back in my document and the caption is now in the footer... How do I ...
2
votes
1answer
605 views

Trying to import a tikz figure generated by matplotlib2tikz, getting dimension too large for y-axis [closed]

I'm trying to use a graph exported by matplotlib2tikz, with the following code in it: \begin{tikzpicture} \begin{axis}[ ylabel={CF [\%]}, xmin=0.5, xmax=7.5, ymin=0.096, ymax=0.144, axis on top, ...
4
votes
1answer
89 views

Why two macros in intersections are not expancded?

Two path names inside intersections are not working. Only one macro seems to work. I have tries all the combinations of macro expansion but in vain. In the following 'h\x and \vy' is not working. It ...
6
votes
1answer
2k views

Syntax error; pgfuseimage [duplicate]

Possible Duplicate: Include figure (from macro) with underscore in filename I am trying to make first presentation in LaTeX using Beamer environment. In order to include some graphics, I ...
4
votes
2answers
1k views

Drawing conic projection with TikZ

I struggle with drawing a sphere that has a cone set on top of it. What I'm trying to get is something like this: The left cone touches the sphere on one latitude and the right one intersects the ...
4
votes
2answers
283 views

Aligning tikzpicture subfloats that span multiple pages

I have 21 pie charts (generated using pgf-pie) that I wanted to display in rows of 3. The "table" spans multiple pages (which has made it difficult to use the figure or tabular environments). I have ...
4
votes
2answers
551 views

How to draw a generalized Catalan number diagram using TikZ

This question is related to my previous question How to draw a Catalan number diagram on TikZ I would like to be able to draw generalized Catalan number diagrams using Tikz. More concretely, I would ...
37
votes
4answers
8k views

Draw Bohr atomic model with electron shells in TeX?

This question led to a new package: bohr I'm making slides with beamer for my chemistry students. I would like to draw a figure in LaTeX to illustrate the electron shells in the Bohr model but ...
2
votes
1answer
298 views

Problem with simple TikZ plot

I'm trying to make an explanatory graph that boils down to annotating curves between two arbitrarily placed points. My TikZ/Tex code just isn't compiling even though it closely follows the manual; ...
1
vote
2answers
229 views

TikZ whitespace between nodes [duplicate]

Possible Duplicate: TikZ borders showing through when they shouldn't (overlapping circles) Using absolute positioning I can make a nice filled grid: \documentclass{article} ...
5
votes
2answers
2k views

Labeling a circuit element with its symbol and value on both sides

I have modified the circuit code given in Voltage sign convention (European vs. American) in Circuitikz to serve my presentation in circuit making. However, I am unable to change the voltage source ...
4
votes
1answer
615 views

How to highlight a path using TikZ?

Say I have an arrow leading pointing from one node to another node under TikZ. Is there a way to highlight this arrow? I'm looking for a result that looks (more or less) as though I've printed a ...
7
votes
1answer
2k views

Force horizontal edges between nodes in TikZ

In this code: \usetikzlibrary{positioning, fit, calc, shapes, arrows} \renewcommand{\figurename}{Figure} \begin{figure}[!htb] \centering \begin{tikzpicture} ...
3
votes
1answer
362 views

Curve synthesis - Adding many (mostly piecewise linear) curves

It's a follow-up to a previous question. If I could have a macro out of the solution over there, it would have been great but then I couldn't make it. The following code (to be added to the one in ...
15
votes
6answers
686 views

How to change the item separator in TikZ foreach command

I want to cycle over several sentences using a foreach loop. Now sentences will prpbably contain commas, which are used by foreach as item separators. So I would like to change the item separator to ...
7
votes
1answer
1k views

How to have a cross out rectangle in tikz?

I have the following tikz style \tikzset{actor/.style={ rectangle, minimum size=6mm, very thick, draw=red!50!black!50, top color=white, bottom color=red!50!black!20 } } and I would like ...
9
votes
1answer
2k views

Make some extra space when using TikZ fit package

I'm using the fit package to wrap nodes inside a rectangle, as the code shown below. Is there any way to make some extra space between the node client 3 and the bottom edge of the box? Code: ...
6
votes
2answers
2k views

Big block matrix with tikz

I know this is very similar to plenty of questions. The matrix below s actually bigger, so I realized that I had to use tikz. In this array, A, A',…,L', T are square matrices, and I filled with ...
4
votes
1answer
305 views

mdframed+tikz to display overfullrule

This may or may not be a bug, so I'll first ask it here before reporting. In the following test case: \documentclass{article} \usepackage[framemethod=tikz]{mdframed} \overfullrule=5pt ...
3
votes
1answer
1k views

Generating a box inside algorithm in beamer

I would like to create two boxes (or two frames) and one arrow which goes from the center of right side of one box and do half a circle and point on the other box. Below is an example of code: ...
1
vote
1answer
317 views

How to put tikzpicture aligned with the footerline?

I would like to put a tikzpicture near the footer line. The tikzpicture is used to show the page number on top of an image. The problem i am having is the tikzpicture is centered on the footer. ...
6
votes
3answers
466 views

drawing a line without coordinates

I want to draw a line that goes through a point A en B but does not stop at A nor at B. Can anybody help. I want to use it for constructions in optics. \documentclass{article} \usepackage{tikz} ...
19
votes
1answer
552 views

Is there a listings configuration for TikZ as used in PGF/TikZ manual?

I want to create a tutorial how to use TikZ now. Is there a listings configuration for TikZ as used in PGF/TikZ manual? For example, I want to make \ as an integral part of tikz in \tikz, relevant ...
5
votes
2answers
675 views

tikz \foreach dynamic list with environment arguments

I'm making an axis environment that recieves 5 arguments (the first is optional and it's 1 by default). To make the x marks on the x axis I use \foreach \x in {#2,...,#4} {\ifthenelse{\x = 0}{}{\draw ...
3
votes
0answers
44 views

addition in \coordinate [duplicate]

Possible Duplicate: Do I have to declare explicitly that point? How do you define a new \coordinate as the sum of two other coordinates? I often end up with a setting such as this ...
15
votes
1answer
2k views

3d-plane and rotating coordinate system in TiKZ

I am completely new in TikZ (starting today), but I am already amazed with all its capabilities. I would like to draw the coordinate system of a ring (a particle accelerator), showing the three ...
6
votes
2answers
1k views

How to modify a node in TikZ when using beamer's overlays

I have a matrix initialized with some colors and no values. With the help of beamer's overlays I wanted to modify the matrix in the next step, changing some of the colors and inserting some values. I ...
2
votes
1answer
1k views

What is newline symbol in beamer? [closed]

If I use \\ or $\newline$ in beamer inside a tikzpicture, I get the following error: Something's wrong--perhaps a missing \item. \end{frame} What is correct use of it? My tikz code is as follows: ...
9
votes
1answer
259 views

Double 'evaluate' in one PGF's \foreach

percusse may know if I can do the following with \foreach: \begin{document} \foreach [ evaluate=\x as \z using \x*10, evaluate=\x as \p using \x mm*3 ] \x in {1,...,5}{ \endgraf \hskip\p ...
1
vote
0answers
228 views

Drawing multiple lines with TiKz darkens background? [closed]

When I draw multiple lines with TiKz, the background of my tikzpicture darkens (i.e., from white to light gray). Interestingly, the more lines I draw, the more the white darkens. This is the code of ...
8
votes
1answer
520 views

Creating a staircase shaped tableau

I want to create a tableau of vectors in LaTeX, like the one seen on Slide 7 in these slides. But unlike in the slides, I want to have vectors like the one given by the code below \begin{pmatrix} ...
4
votes
1answer
2k views

How do I tell the arrow pointing to my start state to point from up?

I am drawing finite automata in Tex using the tikz automata library. Here is how my figure begins. \begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto] \node[state,initial] (q_start) ...
11
votes
1answer
687 views

Curve synthesis - Adding two curves to get another one

Case 1: Let's say I have a few coordinates (A), (B), (C), (W), (X), (Y), and (Z) (possibily obtained through intersection, rotation, and whatnots). I draw two piecewise linear curves through (A), ...
1
vote
1answer
815 views

hyperref conflicts with todonotes and chemfig packages

I'm using TexLive 2012 from the openSUSE buildservice publishing repository, and a document that would compile with TeXLive 2011 now effects error messages such as: Package PGF Math Error: The ...
2
votes
2answers
1k views

Can I make formulae thicker?

I've just created an SVG version with TikZ and Inkscape from an old PNG version of an image on wikipedia. This is how they look like: You might notice, that the text of the left image is much ...