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
6 views

How to supply marker options such as rotate to \pgfuseplotmark?

I want to use a marker style for a node, so I'd like to have a bit of code like this: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{plotmarks} \begin{document} ...
1
vote
0answers
10 views

hobby: trouble getting tagency information at a point to affect drawn path as expected

Consider the minimum not working example here: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{tikz} \usetikzlibrary{calc, hobby} \tikzset{ tangent/.style ...
0
votes
0answers
13 views

Line Arrows for Tabular Integration Table

I've recently reviewed this question to try to make a table for Integration by parts: Tabular integration by parts I tried using the code sample from it but LaTeX gives me a rendering error with ...
1
vote
1answer
11 views

hobby: TeX capacity exceeded (parameter stack size?) error, when using tangency information at a point to draw a path

I am getting a TeX capacity exceeded error when running the following example code (which comes from the answer to this question: \documentclass{article} \usepackage{lmodern} ...
2
votes
1answer
19 views

hobby: using tangency information at a point when drawing paths

Consider the following minimum not working example, where the first figure is drawn using "standard TikZ" methods, and the second using the hobby package: \documentclass{article} ...
2
votes
0answers
27 views

Correct way to make command defined in tikzpicture environment (in an example) available in all documents?

The wonderful answer to the question Easy curves in TikZ shares some code that is defined inside a tikzpicture environment. I share the relevant portion of the answer here: Here is a slightly ...
4
votes
1answer
60 views

TikZ: how to refer to only one component of a defined coordinate?

I made a picture showing Newton's method in action: \documentclass{article} \usepackage{lmodern} \usepackage[T1]{fontenc} \usepackage{tikz} \usepackage{graphicx} \begin{document} ...
1
vote
3answers
69 views

TiKZ: place shortened arrow between every pair of points in a draw statement?

What is the simplest and most direct way of creating a sequence of arrows, like \begin{tikzpicture} \draw[->] (0,0) -- (1,0) -- (2,0) -- (2,1) -- (1,1) -- (0,1) -- cycle; \end{tikzpicture} so ...
4
votes
1answer
59 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 ...
4
votes
1answer
62 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 ...
2
votes
1answer
53 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
26 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
60 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
126 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
117 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
331 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
54 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: ...
8
votes
3answers
119 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
42 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
49 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
61 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
34 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
40 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
54 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
62 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
68 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
60 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
37 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
58 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
52 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
35 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
67 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 ...
9
votes
1answer
138 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
238 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
167 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
16 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
39 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
35 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
101 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
64 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
77 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
105 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
68 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
38 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
49 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
61 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
72 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?