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
2answers
457 views

new command, pfgkeys within pfgplots axis environment

I am trying to setup an command to create technical drawing dimensions (inspiration from Dimensioning of a technical drawing in TikZ). I would like to use pgfkeys for that, in order to pass multiple ...
2
votes
0answers
226 views

Scatterplot with TikZ/pgfplots [duplicate]

I have 7 *.txt files each with 2 columns of data thus: time(mins) contacts 3.25 8 1.166666667 4 3.2 6 3.2 7 2.25 8 5.466666667 12 2.25 3 2.166666667 7 I'd like to plot them in separate ...
7
votes
1answer
5k views

How to position one node relative to another node at a certain angle in TikZ taking the nodes' size into account?

I asked a question before about how to position a node relative to another node at a certain angle in TikZ, and the answer I got there was that you can use the \path (node1) ++(angle:distance) node ...
5
votes
3answers
473 views

let operation vs tkz-euclide

Before put my question to give some explanation of why I do this question. When I started to use the TeX a matter of luck that I started working with LaTeX (xelatex) and not with LuaTex for example. ...
2
votes
1answer
489 views

bodegraph package just display grids but not curves

I'm using pdfLatex (with --shell-escape option) and I had a problem of compilation with TexWorks that was successfully solved with the help of other post in this site: bodegraph on Ubuntu 10.04. ...
0
votes
1answer
235 views

Stacked chart in TeX (added up line loads)

I've got a problem with finding the correct way or commands to make a nice plot in TeX, even with some basic experience in pgf/TikZ. Imagine a weight distribution with start- and stop values and a ...
2
votes
1answer
2k views

Figure in beamer moves around

This is a MWE of my code: \documentclass{beamer} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \mode<presentation> { \usetheme{Frankfurt} \usecolortheme{dolphin} } \begin{document} ...
11
votes
3answers
503 views

arc that passes from (B) having a center on (A), automatically calculates (AB) distance

I want to create an arc which automatically calculates the distance (AB). Inspired by page 58 at pgf manual. But the code block % \draw (H) ++arc (15:60: $ (A) ! - ! (B) $); does not help much. ...
3
votes
1answer
284 views

Problem with snake ticks in pgfplots for bell shaped normal distribution

I want to draw two sided created region for normal distribution (see figure below). I have issue with snake ticks proper alignment and area looks suspicious to me. Am I missing something here? Any ...
2
votes
1answer
280 views

Create standalone pictures

I am trying to write a sample code to be used as a template to generate pictures that will be latter included in a paper. At this stage, the pictures are only plots. I have the following code. But it ...
9
votes
2answers
1k views

Fading of horizontal lines is impossible?

The path fading option in TikZ is obviously not working for horizontal lines. For plotting constant functions as well as for drawing a line between two points. Making them slightly tilted solves the ...
0
votes
0answers
78 views

TikZ coordinate calculation: Package tikz Error: + or - expected [duplicate]

TikZ calculates correctly the projection of a point and also draws it correctly, however after compiling LaTeX displays 2 error messages which I can not fix. Could you help finding what am I doing ...
5
votes
1answer
3k views

External graphics and tikz externalize won't work together

