Tagged Questions

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)

2
votes
2answers
772 views

How to horizontally top-align multiple \tikzpicture's without using \hspace?

The use case I'm having is the following: \documentclass{article} \usepackage{amsmath} \usepackage[showframe]{geometry} \usepackage{qtree} \begin{document} \Tree [.A B C [.D E ] ] \Tree [.F [.G H ...
4
votes
1answer
698 views

How to draw an additional line over an existing TikZ figure?

\documentclass[border=5mm] {standalone} \usepackage{pgfplots, pgfplotstable} \begin{document} \begin{tikzpicture} \pgfplotstableread{ % Read the data into a table macro Label First Second ...
11
votes
1answer
304 views

combining two diagrams with tikz and scale judiciously

I have the following code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc} \begin{document} \usetikzlibrary{decorations.pathmorphing,calc} ...
2
votes
0answers
41 views

Increase the X length of a tikzpicture [duplicate]

This is the code that i'm using (Thanks to percusse in here): \documentclass[conference]{IEEEtran} \usepackage{lipsum} %<-- For dummy text \usepackage{pgfplots} \pgfplotsset{compat=1.7} ...
1
vote
0answers
142 views

Sieve of Eratosthenes [closed]

I have look at the answer from @AlainMatthes at Sieve of Eratosthenes in tikz where I have added the suggested extra code: Code \documentclass{article} \usepackage{tikz} \makeatletter ...
5
votes
2answers
232 views

TikZ, node with multiple lines around

I want to draw a circle node using tikz that has more than two lines around. I found this question: TikZ - multi-color double circle node with its very good accepted answer. Unfortunately, I have no ...
3
votes
1answer
254 views

Why is this TikZ pattern spilling outside the path it fills? [closed]

This: \documentclass{article} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \fill[pattern=horizontal lines] (0,0) -- (2,2) to[out=90,in=180] (4,5) -- (7,5) -- ...
11
votes
2answers
374 views

tikz - alter circular path with nodes

I am attempting to generate a circular path with nodes: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \begin{document} \begin{tikzpicture} \node (1) at (8,6) {A11}; \node (2) ...
3
votes
0answers
332 views

Drawing specific curves/planes [closed]

I want to submit a paper and the only thing that's left to do is to add some graphics. My deadline is on Wednesday/Thursday. What I want to do is some basic curve/plane drawings. Here is an image: ...
5
votes
1answer
826 views

Legend position & bad x ticks scale

I'm currently experimenting tikz-pgf, but facing some strong behaviour. How is it possible to have only 1 legend for a groupplot? Why is the scale 10^(-3) appearing below the first plot? Here is ...
7
votes
1answer
859 views

Axis ticks in radians in polar pgfplots

I am using the polar library with pgfplots to plot a graph like this: \begin{tikzpicture} \begin{polaraxis} \addplot[mark = none, domain = 0.4:12, samples = 600, data cs = polarrad]{sin(x)}; ...
2
votes
0answers
53 views

Problem in cropping the document in standalone package [duplicate]

I am trying to use standalone package along with tikzpicture. The resulting document is not cropped properly although I used the class option of crop=true. Could someone help me? Here is the code I ...
12
votes
1answer
472 views

Single arrow with heads on both sides pointing in same direction

Please consider the following example of an arrow I would like to draw in a tikzpicture-environment: My MWE draws a single arrow but only with one head. Does anyone know how I can add a second head ...
6
votes
1answer
123 views

tikz used to generate eddies in oceanographic diagram

I m attempting to generate several curved paths with an arrow at the end: \documentclass[12pt]{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing} \begin{document} ...
6
votes
1answer
504 views

how to align an arrow head to the center of a snaked line

I'm trying to generate a snaked line with an arrow head at the end of the line, I can use the following code: \documentclass[12pt]{article} \usepackage[margin=1in]{geometry} \usepackage{tikz} ...
5
votes
2answers
597 views

Horizontal waterfall chart with labels for each bar

I've looked through similar questions here and here, but I'm still stuck. Basically what I'm trying to achieve is this plus bar labels: I have two problems: 1) My code sucks. Right now the y-axis ...
6
votes
0answers
78 views

Omitting a range when plotting with pgfplots [duplicate]

