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

Drawing a brush stroke like outline

I'm trying to reproduce the following picture with TikZ: Which is basically a circle with a variable width outline (the red line in the pic) that looks like a brush stroke. Can someone kindly give ...
7
votes
1answer
73 views

How to improve on this “twolines” decoration?

I'm typesetting an article on graphical calculus in tensor categories in TikZ and I wanted to define a decoration that draws two parallel lines at the same time. Here is my first try: ...
5
votes
1answer
34 views

Crop jpeg into circular tikz node

\documentclass[demo]{article} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node[circle,draw,inner sep=2cm]{\includegraphics{myimage.jpg}}; \end{tikzpicture} ...
3
votes
0answers
24 views

Node at tip/pinch of brace in Tikz

I'm trying to add some explanatory braces in my graphic, and find myself running into some minor difficulties/inconveniences. [Edit]: After being made aware that the main thrust of the question ...
2
votes
1answer
63 views

Draw graphical model with many nodes

So I tried to follow the answer in http://stats.stackexchange.com/questions/16750/software-for-drawing-bayesian-networks-graphical-models with limited success. My problem is How do I incorporate ...
7
votes
1answer
111 views

Pascal's triangle in Tikz with symbols

I have a follow-up question to Pascal's triangle in tikz with row headers. Is it possible to produce Mark's solution with symbols in Pascal's triangle? So, I could create the same figure, but ...
2
votes
0answers
27 views

beamer: make a picture stay in the foreground

