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
9 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 ...
5
votes
1answer
43 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
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} ...
2
votes
1answer
64 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
116 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 ...
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} ...
1
vote
2answers
83 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?
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} ...
7
votes
1answer
100 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, ...
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
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..
3
votes
3answers
121 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 ...
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 ...
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 ...
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
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
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 ...
7
votes
1answer
76 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: ...
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 ...
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
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} ...
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
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] ...
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} ...
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 ...
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} ...
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 ...
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) ...
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 ...
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); ...
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, ] ...
1
vote
1answer
44 views

Using TikZ to label a Commutative Diagram with a Picture

I'm writing a beamer presentation and having some diagram troubles. Is it possible to label an arrow in tikzcd with a tikzpicture? For example, the code \begin{tikzcd} S^1 \arrow{r}{ ...
4
votes
2answers
72 views

representing a null child in a binary tree using `ground` symbol

I'm using ground symbol to represent a null child in a binary tree. But the ground symbol has arrows in it. How do I remove them? \documentclass{llncs} \usepackage{llncsdoc} \usepackage{tikz} ...
1
vote
1answer
53 views

PGFPlots - trying to combine legends

I have an interesting problem. I am trying to create two graphs using the groupplots environment, side-by-side, that show different sets of data elements with different legend entries and different ...
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 ...
3
votes
1answer
36 views

Centering / horizontal alignment of text inside tikz boxes

I am facing a problem with centering the text inside the boxes: \documentclass[a4paper,fontsize=12pt,a4paper,DIV=10,BCOR=10mm,twoside,titlepage=false,openany,pagesize]{scrbook} ...
5
votes
1answer
72 views

Change node style in a tikz picture

I'm trying to change the node style so a node looks like a cylinder with a variable height. currently i'm using this code \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{tikz} ...
2
votes
0answers
46 views

Why is there a compilation error? - moderntimeline

I am using article class to prepare my CV. When I went through this, I found that moderntimeline package can be used only with moderncv. So I took only the TikZ code answered by Jake.But I get ...
6
votes
1answer
95 views

Aligning both tikz pictures and their captions

I am using two tikz pictures in subfigures. The baseline parameter allows aliging the subfigures via the nodes, however the caption (b) is much above the caption (a) in such case. If I don't you ...
3
votes
1answer
144 views

How can I draw an ellipse with a rainbow color?

I need to draw a rainbow-colored (hue colormap) ellipse in tikz. Something like this but then in an ellipse shape, and in tikz. I've thought about drawing to ellipses, one with rainbox filling, the ...
3
votes
1answer
95 views

Using tikz to create fancy Table of Contents

I am trying to create a fancy thesis style and I am stuck in the table of contents. I am adopting Pluton's idea from How to customize the table of contents using TikZ? but I get an error stating that ...
4
votes
0answers
60 views

Plot 3D stacked squares with shadow

This is an image I draw with tools. But I need to draw it with Tikz. And The 3 squares in the middle, I need to make them looks like 3D stacked with shadow. And the fonts on it, like 'a1', 'a2', ... ...