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)

7
votes
1answer
109 views

How can I add something to a variable with a number

I currently have an image like this: which is created by the following LaTeX code: \documentclass[varwidth=true, border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usepackage{...
4
votes
1answer
453 views

Parallel line segments connecting points in tikz

Assume that we have two coordinates (a) and (b). I want to draw a line which is a parallel translation of the line which connects (a) and (b). I would like to have something like \drawparallel{a}{b}{...
34
votes
3answers
1k views

Why doesn't TikZ's \foreach iterate over the last element of the list?

This code \documentclass{report} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[dashed] (1,-1) -- (1,2) node[above] {$1$}; \draw[dashed] (2,-1) -- (2,2) node[above] {$2$}; \foreach ...
10
votes
3answers
2k views

Drawing of Sun–Earth–Moon system

Is there a package (or packages) for drawing the Sun–Earth–Moon system with either PSTricks, TikZ, or some other vector graphics language to illustrate Lunar and Solar eclipses, the phases of the Moon,...
4
votes
1answer
402 views

PGFplots calculations at coordinates and rescale the axis

I need to redraw some plots using PGFplots. For those plots I only have the eps file. With Inkscape I could generate a tex code and grab the points listed in the MWE. However, in the plot, the x-axis ...
9
votes
0answers
934 views

How to automatically generate Venn diagrams given the inclusion relations? [closed]

I'm writing a paper about classes of formal languages, and I'd like to have a diagram showing their heirarchy. Something similar to this (from Wikipedia:) Is there a LaTeX package which, I can give ...
8
votes
1answer
974 views

edge direction changed by adding '-latex' option

The following is one example to illustrate my point. The two edges differs in the '-latex' option. How come this option will affect the direction. As I understand it, this option just change how the ...
10
votes
2answers
359 views

Multi-line box around a sentence in a paragraph

I am trying to draw a polygon box around a sentence within a paragraph. This box would wrap over multiple lines and terminate exactly at the end of the sentence (i.e. without white space filling the ...
8
votes
1answer
425 views

proper tool for charts in tex

I have scanned data graphics in a large ms written in TeX (of course). For copyright reasons I need to redraw these. My publisher may (sadly) decide not to use my source directly, so will need access ...
4
votes
2answers
519 views

How can I force a TikZ background pattern to be underneath nodes? (using layers)

I am drawing Simon Dik's Functional Grammar Model Overview using TikZ, but I have run into a stumbling block. It is a design flaw on my part, and I would rather not redesign everything. The box called ...
0
votes
1answer
773 views

PGFplots ybar patterns not showing

I have a bar plot graph and I want to use patterns to fill the columns. However it seems that patterns are not working. For compiling I use pdflatex or lualatex. I also wanted to use pattern width ...
1
vote
1answer
278 views

Automate Controls for Curves

I am looking to automate (simplify) the path drawn in blue on my MWE. I am trying to avoid nodes if possible as this is nested in a tikzpicture. Ideally I was hoping to simply specify the begin and ...
1
vote
1answer
295 views

alignment of tikzpicture

I have several plots which I create with tikzpicture. The plot dimension is set to \begin{tikzpicture}[x=\textwidth]. I try to align these plots right with \begin{flushright} and \end{flushright} but ...
3
votes
1answer
333 views

How to improve the decoration ends with tikz decorate

you will see two problems on the example below 1) how to make the plot line is not under the terminal markings 2) Why is it the text in bold \documentclass{article} \usepackage[latin1]{inputenc} ...
2
votes
0answers
54 views

pgfplots: Plot around a Pole of a rational function [duplicate]

I'd like to use pgfplots to plot the function (x-1.2)*(x-3)*(x-4.8)/((x-1)*(x-5)) for x-values from 0 to 6. However, pgfplots does not seem to want to show me the whole plot - it doesn't show anything ...
3
votes
1answer
892 views

Setting global styles with multiple parameters for tikz calendar

I'd like to create a style with parameters for use with the TikZ calendar library. Here's a working example similar to what I want: \documentclass[10pt]{article} \usepackage{tikz} \usetikzlibrary{...
1
vote
2answers
314 views

Is it possible to remove the ddots when using umlcreatecall in the tikz-uml package?

I am using the TikZ-UML package to make a UML Sequence Diagram and want to remove the ":" character (separating class and instance name) when using \begin{umlcreatecall}[]{A}{B}. This is possible with ...
6
votes
1answer
818 views

PGFplots marks mandatory for 1st and last point

I want to plot values from a big table. Since it has too many numbers, I want to draw the line and only some marks (because there is other lines in the plot, therefore, to avoid confusion). I know ...
4
votes
1answer
213 views

How not to draw the first/last marker

I have to plot multiple lines in the same figure, using different markers to discriminate them. All these lines start from point (0,1) and end in (1,0) that are also the limit of the axes. I'd ...
6
votes
1answer
3k views

Calculate numerical value for node text in TikZ

I am using a tikzpicture environment to draw a Temperature v composition plot. I do not have exact data so am only mimicking it. I am aware that I could/should use pgfplots but the issue could be ...
3
votes
1answer
125 views

How to use a complex expression in matrix anchor?

Please look a next figure: I've done it with: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix,positioning,arrows} \tikzset{ >=stealth', box/.style={% ...
2
votes
1answer
331 views

Adding tikz figure in caption

I am writing one long document using lyx. I wanted to add small tikz code within a caption of a figure of my document. However when I tried to run it it is giving following error. Please help me ...
6
votes
1answer
214 views

text in different arrows

maybe someone can help me to get text in arrows and textboxes below I have just get the arrows like this... \begin{tikzpicture} \draw[thick,black](0cm,0) -- ++(0:3cm) -- ++(45:1cm) -- ++(135:1cm)-- ...
4
votes
2answers
348 views

How to use \tikzmark with pLaTeX?

Usually I use the standard latex from MiKTeX when i use TikZ, which works good. But now I need to use platex from w32tex instead to include Japanese characters, which gives me the error: Package pgf ...
7
votes
2answers
513 views

TikZ shaded translated regions defined by boundaries of shape nodes and lines

Given a lattice made up of shapes, how do I shade the regions (and their translates) defined by the boundaries of these nodes and lines going through these shapes? In my particular case, I have a ...
5
votes
1answer
983 views

Rectangular spy in pgfplots without scaling

I'm trying to copy the behaviour of this question: Using tikzlibrary spy without magnifying line width and/or mark size. I would like to change the shape of the spy to rectangle, but I'm failing at ...
0
votes
0answers
287 views

Letting variables take on random values in TikZ inside \foreach [duplicate]

I want to use variables to store a value in TikZ and do computations based on it. For instance, I want to have variables a,b and c for the following purpose in TikZ: \draw (a,b) circle (r) I should ...
6
votes
1answer
3k views

Tikz flow chart questions?

I am totally new to the package tikz but I am going to make a flow chart for my poster. I used the template provided by this link I just modify some parts I can understand and the source code is ...
6
votes
1answer
299 views

Are my programming skills transferable to LaTeX and TikZ?

I just want to ask what is LaTeX and TiKZ programming language like? Basically, I am looking at projects available in my final year. The project I looked at is a graphical interface to draw graphs in ...
9
votes
1answer
338 views

Using one key to set another key (in pgfkeys)

When I make a TikZ picture, I sometimes use absolute coordinates, and when I do, I find Martin Scharrer's showgrid TikZ library very handy. (It lays "graph paper" underneath my canvas, and puts ...
7
votes
1answer
651 views

How to 'lengthen' a TikZ path [duplicate]

Instead of to shorten a TikZ path, i need to lengthen a path. But I could not find a lengthen key. \documentclass[border=5pt]{standalone} \usepackage{tikz} \makeatletter \newcommand*\xtikzpath[3]% {% ...
4
votes
1answer
1k views

Polar plots, add degree symbol and hide the radius axis labels

I'm using sublime text 2 with skim, on Mac OSX 10.8.3. I'm plotting microphone pick up patterns as follows: \begin{tikzpicture} % p56 \begin{polaraxis} [ytick=\empty,legend entries={...
3
votes
0answers
50 views

Tikzpicture: Fill refuses to work with integer node names [duplicate]

I want to create a 3D-grid of named nodes using nested for loops and then fill some polygon based on the names. For some reason tikzpicture doesn't fill the polygon, although it draws the path alright....
9
votes
2answers
620 views

drawing(uncover) a curve bit-by-bit using tikzpcture and beamer and \onslide

I wish to uncover a curve (a potential energy v distance) bit-by-bit while explaining what is going on. The code below is only ok, the problem is that the curve changes shape from slide 3 to slide 4. ...
5
votes
1answer
351 views

Custom labelling of variables under an equation TikZ

I'd like to make this: (your prerogative as to the approach). It is basically labelling an equation: \begin{equation} Y\simeq Y(\lambda,\,h,\,A,\,V,\,\beta,n) \end{equation} How about TikZ do you ...
0
votes
2answers
326 views

LaTeX: plotting function, formatting axis

I've got some problems with plotting a function in a diagram with logarithmic axis: I doesnt give me any errors, but I don't see a graph. Do I need to include any other package? \begin{tikzpicture} \...
9
votes
2answers
416 views

Expansion problems with pgfkeys

I'm using pgfkeys, and a fairly adventurous syntax in which the values for some keys contain additional key/value pairs. (For instance, the value of the nodes key is a list of pairs, and the second ...
5
votes
1answer
940 views

How to put a brace and a title?

I would like to put a brace between the Q_s and Q_d of the following diagram \begin{tikzpicture}[domain=0:5,scale=1,thick] \usetikzlibrary{calc} %allows coordinate calculations. %Define linear ...
7
votes
1answer
366 views

How can I remove the highlight bar in kTikZ/qTikZ?

I've been asking this question already in KDE and Qt communities but it seems that I can't find a kTikZ or qTikZ user there, so I thought to ask it here too because maybe there are kTikz users here. ...
6
votes
1answer
1k views

Inline arrows with tikz

I'm trying to achieve an arrow that I can use inline, ie. somewhere in the running text, similar to \xrightarrow, but with an open triangle as its arrow head. This is what I came up with using tikz: ...
2
votes
1answer
3k views

How to write above a line in a tikzpicture

How could I write just above the blue lines of this tikzpicture? \begin{tikzpicture}[ scale=5, IS/.style={blue, thick}, LM/.style={red, thick}, axis/.style={very thick, ->, >=...
7
votes
1answer
519 views

Draw snake around the rectangular node

I want to draw the "coiled snake " around the rectangle named "Obstacle". The rectangle consist of node "O". I could not figure it out as I am new to tikz. can anyone give me good suggestion in this? ...
6
votes
1answer
816 views

Extracting x, y coordinates of an arbitrary point in TiKZ while using yscale and xscale

Inspired by Extract x, y coordinate of an arbitrary point in TikZ, I am trying to use the x coordinate of a point to draw another element. However, when I use the yscale and xscale commands, the ...
25
votes
2answers
2k views

Draw Nuclear Reactor with moving flows

I want to draw a nuclear reactor. In texamples.net there is a template which is pretty much what I would like to do. The code is % Pressurized Water Reactor % Author: Gloria Faccanoni <http://www....
8
votes
1answer
2k views

How to draw and annotate a spherical coordinate system

For some lecture script I am preparing I would need some descriptive images showing how to work with spherical coordinates as often seen in textbooks, i.e. a globe and some descriptive arrows ...
1
vote
1answer
260 views

Changing display angle of a node label

I'm trying to draw a diagram in TikZ with 45-degree lines, and I want to label these lines in such a way that the text of the label is also angled at 45 degrees. However I'm also interested in how to ...
8
votes
2answers
849 views

overlapping labels in tikz

This might be closed for being too localised, in which case I don't know where to get help from but here goes. I am drawing a histogram with Tikz (using the ybar interval bar chart) and labelling the ...
7
votes
1answer
389 views

Rule at the middle of a page

Is it possible to draw a (dotted) horizontal rule at the middle of the page (same distance from the top as from the bottom) independent of the rest of the text (perhaps in some way overlayed over the ...
8
votes
1answer
803 views

plotting the sequence x_n using tikz

I want to plot the sequence x_1 = \sin(pi root(2)) x_2 = \sin(pi root(6)) x_3 = \sin(pi root(12)) In short my x_n = sin( pi root(n^2 + n)). I want to plot this as an animation as n goes to ...
4
votes
1answer
592 views

FOSS for real-time PGFPlots

Any FOSS for real-time PGFPlots? Is it worth opening a feature request for KtikZ (QtikZ)?