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)

0
votes
4answers
32 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
47 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! ...
4
votes
1answer
64 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
95 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
72 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
210 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 ...
3
votes
2answers
61 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.
3
votes
0answers
23 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} ...
6
votes
1answer
77 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 ...
4
votes
2answers
114 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
95 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
144 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 ...
3
votes
3answers
337 views

Using TikZ to draw a water channel profile

I am writing my masters thesis and I'm so frustrated because I want to draw a relatively simple sketch using TikZ and I can't do it. What I want is a representation of an open water channel with 4 ...
3
votes
1answer
53 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
44 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 ...
4
votes
1answer
56 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
22 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 ...
6
votes
3answers
148 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} ...
5
votes
2answers
149 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
44 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
47 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
15 views

TikZ-UML Error When Creating Component Diagram

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
46 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
107 views

design a style using tikz package

How can I use latex tikz package to design the style that is seen in the picture?
2
votes
1answer
61 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} ...
0
votes
0answers
75 views

Facing difficulties while drawing 3D diagrams using TikZ [on hold]

I want to draw some 3D diagrams in a latex document. Initially I tried drawing them in Latex using TikZ but I gave up, since it was too complex to draw here. Additionally it was taking lots of time. I ...
7
votes
1answer
116 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
63 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 ...
4
votes
1answer
69 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 ...
2
votes
1answer
60 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
59 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
19 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) ...
5
votes
0answers
67 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 ...
3
votes
1answer
33 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 ...
3
votes
1answer
104 views

How can I annotate a figure with lines and circled numbers

I want to replace static image annotations with annotations in LaTeX to have them be all the same size. I always use figures and sometimes subfigures. How would I get the same lines as in the image ...
2
votes
2answers
103 views

TikZ Aperture Problem

I try to generate a TikZ graphic for the visualization of the aperture problem. What I am looking for is something like shown in this picture: I tried to search for something similiar, but couldn't ...
2
votes
0answers
34 views

Plot X-Axis: Make xticklabels cover a fixed range of bins?

I am using a tikzpicture plot. I have around 50 bins in my plot. The bins belong to two groups of data sets. I want to add 2 labels for the x-axis. The first one should cover bins 1-25 and the second ...
6
votes
1answer
82 views

Tikzpicture-figure: Order plot data (asc/desc)?

I am using a tikzpicture for plotting. the values I want to plot are typical (X,Y) pairs. The x-value is an uninteresting id-value. I want to order the bins ascending/descending according to the ...
1
vote
1answer
40 views

tikz: setting up a spring

I am trying to set up a spring command but keep receiving the message: ! Package pgfkeys Error: I do not know the key '/pgf/decoration/\pgfkeyscurrentname ' and I am going to ignore it. Perhaps ...
2
votes
2answers
312 views

How to draw this in tikz?

I have the following drawing, that I want to somehow replicate in tikz (or similar if that would be easier). The important part that I cannot figure out is how to have the arrow/semi-cone opening up ...
6
votes
1answer
104 views

The intersection of a sphere with planes through an axis tangent to the north pole

I am trying to draw a picture of a very simple sphere - i.e. one big black circle with additionally, an equator indicated with solid line in front, dotted in back. on this sphere I want to draw a ...
8
votes
1answer
229 views

Theory of Mind Type Figure

I am trying to draw this picture. I have produced multiple balloons etc., but it would be nice to produce exactly same figure. In case my primitive code may help someone, I am also adding it ...
6
votes
2answers
90 views

TikZ: how to apply an affine transformation?

I would like to draw something like this: The best I can do so far: \documentclass{article} \usepackage{tikz} \begin{document} \resizebox{0.95\textwidth}{!}{ \begin{tikzpicture} ...
3
votes
1answer
52 views

TikZ data visualization fails to load data from file

I'm trying to visualize some data with TikZ datavisualization library. Given foo.tex \documentclass{article} \usepackage{tikz} \usetikzlibrary{datavisualization} \begin{document} \begin{tikzpicture} ...
3
votes
1answer
54 views

Circuitkz with relative +(x,y) coordinates updates current pen position

Is this a bug or am I doing something wrong? When using pure TIKZ everything works as expected: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw ...
2
votes
0answers
105 views

Very fancy bar chart

Just wonder if this could be done with tikz? I know I should provide at least a MWE, but I am new to latex and have absolutely no idea where to start. MWE (Addition by HK) ...
1
vote
1answer
47 views

Undefined control sequence in TikZ braces

\documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{figure} \begin{center} \begin{tikzpicture}[scale=1] \foreach \i[count=\t from 0] in {16,...,23} { \path (\t+0.25,1) ...
10
votes
2answers
200 views

How do you locally override/cancel a shadow?

In the example below, the style I've defined for every node uses a drop shadow. My a node uses that default style without modification. However, I'd like to override that style for node b, which ...
1
vote
0answers
46 views

tikz cannot parse radius in “radius=0.3” command [on hold]

\documentclass[12pt]{article} \usepackage{tikz} \begin{document} \begin{figure} \centering \begin{tikzpicture}[scale=1] \draw (0,1.7) circle [radius=0.3] node {$T_1$}; \end{tikzpicture} ...
7
votes
2answers
198 views

Brazil Language problem in the TikZ diagram

I have a problem with TikZ diagram, I don't get to make the diagram with babel under the brazil language. I used the code with french and everything is OK! \documentclass[a4paper,12pt, ...