I am trying to write some style file for a poster framework, we can use. The header is almost ready: \setbeamertemplate{headline} { \begin{beamercolorbox}[ht=15cm]{headline} ...
7
votes
1answer
99 views

Tikz, decorations

I use tikz as a general purpose drawing package because of its flexibility etc... I need to draw some Feynman diagrams like these: I tried to draw arc like \begin{tikzpicture} \draw [decorate, ...
1
vote
2answers
82 views

sketching semicirles and horizontal lines

I want to sketch this parallel lines and semicircles between them sth like the attached figure... would you plz help me?
1
vote
0answers
38 views

Solid of revolution about arbitrary axis

I'd like to rotate the region between y=cos(x) and y=x^2 - 0.25*pi^2 about the line x=pi. How to do this? So far I have only managed to rotate around the x-axis: \documentclass[letterpaper]{article} ...
6
votes
1answer
63 views

Arrow from brace to node

I would like to draw an arrow from the tip of a curly bracket to a node, but if I do the following, an extra arrow point is drawn just above the tip of the brace. \documentclass{article} ...
12
votes
1answer
2k views

Stacked barplots/groupplots with text labels in x-coordinate

I was trying to stack a groupplot, or was it grouping a stacked plot? However I was trying to get something like: The ybar stacked option works quite nice here. But when I try to adapt it to a ...
6
votes
1answer
68 views

plot legend : increase its area

So my question in general is what is the method to change the precise area of the rectangle used in pgf plots? Yes, to make it larger ... MWE: a typical bar chart ...
3
votes
3answers
120 views

Plotting functions and denoting equation on the figure

How can I plot the functions P=20-1/5*Q and P=5+1/9*Q so as to find the equilibrium point? The figure I need is like the following: Furthermore, how could I put the equation on each ...
3
votes
2answers
94 views

sketching simple arrows with different direction

I want to sketch this figure.. if you guide me to draw one of this arrows with direction i would be grateful..
9
votes
1answer
71 views

TikZ in Beamer: subscope does not inherit `visible on` from parent scope

In the MWE below, I define a macro \markxy that draws dashed lines from a point to the x and y axes to indicate the x/y coordinates. Since I don't want the dashed lines to be drawn over my other "more ...
8
votes
2answers
339 views

Picture indicating the fifth roots of unity

I would like to have the unit circle, centered at the origin, on the Cartesian plane drawn. The origin is to be marked with a dot and labeled "O" and five dots are to be drawn on the circle, one on ...
11
votes
2answers
164 views

Derivative of a tikz path?

I would like to draw curves that are smooth and have linear segments. These curves are to be used in the graph of one-dimensional functions, x(t). [To be used as position vs time graphs in writing ...
3
votes
1answer
79 views

What is the easiest way to accomplish textual tick labels in tikz?

Consider the following simple PV-diagram: The code below created it and the output is fine. I used kind of a workaround with an array to get the right tick labels on both of the axes. That works ...
35
votes
4answers
6k views

Draw mechanical springs in TikZ

Currently I am using the following path style to draw springs in TikZ \tikzstyle{spring}=[thick,decorate,decoration={zigzag,pre length=0.1cm,post length=0.1cm,segment length=6}] for example ...
3
votes
2answers
120 views

Optimized creation of text nodes

I have created a block diagram with several nodes with text and I need to optimize the node creation and hopefully use the \foreach construct to automate the creation of each node with its associated ...
3
votes
0answers
41 views

TikZ: Unexpected difference between \draw and — vs \path and edge

While modifying this answer for my own use, I encountered something unexpected. In my experience, using \draw (1) -- (2) is equivalent to \path (1) edge (2). However, adding the option to draw or ...
3
votes
1answer
52 views

Alter location of edge in graph in tikz

So I have the following: \begin{tikzpicture}[shorten >=1pt,node distance=1.75cm,thick] \node (A) {$A$}; \node (B) [below left of=A] {$B$}; \node (C) [below right of=A] ...
4
votes
1answer
31 views

style odd and even nodes near coords differently

I'm using this style definition in the preamble: \pgfplotsset{ base/.style={ ymin=0, xtick=data, nodes near coords, } } \pgfplotsset{ random/.style={ ybar=3pt, bar ...
7
votes
1answer
2k views

Multiple y axes in groupplot

I want to create a barplot with three groups. Compared are two criteria. To make it more comprehensive here the plot I already generated I approached this problem by using the example from Stacked ...
5
votes
1answer
94 views

Rotate only the shape

Is it possible to rotate only the shape, keeping the anchors and text inside the same? \documentclass[12pt,a4paper,preview,multi={tikzpicture},border=0pt]{standalone} \usepackage{tikz} ...
1
vote
1answer
74 views

Opacity of images in TikZ with beamer

I'm creating some slides and want to integrate a (pixel) graphic in a TikZ picture with opacity less than 1. I expect this code to work: \documentclass{beamer} \usepackage{tikz,graphicx} ...
8
votes
3answers
2k views

Surface plot with coordinates in pgf

Is it possible to draw a three dimensional surface using coordinates instead of formulas? MWE so far: \documentclass{article} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} ...
4
votes
1answer
61 views

TikZ: computation in node name

I want to place a variable number of nodes on a page, but I also want to be able to give these nodes a (integer) name. However, I run into the problem that only certain kind of commands can appear in ...
5
votes
4answers
152 views

How can I make TikZ nodes center on a particular symbol/operator?

Here is a small example document. \documentclass[a4paper]{amsart} \usepackage{tikz} \newcommand{\dju}{\mathbin{\coprod}} \DeclareMathOperator{\id}{id} \begin{document} \begin{tikzpicture}[x = ...
8
votes
2answers
395 views

draw rectangles with common edge

I would like to following picture in tikz, for which I have written the code. However scaling this image, distorts the location of the rectangle nodes. In my picture shown, there are common edges ...
5
votes
1answer
67 views

TiKZ generates unneeded whitespace

Edit: I did compile this document: \documentclass[DIV14,parskip=half-]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage{tikz} ...
2
votes
1answer
34 views

Tikz externalization: Latex dvi/ps produces a4paper boundary-box around figure

I am successfully using tikz in combination with externalization and pdflatex for some time now. But now I need to switch to latex->dvi->ps. I followed the instructions from the tikz documentation ...
2
votes
2answers
71 views

Creating Multiple-State Models (rectangular nodes)

I would like to replicate the following image for my work: I now have the following MWE: \documentclass[12pt]{article} \usepackage[margin=2cm]{geometry} \usepackage [english]{babel} ...
17
votes
4answers
798 views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} ...
5
votes
1answer
95 views

How can I remove the white space within a cloud in TikZ?

I am trying to produce a figure which contains a cloud drawn around a set of images. The code I have so far is: \node [draw, cloud, cloud puffs=20, aspect=2, inner sep=0cm] (pathways) ...
0
votes
0answers
22 views

Using tikzscale along with correct references in externalized tikzpictures

It is not advised to use tikzscale package along with mode=list and make based on Patrick's comment here: http://tex.stackexchange.com/a/89595/24167 However, the references (e.g. \cite) does ...
2
votes
0answers
53 views

Custom tikz pattern: hatchangle

In PSTricks there exist the fillstyles vlines, hlines, crosshatch which have counterparts in tikz patterns library. However, in PSTricks they can be modified by following options: hatchwidth, ...
1
vote
0answers
34 views

Can I make an alias for a node argument in TikZ

When I am drawing illustrations with TikZ, the most common mistake I make is incorrectly writing the relative position of a node. I would for example write "left above" in stead of "above left". It is ...
3
votes
1answer
37 views

Undefined control sequence \draw and \end{tikzpicture}

I am trying to draw a picture in LaTex. When I compile the file it gives me an undefined control sequence error. I tried to compare it with my other documents but I can't find where the error is. I am ...
2
votes
2answers
96 views

How do I draw shapes inside a tikz node?

I know how to draw different shapes using tikz, like this: \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0,0) ellipse (1 and 1.5) (0,2.5) circle (1) ...
2
votes
1answer
41 views

Why does \resizebox around tikzpicture gives me undefined control sequence }?

