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
0answers
132 views

Tikz \draw not working with several tikzpictures on the same page [closed]

I need to output a bunch of number lines from a program, to latex, and I'm using tikz. On these number lines, some areas need to be highlighted, like in the first line of the picture. However, if a ...
5
votes
3answers
660 views

How to make an open circle in a number line?

This is a follow up question to Labeled Number Line My question is how can I make an open circle (to indicate an open interval) using Gonzalo Medina's answer.
12
votes
1answer
3k views

How to plot the first n rows of a table using pgfplots?

When using pgfplots, is there a way to plot only the first n rows of a given table ? Considering the following MWE file: \documentclass[tikz]{standalone} \usepackage{tikz} \usepackage{pgfplots} ...
5
votes
2answers
258 views

drawing wind mixing in the open ocean

I am trying to draw a diagram showing the influence of wind speed for mixing in the ocean. Here is my attempt (apologies for the long code, I'm guessing this can be done in a much more elegant way but ...
5
votes
1answer
2k views

Rotate Tikzpicture including nodes

Is there any simple way to rotate a whole tikzpicture environment? If I apply the tikzpicture option [rotate=ang] nodes seem to be unaffected. In other words, I want to do ...
4
votes
2answers
193 views

Cylinder with lines indicating the height

Any advice how to place some lines (like ticks) in the cylinder indicating the cylinder height? It should look like this: Here my MWE: \documentclass[english]{beamer} \usepackage[utf8]{inputenc} ...
4
votes
1answer
149 views

Draw plots with tikz

I would like to do the following graphic in tikz. But I do not konw how to proceed... How could I do that? EDIT So far, I have tried simpler things (before getting to this bigger problem). I have ...
4
votes
1answer
429 views

Global definition of pgfplots axes style conflicts with colorbar

I am trying to plot an individual colorbar (with no axis), using the code below (MWE): \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.3} \begin{document} ...
3
votes
3answers
660 views

How to cross out a child of a node in a tikz tree?

Consider this simple tikz tree: \documentclass{article} \usepackage{tikz} \usetikzlibrary{trees,shapes,snakes} \begin{document} \tikzstyle{mynode} = [text width=4em, text centered] ...
10
votes
3answers
998 views

Parabolic Moebius map on sphere using tikz

There is a discussion here about coding the elliptic Moebius map. I however am interested in how I might do the parabolic one. case [d] The arrow heads are not an issue, but how do I get the lines ...
1
vote
1answer
412 views

Code for drawing two intersecting lines and the acute angle between them

Here is the code for two intersecting lines. I know the code that I use to draw lines $\ell$ and $k$ is bad. I am sure that is the reason that the labels $\ell$ and $k$ are not in the right places. I ...
7
votes
1answer
2k views

How to draw Latex multiple bar chart with error bar

Can someone help me with putting error bars on multiple bar graphs. This is what I currently have and it doesn't look any good, so far :( \begin{figure} \begin{tikzpicture} \begin{axis}[ x tick label ...
2
votes
1answer
292 views

How to draw 3-junction and 4-junction SQUIDs?

UPDATE Thanks to John Kormylo I was able to draw a 4-junction SQUID using four components like: The whole SQUID is drawn using the following code \documentclass{article} \usepackage{tikz} ...
1
vote
0answers
50 views

draw on pdf file [duplicate]

I have such a case: I got one pdf file but it's read only,I wish to draw on it. so I think maybe I can do it as below: 1). embed origin.pdf into latex code as a picture. 2). find right position to ...
5
votes
3answers
337 views

tikzpicture: “rounded corners” and “west arc=none”

here's my MWE: \documentclass[a5paper]{book} \usepackage{tikz} \usetikzlibrary{positioning,shapes.misc,calc} \begin{document} \begin{tikzpicture}[overlay,remember picture] \node[ ...
6
votes
2answers
1k views

Tikz-Connecting nodes with multiple lines

I am trying to reproduce the following image I made in "Power point". Although, there is no difficulty in designing the boxes, I find it rather hard to properly position the red and black lines. ...
15
votes
2answers
462 views

Ideas for transposing/splitting a TIKZ figure from A4 article to beamer presentation

