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
1answer
8 views

TikZ: How to distinguish multiple vertices with the same id?

(Almost minimal) working example: \documentclass{beamer} \usepackage{tikz} \usepackage{verbatim} \usetikzlibrary{arrows,shapes} \begin{document} \pgfdeclarelayer{background} ...
4
votes
1answer
73 views

How to draw NO2 in LaTeX?

It would be nice if you could help me to draw NO2 in LaTeX. The figure should look like the example image. On this website is some information about the chemfig/chemmakro package. My code untill now ...
0
votes
1answer
12 views

Replace vertex in TikZ

I'm completely new to TikZ and took a look at an example graph: http://www.texample.net/tikz/examples/prims-algorithm/ For a presentation I need to replace a vertex by another vertex at a certain ...
0
votes
0answers
7 views

Plotted line in tikz stops in middle of grid

The plotted line stops and doesn't go on till the border of the grid: This is my code: \documentclass{article} \usepackage{tikz} \usepackage{amsmath} \begin{document} ...
0
votes
1answer
10 views

Align tikz picture on the right side of the screen, next to text

I want to have some code, and then on the right side of it a tikz picture. I tried 'flushright' but that didn't work. This is my code: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} ...
1
vote
1answer
28 views

Effective potential with tikz

How I can draw a perfect picture of an effective Newtonian potential? I tryed, but it is not so good as I want. \begin{tikzpicture} \begin{axis}[ xmin=0, ] \addplot[ red, smooth, domain=-5:1, ...
2
votes
0answers
47 views

Putting coordinate axis on a TikZ picture

I get the following error: Package pgf Error: No shape named Q is known. Without the \begin{axis} ... \end{axis}, the code is compiled correctly. I should get a right triangle with vertices A, P, ...
2
votes
1answer
42 views

Horizontal decision tree in TikZ

I've been looking for a TikZ example for a while now that looks something like the attached powerpoint picture. I can't imagine that nobody has done something similar. I tried adapting this example, ...
2
votes
2answers
31 views

\texttt in decoration causes LaTeX to hang

I have the following code: \documentclass{standalone} \usepackage{tikz} \begin{document} \usetikzlibrary{decorations.text} \begin{tikzpicture} \path [->,decorate,decoration={raise=-5pt, text ...
15
votes
2answers
9k views

Increase the thickness of node border in TikZ

Suppose I have a node in the shape of a circle. How can I make its border thicker? \node[circle, draw=blue!80, inner sep=0pt, minimum size=12pt] (1) at (0,0) {1};
0
votes
0answers
28 views

Undefined control sequence when using callout shapes [on hold]

I wanted to use callout shapes from TikZ in a beamer presentation. Since I got problems with my own macros, I copied the source code from the TikZ manual and got the following error message ...
4
votes
1answer
115 views

Homework Problem Sheet Template

Could someone make this picture of Homework Problem Sheet Template in sample code in LaTeX with the same font size by the way i already add tow pictures in the front of document to make it more cute ...
1
vote
0answers
35 views

Can I reduce the timeout for compilation?

I'm writing a document with many pictures using the tikz package. A small error in these often do not make compilation fail outright, but rather time out. (Example from ...
-1
votes
1answer
69 views

draw pair of scissors in tikz [on hold]

Is there someone who can help me to draw a pair of scissors in latex? The picture below is good enough. I have no problem with constructing the rings, but I don't know how to make the "body"? I have ...
5
votes
1answer
298 views

legend problem in highlighting a data plot

I followed the tips on highlighting in data plots at http://www.howtotex.com/tips-tricks/highlighting-in-tikz-plots/ The highlighting does not work well with \addlegendentry. A MWE is shown below. ...
6
votes
2answers
187 views

Drawing polygons

I would like to draw the following picture using TikZ: I've done this \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=2] \foreach \x in {0,60,...,300} ...
13
votes
4answers
8k views

tikzstyle default node text with fill color

As a follow-up to this solution on defining the default text for a node, how can it be done with the use of a fill color? Note below that specification of a fill color abolishes the node text. ...
13
votes
2answers
1k views

TikZ style attribute for adding default node text?

Is there a TikZ style attribute for adding default text to a node? For instance, I want to be able to do something like the following: \begin{tikzpicture}[% stuff/.style={% draw, text=Bla ...
1
vote
1answer
34 views

Adjust edge endpoints depending on node label

I would like to draw a tree where the position of edge endpoints relative to the node depends on contents of the node, and may change between the parent edge and the child edges, to point out a ...
2
votes
0answers
47 views

How to make a function inside the tikzpicture behave like outside

I have a makro which generates a structure(rule) and a reference to that structure. It does not behave when inside a tikzpicture. How to make the function robust to reference the structure even when ...
1
vote
0answers
68 views

How can I draw Indian horoscope charts?

I was wondering if Indian horoscope charts can be drawn in LaTeX. Here is one example: It has 12 divisions. And in each of the divisions there may be one or multiple Grahas with their corresponding ...
0
votes
0answers
39 views

Self-Referencing Relationship: TikZ Crow's Foot ERD

I saw posting "Drawing a complete ER Diagram in Crow's foot style by TikZ" and answer. But, using the codes, I was not able to add any proper self-referencing relationship. E.g., an Employee ...
12
votes
3answers
2k views

Variables in TikZ

I use TikZ to draw graphics in LaTeX. I'd like to do arithmetic on variables. For example I haves nodes named after N-1 and N-2 and I'd like to create the N-3 and N-4 nodes as +2 from the first nodes. ...
1
vote
1answer
46 views

Drawing Vertical Plots

is there any quick way to draw vertical plots with pgf-plots? I need to draw successive vertical lines for the plot below: \begin{center} \begin{tikzpicture} \begin{axis}[ clip=false, ylabel={}, ...
2
votes
1answer
25 views

How to group nodes of an automaton with tikzpicture

I want to obtain this result: and so far I've written this code: \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{automata,positioning} \begin{document} \begin{tikzpicture}[% ...
2
votes
2answers
68 views

How can I add more coordinates to standard TikZ shapes?

Question I would like to know how to add an arbitrary number of coordinates to the default shapes of TikZ—particularly to the side of a polygon. Sample This is similar to ...
-1
votes
0answers
35 views

Bent shapes with TikZ [duplicate]

How would it be possible to draw something like this?
2
votes
2answers
72 views

How to combine a top-down and bottom-up binary tree in one picture?

I want to draw a binary tree like the one in the picture below. Unfortunately, I do not have any clue, whatsoever, on how to draw two trees from top and bottom to match their leaves. Any help would be ...
6
votes
1answer
70 views

Equivalent to “shorten <=” for intermediate points

Halo everybody, I try to plot a data set using tikz & pgf. I want that the points in the plot are connected, but the line shouldn't touch the points. I can achieve this for the first and the last ...
0
votes
0answers
31 views

font size with tikzset and tikzscale not working

I want to set the font family and size for all pgf/tikz figures in my preamble. But when I use tikzscale, then this is ignored. Can anyone help? \documentclass[a4paper,12pt]{scrbook} ...
4
votes
3answers
67 views

Change line shape on TikZ

I'd like to draw a diagram of a long exact sequence. This is what I have done: \documentclass{beamer} \usecolortheme{wolverine} \beamertemplatenavigationsymbolsempty \usepackage{tikz} ...
6
votes
1answer
89 views

How to make right angle mark in geometry 3D like this picture?

I want to mark right angle. I tried in Geogebra \documentclass{standalone} \usepackage{pstricks-add} \begin{document} \psset{xunit=1.0cm,yunit=1.0cm,algebraic=true,dotstyle=*,dotsize=3pt ...
0
votes
0answers
26 views

How do I create a tikz picture overlay that does not disturb the vertical placement of other text? [duplicate]

I'm having difficulty getting a tikzpicture to not cause a disruption in the vertical placement of material outside of the environment. Here's a MWE that illustrates the problem. ...
8
votes
1answer
196 views

Multi-Line/Wave Generator Package for LaTeX?

I'm looking at my professors slides now: http://www.math.ucla.edu/~virtanen/40a.1.14s/schedule/lec1.pdf The first slides always have these intricate wave lines. If you Google search for "wave ...
4
votes
1answer
61 views

Graph doesn't stay within grid

I've plotted two simple functions in Latex using tikz. It looks like this: As you can see, the curve doesn't stay within its grid. How can I fix this? This is my code. I'm using documentclass ...
4
votes
1answer
41 views

Mutiple composable styles for a tikz node using “append after command”

I'm trying to build a little drawing library in which each node will have the same base, but can be annotated with various options which will cause extra things to be drawn in/on the node. I'm ...
3
votes
1answer
88 views

Complex function plot using TikZ or PGFPlots

I need to plot some steps of this approximation http://mathoverflow.net/a/27127 but don't know how to start.
3
votes
3answers
99 views

How to get coordinates going from 0 to 1 in tikz image

I'm trying to create a cover page with a background image filling the entire page. On top of that in the lower third of the page should be a transparent rectangle going from side to side and on top of ...
1
vote
2answers
58 views

pgfplots mistake with label

i have a problem with my graph. i can't figure out why latex puts this into my description. i had to specify the xticklabels manually. but latex still gives me that number on that position. i'd like ...
7
votes
2answers
1k views

Define a color in a tikz style

How do I do a definecolor in a /.style? \pgfkeys{/IMMstyle/.style={ inputnode/.style={shape=ellipse,draw,inner sep=2pt,minimum size=5.0mm}, \definecolor{dpred}{rgb}{0.50,0.35,0} ...
1
vote
0answers
51 views

How to get two data series in tikz plot?

How do I create a second data series from the code below? I have tried separating the two curves with curly brackets but it was not the correct code. \begin{figure}[h!tp] \centering ...
4
votes
1answer
82 views

Wrong spacing of circled numbers using Tikz and exam class

I am using XeLaTex. I am also using the package exam. I am preparing a multiple choice test, but I have no Scantron and I want students to tick the desired circled answer by pen. This is the relevant ...
7
votes
4answers
222 views

With TikZ is it possible to pass the node content through a preprocessor?

I've written a macro that scans its content for illegal characters and then changes them to something more appropriate. In the following example, the macro scans for _ and replaces them with ...
2
votes
2answers
55 views

Polynomial root labeling tikzpicture

I would like to label the roots of the polynomial below: \begin{center} \begin{tikzpicture}[scale=1.2,thick] \draw[->](-3mm,0mm)--(36mm,0mm) node at (34mm,-2.4mm){$p$}; % ...
6
votes
1answer
93 views

Relating tree nodes in forest to content in a table

I want to draw the following figure: I now converted my trees to forest and the following code is what I have: \documentclass{article} \usepackage{forest} \forestset{ sn edges/.style={for ...
1
vote
1answer
51 views

How to make this bar plot visible?

I am trying to visualize about 21 data points, each which gives a different value for 3 different tasks, so there are 63 unique values to plot. I have tried using pgfplots colored bar plot, but I ...
6
votes
1answer
94 views

Enumerate within TikZ node

Compiling the following code with pdflatex: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[remember picture, overlay] \draw (current page.center) node { ...
3
votes
1answer
48 views

Incompatibility of calc and some styles for forest

I got a cool solution for integrating a tabular-like object into a forest figure (Relating tree nodes in forest to content in a table) but this is incompatible with another cool solution for fixing ...
4
votes
3answers
84 views

Custom position of an arrow in flowchart

Here is my code: \documentclass[12pt,twoside,a4paper]{book} \usepackage{tikz} \usetikzlibrary{shapes,arrows} \begin{decument} \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, ...
4
votes
1answer
47 views

Exclude from fill. It works, but WHY?

I need to create a plot with an area filled outside a circle. Because the filled area has to be colored with 2 different colors, simply applying the odd-even rule did not work. This, it worked for one ...