I am using the tikz library external a lot and with success - so far. Now, I need to import an external file (eps, png, pdf... I don't care), and add the axes. I know I can do this with \addplot ...
5
votes
1answer
3k views

Tikz externalize: use external PDF or render by tikz, do not create external PDF

I have texlive 2012 and tikz. Is it possible to get the following behavior? With external library to tikz, use external image, if it is available. However, if it is not available, render the ...
3
votes
1answer
313 views

Producing TikZ-made .pdfs and using /includegraphics on them?

I'm helping TeX a professor's handwritten notes for publishing/pre-print purposes, and for producing certain graphics, I use PGF/TikZ. However, it seems he is having trouble compiling the code ...
10
votes
1answer
4k views

TikZ \foreach loop evaluate variable using pgfmath function

I have problem with defining a new variable within the \foreach loop using the evaluate option using a pgfmath function: \documentclass{article} \usepackage{tikz} \begin{document} ...
9
votes
3answers
1k views

TikZ Venn diagramm

I'd like to make this Venn diagram using TikZ (or otherwise at your discretion) based on this post so far I have this, which looks even worse than a powerpoint attempt \documentclass{article} ...
32
votes
1answer
1k views

Helping cardinals elect the new Pope

Yes, we are talking about TeX and friends! Edit: I decided to move the background motivation to the end of the question, since it seems to be kind of off-topic in the TeX context. The following code ...
1
vote
1answer
143 views

How to prevent evaluation of function in tikz

I have a bunch of TeX code for precalculus and calculus. The pictures are in tikzpicture environment. In our project we want to create TeX file on the fly and compile three times. The compilation is ...
9
votes
2answers
3k views

TikZ scope options not working

Consider the following code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \begin{scope}[fill=red, draw=green,text=blue] \node[fill=red, draw=green] at ...
17
votes
2answers
301 views

Does a single \path for drawing a series of geometrical objects make the compilation more efficent?

The TikZ syntax is so liberal (as mentioned in the documentation) that makes me a bit confused with which I have to adopt. Best practice is really my main consideration in coding anything. I have no ...
17
votes
2answers
800 views

Is it possible to create an adaptable golden ratio frame around equations?

I would like to create special frame around my equations. This frame should obey to the golden ratio rule. This means that its width divided by its height should give 1.61803398875. If possible, the ...
7
votes
1answer
386 views

How can I keep my TikZ overlay picture on the same page?

I needed to draw squares to highlight submatrices and I found on the internet (perhaps here) a snippet that uses TikZ. By the way I found that if the math expression is at the end of the page, the ...
14
votes
2answers
702 views

Complicated tikzpicture for theorem of multivariabe continuous functions

I'm attempting to construct a tikzpicture that looks like this: Here's what I have: \documentclass[12pt]{article} \usepackage{amssymb} \usepackage{amsmath} \usepackage[english]{babel} ...
2
votes
2answers
852 views

venn diagram with TikZ

I'd like to create this Venn diagram in LaTeX (possibly with TikZ): Could you point me in the right direction? I've seen lots of Venn diagram examples using TikZ but none with concentric circles.
12
votes
2answers
673 views

pgfplots: get color setting from table

I want to plot multiple lines using pgfplots. Each of the lines should have a color, depending on the group it belongs to. In the example attached, a table is provided, containing all the ...
3
votes
2answers
1k views

tikz plots alignment

I'm trying to produce a figure using \begin{figure} \centering \makebox[\columnwidth]{\input{try1.tikz}} \makebox[\columnwidth]{\input{try2.tikz}} \end{figure} The files try1.tikz and try2.tikz ...
6
votes
3answers
693 views

How to place text and image above the exact subfigure?

I want to draw something like this: I am able to draw like this: This is the code for the same: \documentclass{article} \usepackage{tikz,subfig} \begin{document} \begin{figure} \centering ...
5
votes
1answer
3k views

How to draw horizontal(row) legend without the surronding rectangle?

I found the following code to manually draw legend, but it produces vertical(column) legend. How to draw it horizontally? I don't want surrounding rectangle also. \documentclass{article} ...
4
votes
0answers
212 views

PGF: Externalize + Fadings differences in viewer [closed]

I've been working with the fadings library in PGF and I was having trouble getting it working with externalize. I finally figured out that it was working, but Apple's Preview does not display the ...
7
votes
3answers
2k views

line passing through a point and extending

What if I only want to extend the line 1cm in one direction but not the other? I found this on another post here from a year ago. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} ...
4
votes
2answers
1k views

Filling between an ellipse and a line