Context. I am having this kind of tikzpicture in my article which I would like to include in a beamer presentation : Please note that the figure was simplified, since groupI represents a group of ...
9
votes
7answers
787 views

How can I draw circled integers with the same size by TikZ?

I used the statement \newcommand*\circled[1]{\tikz[baseline=(char.base)]{ \node[shape=circle,draw,inner sep=2pt] (char) {#1};} } to draw some circled integers. Ex. \circled{$X'$} \circled{$1'$} ...
0
votes
2answers
232 views

Have one plot as background for stacked plots

I have a series of plots that are stacked up: \documentclass{article} \usepackage{pgfplots} \usepgfplotslibrary{external} \pgfplotsset{compat=1.10} \tikzexternalize% activate externalization! ...
5
votes
1answer
338 views

Unclutter a bar plot with pgfplot

I have the given bar plot with three hirachies (color + inner-group + outer-group): The figure look overloaded but I don't know how to split the x axis labels in a better way. A possible solution ...
5
votes
1answer
181 views

Problem parsing product `2\x` with `TiKZ 3.0`

I was used to write 2\x to obtain the product 2*x but today I've found this is not correct anymore in TiKZ. Next code \documentclass[tikz,border=2mm]{standalone} \begin{document} ...
0
votes
1answer
328 views

How to place two bar charts beside each other

There are two tikz barcharts in this snippet. I'm able to display barcharts one after another but when i use subfigure/subfloat its giving an error \documentclass[preprint,12pt,3p]{elsarticle} ...
3
votes
2answers
1k views

How can I draw Pascal's triangle with some its properties?

At here Pascal's triangle in tikz we can draw Pascal's triangle. Now I want to note some properties of coefficients C_{n+3}^4 -C_{n+2}^4-C_{n+1}^4+C_{n}^4=n^2 (the first picture) as folowing ...
2
votes
2answers
144 views

TikZ - set of 1-d point charges

Trying to create a set of alternating (+q,-q etc.) Point charges on a line? Completely new to Tikz. Thanks in advance.
4
votes
2answers
94 views

tex4ht styling breaks after figure containing tikz drawing

\textbf works in tex4ht before the figure environment, but not after: \documentclass{book} \usepackage{tikz} \begin{document} \textbf{this is bold} \begin{figure}[h] \begin{tikzpicture} ...
8
votes
1answer
210 views

Hatching that does not obscure a right-angle mark

Hatching - I suppose in the northeast direction - is to be added to the square with an edge length of $c$ in following diagram. I have a right-angle mark at one of the corners of the square. Is there ...
5
votes
2answers
629 views

Moving a node a bit

The following code instructs TikZ to draw an obtuse triangle. Except for the placement of the letter "C" in the diagram, the diagram is drawn correctly. I want to move the letter "C" downwards a ...
2
votes
3answers
231 views

Overlaying or nesting graphs in tikzpicture with different axis scales

I need overlay or nest a figure in a graph. I try with \pic, but the results aren't good for figure scale, according to graph scale. I try also to define the figure in nodes, to place it in the ...
5
votes
2answers
320 views

Add text to Penrose triangle

I'd like to add text to the Penrose triangle (code below) and write "London", "Paris", "Berlin" on the sides. How can I do that? \begin{tikzpicture}[scale=1, line join=bevel] % \a and \b are two ...
4
votes
4answers
738 views

Using TikZ to draw a water channel profile

I want to draw a relatively simple sketch using TikZ but I can't do it. What I want is a representation of an open water channel with 4 pools, a dam upstream, and a waste reservoir downstream, as ...
3
votes
1answer
266 views

macro inside tikzpicture environment

When I take a part of a tikz picture out and put it into a macro, the code stops working. So, why does the following not work? \documentclass{article} \usepackage{tikz}\usetikzlibrary{matrix} ...
2
votes
0answers
135 views

Beamer Handouts: 4 on 1 w/ adjusted positions, but page numbering incorrect

I need to make Beamer handouts (either 4 on 1 or 8 on 1). Below is my MWE. I think the usual 4 on 1 has too much space between slides, with the slides too close to the margins (printing the handouts ...
2
votes
1answer
197 views

Modifications for labeling a triangle

I have a diagram that needs some modifications. The mark for the right angle and the label of $\theta$ are not in the right places. The arc indicating $\angle ACB$ is not in the place. The lengths ...
0
votes
0answers
30 views

Infinite canvas [duplicate]

It seems that all LaTeX formatting assumes we will ultimately print the document but if the goal is to publish online - under some circumstances, we might desire to have all the document in one ...
5
votes
3answers
1k views

Tikz-picture - Fill area

I'm struggling drawing this picture: I used \documentclass[10pt]{article} \usepackage{ngerman, longtable} \usepackage{amsmath} \usepackage{amssymb} \usepackage{fancyhdr} \usepackage{pdflscape} ...
6
votes
2answers
490 views

Tikz- complicated shapes as nodes

I'm trying to reproduce the following picture In this picture, there are some shapes that are repeated. For instance 5, 6, 8, 10 and 11. My idea is to use ./style in order to define these shapes ...
1
vote
1answer
539 views

Labeling a line segment which indicates it is the sum of two smaller line segments

TikZ compiles the following code and renders a line segment with endpoints $A$ and $C$ and with a point $B$ between these endpoints. It also marks the length of $\overline{AB}$ as $x$ and the length ...
1
vote
2answers
133 views

Can I create a zoomed-in rectangle between two separate tikzpictures without the spy-function (<— actually, same function, different contents)?

I'd like to have the smaller rectangle on the right put as the magnifypoint. Explanation: The magnified part on the right essentially shows a magnification of the contents on the left, except not ...
1
vote
0answers
214 views

TikZ-UML Error When Creating Component Diagram [closed]

I use the latest version tikzuml-HEAD-2013-03-19.tbz of TikZ-UML from http://perso.ensta-paristech.fr/~kielbasi/tikzuml/src/. I try to create a component diagram like that: \documentclass{article} ...
2
votes
1answer
283 views

accuratelly place a node above and left of another node

I am trying to draw a box which is defined as a node, next to another node. My code is \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \tikzset{ pipe/.style = { ...
1
vote
1answer
215 views

design a style using tikz package

How can I use latex tikz package to design the style that is seen in the picture?
3
votes
1answer
751 views

Label an angle in a triangle

I want to label $\angle ACB$ with an arc and $\theta$ outside the arc. \documentclass[10pt]{amsart} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \documentclass[10pt]{amsart} ...
10
votes
1answer
993 views

Tikz binomial distribution

I'm trying to plot the pmf of the binomial distribution for particular values of N and p. For example, when N=10 and p=0.5: \documentclass{article} \usepackage{amsmath} \usepackage{pgfplots} ...
4
votes
1answer
471 views

pgflayer: background and foreground and tikz: pattern for water

I am attempting to draw a barrel floating in water. I am trying to use pgfonlayer so that when the water line intersects the barrel, the line will be removed. Also, I looked through small section in ...
5
votes
1answer
762 views

tikz: arrow tips |<->|

I want to use a variant of |<->| in my draw command, but I want the tips to be the stealth arrow head. Unfortunately, |stealth-stealth| isn't understood in the draw options command. How can I ...
3
votes
1answer
181 views

How to change vertical and horizontal unit based on a fraction of width and height of an image?

I have to overlay some texts on a PDF form. As converting the PDF form to EPS with pdftops produces unsatisfying result, I will not use PSTricks code below. ...
0
votes
1answer
281 views

Plot and plane and vector

I need to plot a plane and a line vertical on the plane in latex with tikz or pgf for a math assignment. How do I do that?
0
votes
0answers
22 views

Labelling the x-axis [duplicate]

\begin{tikzpicture} \begin{axis}[ symbolic x coords={-2,-1,0,1,2,3,4,5,6}, xtick=data ] \addplot[ybar,fill=blue] coordinates { (-2,0) ...
7
votes
1answer
640 views

TikZ/PGF 3.0 datavisualization vs pgfplots

To follow-up on a previous question TikZ datavisualization or pgfplots?, the current release of TikZ 3.0 has a flexible datavisualization engine that creates the same kind of plots as the more mature ...
4
votes
1answer
463 views

How can I mark a point in a pgfplot and make sure its visible (on top of the plot)?

Recently, I have TikZ'ed the following image for Wikipedia (see file) I would like to mark the green dot like it was done here: I've tried a couple of different things, but no matter what I did ...