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)

1
vote
1answer
41 views

Error “Undefined control sequence” when using [remember picture, overlay]

I am using two tikzpicture inside another tikzpicture. I want to draw a arrow from one picture to the other. For that I used [remember picture, overlay] property as shown in the code below. New Code ...
3
votes
1answer
43 views

Conditional Widths in Tikz

I'm trying to make a set of two functions to format quotes within a tikz callout on opposite sides of the page. I'd like to cap the width of the callout at 3in, but my ifthenelse statement is not ...
1
vote
1answer
44 views

A very simple positionning problem using pgfplots standalone geometry and tikz package

I try to find information in the big list of pgfplots question on tex, without success, so this is "one more question" from a beginner about pgfplots, standalone, geometry, tikz combo package. I need ...
0
votes
0answers
22 views

Preview of tikz/pgf in Lyx

I'm using tikz/pgf in Lyx. I included the \usepackage{pgfplots} in my header and the output pdf works fine. However, I'm using Lyx to be able to see a preview of my document as I write. Did anyone ...
4
votes
1answer
57 views

How can I define parts of an expression as a TikZ node?

I want to explain what the different signs in an expression means like this: Currently I do this with TikZ (see MWE at the bottom), making nodes of everyting in the expression I want to point an ...
7
votes
2answers
115 views

Filling a non-convex path in tikz

I am trying to fill a path consisting of two semicircles, and I only want the area between them to be filled. The following code doesn't work correctly. \documentclass{article} \usepackage{tikz} ...
5
votes
1answer
100 views

Determine number of columns in TikZ matrix