I want to shade from the line QV to the edge of the ellipse. How can I do this? \documentclass[11pt]{article} \usepackage{amsmath, amssymb, eucal, yfonts, setspace, sectsty, enumitem, amscd, ...
6
votes
3answers
569 views

How can I reduce the repeated code with these tikz nodes?

This relates to an earlier question I got an answer to the first part and followed some links for the second and came up with a mishmash of code to get it doing what I want but I didn't understand ...
1
vote
0answers
1k views

“dashdotted” command not working for tikz package [closed]

I am trying to create pictures of graphs in TikZ in which I'd like some edges to be dashdotted. I am using TeXShop on both my office computer (Mac) and my personal laptop (Mac), and the file is ...
4
votes
1answer
3k views

Background image from tikzpicture does not fit the whole page

For a poster, I would like to have an image fill the whole page. This image is supposed to be drawn within a tikz environment as my other content. However, graphicx seems to fail at rescaling when the ...
9
votes
1answer
588 views

How to switch x- and y-axes?

Is there a simple way to switch the x- and y-axes, so that the x-axis becomes the vertical axis? \begin{tikzpicture} \begin{axis} \addplot+[domain=0:10]{1.2*0.000001*(0.2*(x*1000)^2 + 700*x*1000 + ...
6
votes
1answer
806 views

drawing water particles in a water column - tikz

I am trying to generate a figure that shows various water particles in a water column where the particles are moving chaotically driven by the cooling and heating of water. So far I have generated an ...
3
votes
0answers
917 views

How to draw clipart icons in tikz? [closed]

Is there a way to draw clipart icons in tikz? Or is there a way to export them or should I use some other software for this purpose? I want to draw the following 5 icons:
4
votes
1answer
936 views

How to manually draw horizontal legend and place it correctly in tikz?

This is my tikz code to draw some plots. \documentclass{article} \usepackage{tikz,subfig} \begin{document} \begin{figure} \centering \subfloat[Iteration Domain for a Tile]{ ...
3
votes
2answers
1k views

How to ensure equal font sizes in all included TikZ/pgfplots figures?

I would like to have many tikzpictures in my document. Since each tikzpicture has its own size, I don't know how to manage the font size among all the pictures. Some of tikzpictures are of size ...
10
votes
2answers
467 views

Confusion regarding strings and numbers in tikz

I'm using a macro that uses \StrBetween from xstring It seems to be working great. However, when I try to use a value that it returns as a coordinate in a tikz picture, I get a confusing error. ...
7
votes
2answers
638 views

how can I fix my tikz circle to do what I want

Below is the minimal example of my code. I would like the dotted line to stay within the circle rather than overshooting it like it currently is but I am not able to figure out how this can be done. ...
5
votes
1answer
161 views

How to use tkiz point from two different nodes on separate axis?

I know I need to use the x from the counter node and the y from the rectangle node, but so far the right syntax has eluded me. Green indicates what I'm trying to fill, and red indicates the where the ...
3
votes
1answer
247 views

Switching from PDFLaTeX to XeLaTeX is messing with my pgftext coordinates

I'm working on a template for an automated report (using knitr). I created a title banner for my organization using TikZ; the last step to finish the branding was to switch to my organization's fonts. ...
10
votes
1answer
748 views

how to get x,y and z components of a coordinate?

I would like to be able to use x, y and z components of a defined coordinate in TikZ to reuse the values somewhere else in my code. For example, let's have something like, \coordinate (p1) at ...
8
votes
1answer
1k views

tikz and tables: node increases row height

I'm trying to add arrows to a table in my beamer presentation using the package tikz. Because I don't want the table to look different from the other tables in the presentation, I didn't use \matrix ...
2
votes
1answer
294 views

Need help making a data table from \plot function in Tikz

I want to be able to generate a list of points from a plot in Tikz, with an adjustable interval and range for the x-values. So basically something like this: ++++++++++++++ + + + ^ ...
24
votes
2answers
5k views

Dotted lines in TikZ with round dots

Well, the title explains all, I guess. Sorry if this is too simple for all the TikZ gurus here: but I want a dash pattern like "dotted" for drawning but with round dots and not the little squares. How ...
1
vote
0answers
36 views

Referencing nodes in matrix of nodes does not work in beamer [duplicate]

When using node coordinates in a matrix of nodes in the article document class, the following code works well and soes exactly what it is supopsed to: \documentclass{article} \usepackage{tikz} ...
13
votes
4answers
2k views

tikz apply fill between two lines

Simple question: Is it possible to fill the following shape: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{documet} \begin{tikzpicture} \draw ...