As indicated in Scale tikz figure to a percentage of \textwidth I was expecting this to work: \documentclass{memoir} \usepackage{tikz} \usetikzlibrary{matrix,positioning} \begin{document} ...
4
votes
1answer
75 views

Making tikz draw go almost all the way

I have by looking at examples at this site got quite far with tikz but not all the way. I know this might be considered a bad question -- but since I got this far by looking at similar question this ...
4
votes
1answer
66 views

Tikz fill double line with pattern not with color

I'd like to fill the inner of a double line path with different patterns: hatch, random dots, Poisson discs, grid. Consider following hexagon, where I would like to fill the inner of the edges. ...
4
votes
1answer
52 views

Custom draws in matrix nodes in tikz v3 with referencing

With tikz v3 the matrix behavior has changed slightly. The great example at http://www.texample.net/tikz/examples/BER-measurement/ doesn't seem to compile any longer. The problem is that the default ...
6
votes
1answer
52 views

Overcome 'Dimension too large' when using the forest package with a lot of nodes

I am drawing a genealogical tree with the forest package in which I have approximately 50 nodes. I have reached a point where I get the message "Dimension too large" when I try to add another node. I ...
1
vote
1answer
119 views

How can I add a shaded, thick arrow to a Tikz picture?

I have created a directed graph and want to add a thick, shaded arrow to indicate change over time. The problem: It should go from one edge to another (from initial state to result state), not from ...
3
votes
1answer
257 views

How to simplify path?

I have the following MWE: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); ...
4
votes
1answer
148 views

Using TikZ to draw array figures

I am new in LaTeX and even more on TikZ. I want to use TikZ to draw the kind of figure described in the below picture. I looked for some tutorial or particular topics that deals with that but never ...
0
votes
1answer
59 views

Combination Function with Factorial - Not correct result - Pgfplots

\begin{tikzpicture} \begin{axis}[ axis lines = left, xlabel = $Number of Elements$, ylabel = {$Combinations=\frac{(n)!}{(n-r)!(r!)}$}, ] %Axis \addplot [ domain=2:10, samples=100, color=red, ] ...