Given a macro that accepts a matrix as an argument \newcommand{tabler}[1]{\matrix(m)[matrix of nodes, ampersand replacement=\&]{#1};} I would like to determine the number of columns in matrix ...
10
votes
3answers
323 views

TIKZ mathematical diagram: arrows should have a common source

The following code \documentclass[10pt]{amsart} \usepackage{tikz} \usetikzlibrary{shadows,matrix,arrows} \begin{document} \begin{tikzpicture}\small\begin{scope}[->,shorten >=3pt,shorten ...
2
votes
1answer
49 views

figure 2 for Crossed Ladders Problem

I'd like to draw triangle like the following: but using the following code which produces: The code must represent the structure of the triangle, like that: ...
7
votes
3answers
90 views

How to move tree leaf nodes horizontally after automatic positioning?

I'd like to draw trees like the following: That is, I have edges which are crossing. The tree should be drawn like a regular tree (without crossings) except at the last level where the leaves can ...
2
votes
1answer
40 views

boxes are in the same order in a column

I want to draw boxes as in the picture, but the same order. So i create a table and i add the boxes in the columns of the table but it did not work. Also, I do not want that the texts on the arrows ...
3
votes
1answer
46 views

figure 1 for Crossed Ladders Problem

i would like creat report for the solution of that problem http://math.stackexchange.com/questions/1124801/crossed-ladders-problem so i need to create some figurs with latex to make solution more ...
3
votes
2answers
60 views

Defining styles that provide nested, parameterized styles with TikZ

I want to draw different kinds of graphs which I want to define using styles. One particular graph has labelled nodes, and I want to be able to attach these labels using a custom key (cn). The ...
0
votes
0answers
30 views

Gnuplot for Graphics from Octave. How to set size IN OCTAVE?

I am using Octave for all my calculations and plotting. By telling Octave graphics_toolkit gnuplot I can create a *.tex-document by print -dtikz filename.tex Which I can then use by ...
0
votes
0answers
37 views

TikZiT issues (Mac OS X Yosemite)

I was wondering if people here using the TikZ editor TikZiT are experiencing issues with said tool after upgrading to OS X Yosemite? I can't get it to compile a preview, and I am not able to see the ...
0
votes
0answers
52 views

Problem placing image in a pgfpicture environment

I'm trying to use .pgf file in latex I wrote this simple code in latex: \documentclass{article} \usepackage{pgfplots} \usepackage{tikz} \begin{document} \begin{figure} \centering ...
4
votes
1answer
60 views

TikZ, passing two values as an ordered pair

I'd like to pass two values to a pic code as a single ordered pair. The two values are not related in any way to the coordinate system, so I expect to get the same values whatever the unit vectors ...
4
votes
1answer
62 views

Colors in xcolor and color models

I did an experiment on the different color models available in xcolor together with the predefined colors. I observe that the colors vary alot depending on the color model. WHY? Why does the colors ...
3
votes
1answer
57 views

Vertically align two separate TikZ figures below each other using the subfig package

The following minimal working example does not vertically align two rectangles drawn by TikZ. The result can be found here. Somehow the second rectangle seems bolded, but that is not the case when I ...
0
votes
0answers
36 views

Automatic numbering TikZ figure exported from Geogebra

In my book, I have to draw a lot of figure by Geogebra and then exported to LaTeX. I used to numbering them by a caption below but sometimes I have to add more figures among them, so there is a huge ...
2
votes
1answer
57 views

Place circuit figures side by side in tabularx environment

My MWE, \documentclass[a4paper,11pt]{book} \usepackage{tabularx} \usepackage{tikz} \begin{document} \begin{enumerate} \newcommand{\OOO}[4]{% \begin{tabularx}{\linewidth}{@{}X@{}l@{}} \textbf{A)} #1 ...
5
votes
0answers
50 views

How can I reduce the memory required for following example (nested ‘for’ loops)

I want to plot a convolution of two spectra. The first one is a weighted dirac comb, the second a defined function. To do this I used two nested for loops but the calculation exceed the Tex capacity ...
2
votes
0answers
33 views

mdframed package with tikz rendering lines poorly

I'm using TeX Live 2014 on Windows 8.1, and I'm having some trouble setting up a visually appealing definition environment. I'm trying to use the mdframed package with tikz, and I'm using an example ...
6
votes
1answer
63 views

How to vary distance between siblings in TikZ graph?

The example below renders a simple graph. I would like to branch with 1 cm to the left as default, but to branch a bit further in some cases. Say, I want f to branch 2 cm to the left. How would I do ...
8
votes
1answer
131 views

Visualize singular vector fields with TikZ or PsTricks and friends

I am trying to find a good way to make really visually appealing plots of singular vector fields. For example electric fields of point like charges. I already tried this in python without too much ...
9
votes
5answers
235 views

Can one avoid typing double quotes in this TikZ-involving macro?

I need to draw many similar complicated colored shapes; I made a macro for them, and it works, but to call it I seemingly have to place several color names in double quotes. Can I avoid this? The ...
6
votes
2answers
163 views

Draw tikzpicture in figure caption

I want to make a small tikzpicture inside the caption of a figure, I namely want to create a legend of a plot in the caption. I have read section 4.9.6 Legends with \label and \ref from the pgfplots ...
0
votes
0answers
14 views

tikz driver dvipdfm for positioning

I'm following up this question The provided answer doesn't work with me, Here is a MWE: \documentclass[dvipdfmx]{beamer} \def\pgfsysdriver{pgfsys-dvipdfmx.def} \usepackage{tikz} \begin{document} ...
0
votes
0answers
37 views

Why is the scaled ticks label placed incorrectly?

See the following example, created by matlab2tikz. I removed a lot of lines to simplify the problem. \begin{tikzpicture} \begin{axis}[% width=0.99266\figurewidth, height=\figureheight, xmin=0, ...
3
votes
0answers
33 views

Tikz: Error “dimension too large” when decorating arc

I'm drawing circles with arrows on in 3D. To do this I'm using decorations, and drawing the circles in halves so that I could change the colours later and draw an arrow penetrating them while keeping ...
0
votes
0answers
98 views

How can I draw complex borders around all the pages of a document?

I'm writing a document with the class scrreprt. I would like to draw borders around the pages of the document. I found some examples on how to do this with TikZ, but the borders I would like to draw ...
2
votes
1answer
51 views

plot with tikz/pgf from external txt file with one X axis and several Y axis

I am a very beginner of Tikz/pgf. I have searched quite long but didn't found the answer. How could I plot from an external txt or dat file that with one X value and several Y values? For example, the ...
4
votes
1answer
62 views

Connect parallel lines to node

Sorry guys, I literally can't work out how to do this... Consider the following figure: This is drawn by: \begin{tikzpicture} \begin{scope}[rotate=+60] \foreach \x in {-0.3, -0.2, ...
1
vote
0answers
76 views

Fading along a plot line in tikz

I'm using the following to draw the electron wavefunction around an atom. I'd like to fade out the line towards it's end. I've read all the relevant questions I can find, Any ideas? ...
4
votes
1answer
103 views

Half arrows in graph using TikZ

How can I create half arrows like the colored ones in the answer to this post using TikZ? I know how I can create custom arrow tips, but how can I extend this to the tail of the arrow? I would ...
2
votes
0answers
13 views

Definition conditional on pgfversion [duplicate]

Due to a change in behaviour between versions of pgf, I want to introduce a conditional definition that depends on whether or not \pgfversion >= 3. How can I do this?
2
votes
1answer
67 views

How can I parametrize two tikz circles to fit tufte marginpar?

Ho can I parametrize the circles to fit the tufte marginpar? I want to able to change the sovrapposition of the circles (possibly in ratio from 0 to 1) and get an adjusted \diameter to fit ...
2
votes
1answer
37 views

Nodes put one on top of the other

I am a total beginner in tikz and I am using the following code (slight modification from texample.net) to draw 2 red black trees. The problem I am facing is that both trees are placed one on top of ...
0
votes
0answers
48 views

how can add axes to spy box in latex?

i want add axes to spy box for example on spy box shown interval [-1,1] or interval that zoom in automaticly.please with this code.not change. \documentclass{standalone} \usepackage{pgfplots} ...
2
votes
0answers
60 views

how arrange my data in txt file for plot mesh in latex?

i have a data file and want plot mesh/surface for it but the output isn't suitable. \documentclass{article} \usepackage{tikz, pgfplots} \usepackage{pgfplots} \begin{document} % Preamble: ...
2
votes
1answer
71 views

2 censoring ticks, 2 different colors

I'm trying to create a plot with two distributions, two different censoring points and two different colors. I've managed to create both distributions and give them different colors. I've also created ...
4
votes
1answer
67 views

Coloured shapes inside triangle

How would it be possible to achieve something like the following I attach with TikZ and further to be able to color differently and even put a legend inside each smaller shape?
2
votes
1answer
82 views

TikZ- Filling a circle with a Pattern- Unexpected behavior

Can anyone help me understand why this behavior? \documentclass[journal]{IEEEtran} \usepackage[pdftex]{graphicx} \usepackage{tikz,pgfplots} ...
2
votes
0answers
43 views

How to use variables in calculations when defining a new TikZ command

I'm trying to define a new command to use in a TikZ picture. but it seems I can't work with variables (in this case the \defs) inside the newcommand definition. At least not the way I am doing it ...
3
votes
1answer
49 views

Package pgf Error: No shape named is known

I have encountered a problem Package pgf Error: No shape named is known but, I do not know what's wrong with it and how to fix it? Can anybody help me? My code is as follows: ...
1
vote
1answer
69 views

How to build a shade over more than one rectangle with TIKZ?

i have the following code, thats build a Rubikscube: \foreach \x in {0,1,2} { \foreach \y in {0,1,2} { \path[draw,fill=blue] (\y,\x,3) -- (\y+1,\x,3) -- (\y+1,\x+1,3) -- ...
1
vote
1answer
37 views

How to use optional arguments in newcommand with TikZ in the middle of a path?

I am trying to define a new command that will enable me to automatically format certain parts of my diagram. These parts consist of two nodes added above and below a path. I have a default value that ...
7
votes
3answers
379 views

How to draw stacked cubes of different sizes and colors?

I can (I learned here!) to draw, but I can't change the colors or make several distinct cells. \documentclass[12pt]{article} \usepackage{tikz} \usepackage{verbatim} \usetikzlibrary{positioning} ...
2
votes
1answer
65 views

Selectively boxing and labeling parts of an image

I want to let these boxes and text-labels fade after sometime, as it would lead to unwarranted cluttering in the image. Also, I want to ultimately put the image slideshow as a part of the beamer ...
1
vote
0answers
63 views

How do I use TiKz to draw lines in 3D grid?

I would like to draw this 3D picture using TikZ. Any suggestions?