I have to plot data of the following format: year,value1 -10000000,10 0,10 1890,10 1900,50 1930,500 1970,1500 2000,4000 Using standard pgfplots I do this: \documentclass{article} ...
9
votes
2answers
635 views

Arrow parallel to a line with TikZ

I want to add an arrow at $f_2$ pointing towards $Q$ in the following figure. It should be parallel to the line, I hope this minimal example is enough. \documentclass{scrartcl} ...
4
votes
1answer
348 views

Insert Picture on Titlepage

I have made a titlepage with a wide (104pt) vertical line and i want to place a logo on top of that line. I tried to do it with icluding a picture with tikzpicture, but it places the image at the ...
2
votes
1answer
165 views

Lines missing in the graph

The code \pgfplotsset{mystyle/.style={mark=none}} \begin{figure}[t!] \resizebox{.4\textwidth}{!}{\begin{tikzpicture} \begin{axis}[title=QWS Dataset, legend pos=outer north east, ...
4
votes
1answer
610 views

Naming 3D axes in pgfplots

I want to label the axes in a 3D plot with pgfplots. Using the anchors .right of origin and .above origin, I can label the axes as "x" and "y" in 2D with ease. In 3D, the labels must be tweaked to ...
8
votes
1answer
1k views

A problem with beamer, tikz and fonts

I am having a weird problem with beamer and tikz. The following MWE doesn't compile. Removing the \alert from the author line, or the \usepackage{tikz} or the math content in the frame is enough to ...
1
vote
1answer
256 views

Syntax Highlight in Winedt

I am using Winedt 7.1 and learning TikZ and I am thinking about to add the commands to the keyword.ini, in the help they mentioned, adding to many keywords may affect the performance. Is there a ...
6
votes
1answer
407 views

A double line arrow on one side and single line arrow on other side with PGF/TikZ

I want to be able to do something similar as above in PGF/TikZ. Is it possible? If yes, I would like to know how. I found the following code in the PGF manual for printing arrow tips over double ...
8
votes
2answers
1k views

How put tick and cross mark around a node in tikz?

I want to draw something like this: This is my tikz code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows} \usetikzlibrary{trees} \tikzstyle{bag} = [text width=8em, text ...
5
votes
1answer
456 views

How to draw a graph along with probabilty tables using TikZ package

I need help to draw a Directed Acyclic Graph of Bayesian Network along with probability of each node using TikZ package. Here is an example: Table grid can be a full or partial as in above example. ...
3
votes
1answer
432 views

TikZ: remove/override auto option (arrow label positioning) from a defined style

I have a defined style which I am applying to many arrows. Most of the time, I want them to have label nodes positioned using auto, but occasionally I do not. Currently, I simply add auto wherever ...
5
votes
2answers
292 views

Shading a region below two edges in tikz?

Question: In the following figure, how can I shade the region marked "here"? I'm guessing there is an elegant solution via the intersections library, but I'm not sufficiently familiar with it. ...
2
votes
1answer
1k views

TikZ logic alignment

I'm trying to create various logic circuit diagrams using the circuit library of TikZ (it allows multi-input gates). I'm using a matrix, but this causes issues with the input wires not lining up with ...
4
votes
2answers
279 views

Table of 2x2 tikzpictures

I'm attempting to condense 4 tikzpictures into a smaller space in my document. The solution I have is as follows: \documentclass{article} \usepackage[paperwidth=6in, paperheight=4in]{geometry} ...
3
votes
1answer
184 views

Placing a tikzpicture next to an align

I have a tikzpicture with an accompanying explanation in a math align environment. The tikzpicture is small enough that I'd like the explanation to appear next to (specifically, to the right) the ...
19
votes
1answer
538 views

Drawing Tapered Edges in Graph

I'd like to achieve the following effect in a TikZ picture when drawing a straight edge from one node to another. How can I achieve this tapering effect? Notice what happens when an edge exists from ...
5
votes
1answer
249 views

A question on feasible region

I faced a difficulty to name the corner point of the feasible region determined by the below LaTeX/TikZ code, who can help me. \begin{figure}[htpb] \centering \begin{tikzpicture} \draw[gray!50, ...
3
votes
1answer
357 views

TikZ node positioning in Beamer ignores x coordinate

I have the following frame in beamer: \begin{frame}{Language} \begin{block}{} \begin{align*} \onslide<1->{ &\text{Types} & T &::= B | T \to T \\ } ...
0
votes
0answers
48 views

Create a footnote in a node in a tikzpicture [duplicate]

Is it possible to create a footnote in a node of a tikzpicture? Preferably the tikzpicture it should also be possible to put that tikzpicture inside a figure environment.
4
votes
2answers
852 views

4 set venn diagram in TikZ

Is it possible to make a 4-set venn diagram using the tikz packages, like the following one? I know it must be, but the only information I can find on the subject uses R as the language. So, an ...
7
votes
1answer
348 views

How to omit non-integer x-axis ticks in pgfplots?

The following figure has annoying x ticks at 0.5, 1.5 and 2.5. Non-integer values have no interpretation for my purpose. Question: How can I get pgfplots to exclude non-integer x-axis ticks? ...
2
votes
2answers
2k views

tikz - specifying more controls on curved lines

Im drawing a temperature profile for a given body of water: \begin{tikzpicture}[scale=0.3] \draw [>=stealth, ->,thick](0,0) -- (0,-22) node[left = 7mm, midway] {Depth [m]}; \draw ...
7
votes
2answers
225 views

TikZ setting the edge of a path to horizontal rather than in=0 out=180 or vice versa

\path[->] (A) edge [out=180, in=0] (B); This path is written quite often in my document. Sometimes I find myself changing it to: \path[->] (B) edge [out=0, in=180] (A); I do not want to ...
9
votes
3answers
314 views

path with both mark connection node and arrow tip

I would like to use a mark connection node decoration on a line that also has an arrow tip. Unfortunately, using the decoration causes the arrow tip to point in the wrong direction (always straight ...
5
votes
1answer
431 views

How to: Bagnouls–Gaussen bioclimatic diagram?

Is there any example how to code a Bagnouls–Gaussen bioclimatic diagram (ombrothermic diagram)? There is one diagram here: http://www.sciencedirect.com/science/article/pii/S0379711210000949 The scale ...
4
votes
1answer
125 views

Is it possible to trim a line when crossing another?

I'm trying to draw a cycle, where the lines A-B and C-D overlap the 1-2 and 3-4 lines. Is it possible to trim or clip the numbered lines above and below when they cross the other ones? Is there ...
1
vote
1answer
132 views

Does anyone know if the listed prerequisites for TikZ's pgfplots package are slightly off?

Does anyone (not to specifically ask Christian) know if the prerequisite PGF/TikZ version listed in the PGFPlots manual is off by a bit? I've been trying to use \tikzset{external/mode=list and make} ...
8
votes
1answer
1k views

TikZ: Controlling text within nodes and placing nodes in text

Need some help working with TikZ. Let me begin by saying that I think TikZ is amazing. I hardly know what I'm doing at this point and yet I've been able to draw some very nice diagrams with it. ...
1
vote
0answers
48 views

How to draw a cycle diagram in tikz? [duplicate]

I want to draw a similar diagram. Every block would be connected to the one following clockwise using a -> arrow. They would all have different labels in them.
7
votes
3answers
1k views

protocol message diagram

I would like to draw a signalling protocol message exchange, like the picture below. I tried to draw the diagram with the package pgf-umlsd and 90% are able to realize the scheme. this is the code: ...
4
votes
1answer
4k views

How to draw bar chart using tikz?

I have drawn the above figure using powerpoint, how can I plot something similar using tikz? I want the 3 different sections in every bar which should ve 3 different colors ---------edit after 1st ...
3
votes
1answer
379 views

Problem about pattern and gradient

I draw a graph using the code below . \documentclass[tikz]{standalone} \usetikzlibrary{ shapes.geometric, positioning, fit, calc, patterns } \usepackage{tikz} ...
5
votes
1answer
708 views

tikz picture inside of an enumerate environment

Is there a way I can make sure that the number of the enumerate environment stays in the top left of the tikzpicture? I'm using a custom environment that just wraps around the enumerate environment... ...
1
vote
0answers
207 views

How do I debug the message “Argument of \XC@definec@lor has an extra }” [closed]

Can anyone provide me with some intuition about what might cause an error like this? Argument of \XC@definec@lor has an extra } I am unable to produce an MWE that demonstrates the error, as it ...