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)

0
votes
0answers
3 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 ...
4
votes
1answer
56 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 ...
1
vote
0answers
41 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 ...
1
vote
1answer
40 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 ...
5
votes
1answer
72 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 { ...
2
votes
2answers
45 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$}; % ...
1
vote
2answers
44 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 ...
3
votes
1answer
36 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 ...
2
votes
0answers
25 views

Adding prefix to TikZ node and coordinate names

This question is somewhat related to my search for a good practice to include TikZ stuff in my documents. Suppose a document (book) with a lot of formulas and equations which you have decorated with ...
4
votes
3answers
74 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, ...
3
votes
1answer
47 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
0answers
61 views

Transform paper folding diagram to 3D object or vice versa

I made this commands to make paper models, and I ask if it is possible to have a 3D view of them converting in tikz-3D, or backward. But it's easier to draw the flat model and generate the volume ...
6
votes
1answer
59 views

TikZ figure renders different when changing document class

When using standalone or article class, my TikZ figure renders as it should. But when changing to tufte-handout, I get some misalignments. Why is this? How can I solve it? The code of the ...
3
votes
1answer
57 views

How to draw flowchart-Diagram with text?

\documentclass{article} %\usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,arrows} % For flowchart and Diagram %%%< \usepackage{verbatim} ...
1
vote
1answer
44 views

Flowchart Formatting - corrections

I am trying to come up with a flow chart as shown below: I tried as follows: \documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,positioning,shapes.geometric} ...
2
votes
1answer
40 views

How to convert polar coordinates to cartesian coordinates

I am new to tikz. I am using the following code (Polar co-ordinates) \def\radius{12cm} \begin{tikzpicture} \foreach \x in {0,10,...,350} { \draw [shading=radial, inner color=white, outer ...
5
votes
1answer
278 views

How can I draw a twisted 3D arrow?

Does anyone know how I can draw an 3D arrow that in itself is twisted by 90 degrees? I need such arrow to show how polarized light is twisted in a liquid crystal. I would like to include that arrow ...
7
votes
4answers
201 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 ...
5
votes
1answer
69 views

Labels and Pins with Tikzlibrary Graphs

I want to draw a simple block diagram with boxes, additions, multiplications, splits with pgf 3.0.0. I am quite content with the result so far, but I can not pin (with arrow) or label the nodes in ...
3
votes
1answer
33 views

Showing Tikz tree nodes after each other (using bracketing format of \Tree)

I want to display a tikz tree node by node. First A, then A and B and in the end all nodes. Note that I need to do it with the presented format: \Tree [. \node{A};] since trees are automatically ...
1
vote
0answers
29 views

How can I make the node order for references in TikZ not matter?

Question I am wondering if it is possible to make the order of nodes irrelevant, such that references work regardless of when they are mentioned...like some kind of pre-parsing of the code that ...
6
votes
5answers
225 views

How to set actual width for a rounded corners image using TikZ?

This question is closely related to LaTeX Photo With Rounded Corners. Suppose I want to put a rounded corners image in a marginnote, so the image fits the \linewidth of the margin. If I use the ...
4
votes
1answer
85 views

how do I create a complete graph in tikz?

I have the following code that I created: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[->] \node[label=west:$s$,circle,fill,inner sep=1.5pt] (n0) at (-1,1) ...
2
votes
1answer
50 views

Changing the positions of text and figures in tikzpicture

Suppose that I have something like: \documentclass{article} \usepackage{tikz} \begin{document} \noindent \begin{tikzpicture} \draw[fill=black!40, draw = black!40, line width=2pt] (-2, -2.5) ...
3
votes
0answers
34 views

Problem with tikz external library and chemfig - fatal error in external image

I have a document with a lot of diagrams created with PGFPlots and want to externalize those. All other tikz snippets should not get externalized. I achieve this by setting \tikzset{external/only ...
3
votes
1answer
41 views

Reverse Axes of pgfplots Ternary Plot

I am trying to make a ternary plot, however the default axis is opposite of what I need to accomplish. Here is an example: \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.9} ...
6
votes
1answer
88 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 ...
3
votes
1answer
101 views

Why does not `\spaceskip` work inside a TikZ node?

In my document, I need to increase \spaceskip in order to inject more space between words to make them more readable. However, the setting does not seem to apply to text that's inside a TikZ node: ...
3
votes
1answer
91 views

TikZ : let … Could not parse this coordinate?

I don't understand why ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{% alamain/.style={% decoration={show path ...
1
vote
1answer
40 views

pgfplots tikzpicture node to the right of axis is cut

I have a piecewise-defined function and would like a describing node to the right end of it. Unfortunately the node is cut and not visible using this code: \begin{tikzpicture} \begin{axis}[ ...
2
votes
2answers
94 views

Root locus plots using LaTeX

On my homework, I need to create a root locus plot. Wondering if anyone out there has good suggestions for a package that is able to create root locus plots, or a general plotting package that is ...
4
votes
0answers
98 views

Reasons to prefer tikz or pstricks over any GUI driven graphics tool

If I need a figure for a document I usually use TikZ or PSTricks. Sometimes I would like to promote it to other people who usually use only GUI programs for such kind of stuff. But then I restrain ...
3
votes
0answers
31 views

Text highlighting that works with CMYK xcolor mode?

I looked at Cool Text Highlighting in LaTeX, and as my MWE (below) demonstrates: ... the first part, highlighted with soul's \hl, fails when [cmyk]{xcolor} is used. The accepted answer in the link ...
4
votes
1answer
25 views

How to append style with decorations.pathreplacing?

\documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing,calc} \usepackage{pgf} \tikzset{alamain/.style={% decoration={show path construction,% lineto code={ ...
2
votes
1answer
44 views

How to refer to a word inside a running text as a TikZ coordinate?

Say you have some running text, and you want to be able to refer to some part of that text (like a single word) as a TikZ coordinate in order to, for example, draw edges to that word. What's the best ...
3
votes
1answer
36 views

TikZ decorations.pathreplacing and lineto curve ignored

Why the decoration option is ignored ? \documentclass[tikz,margin=3pt]{standalone} \usetikzlibrary{decorations.pathreplacing} \tikzset{alamain/.style={% decoration={% lineto code={ ...
1
vote
1answer
24 views

Forcing left text alignment in a fit Tikz node?

I would like to add Tikz "marker" nodes in running text; then fit another node based on those "marker" nodes' positions; and insert a text into the fitted node, such that it is left aligned, and with ...
4
votes
1answer
46 views

TikZ: How can I use \foreach variable to reference intersections?

Using the \foreach statement, I generate a set of lines that form a grid. I want to use the loop variables to name the individual paths to later draw something at their intersections. ...
5
votes
3answers
374 views

Two tikzpictures side by side

I'm trying to get these two tikzpictures to be shown side by side. This is what I have: Not the most minimal example, but should be sufficient: \documentclass[12pt,a4]{article} \usepackage{tikz} ...
2
votes
1answer
40 views

TikZ xscale \linewidth/width

I have a series of eps picture to be included in a LaTeX document. They need to be stretched to fit the linewidth, without mantaining their ratio. This solution works perfectly: ...
2
votes
0answers
28 views

Centre plot inside a node (Sigmoid Neural Node) [on hold]

Essentially I want to make a graph topology of a neural network. Since I have different type of nodes (rbf, sigmoid, linear) I want them to have in the node a shape of the function, something almost ...
2
votes
1answer
36 views

pgfplots very small Y values

I need to plot the following function: ...
1
vote
1answer
37 views

Adjusting tikz dotted line on page

I am writing a multi-page CV using a modified template from howtotex.com. However, I get a short line of dots at the top left of the second page. How can I get rid of this? I assume that I would have ...
1
vote
0answers
27 views

Error: \usepackage{tikz} [on hold]

I am using Win8.1 with TeXLive installed and TeXWorks as IDE. I want to make figures with Tikz but i always get said, that there is no package tikz when I try \usepackage{tikz}. When I look into my ...
5
votes
1answer
86 views

Label an intersection with Tikz

I have the following piece of code and I would like to add two things: Add a label to the red dot i.e., the intersection of the line segments. Unfortunately, just a ${...}$ does not seem to work. I ...
5
votes
2answers
75 views

arrays of counters for tikz nodenumbers?

Answering How to highlight portions of a matrix is a nice technique that isn't invasive, but requires manually numbering the nodes. I'd generalized it slightly: \documentclass{article} ...
0
votes
1answer
38 views

tikz-Picture in classicthesis-LyX v4.1

I exported a plot from MATLAB using matlab2tikz into a file testfig.tikz. As written here, I included \usepackage{pgfplots} \pgfplotsset{compat=newest} \pgfplotsset{plot coordinates/math ...
5
votes
2answers
75 views

How can I make a path with arrow “open” or “two-sided”?

I've drawn this arrow: But want it to look like this: How can I do that? This is my code for the first arrow: \documentclass[tikz]{standalone} \usetikzlibrary{arrows.meta} \begin{document} ...
4
votes
4answers
113 views

How do I override a previously set value for `/tikz/rotate`?

I was writing my own style for a particular collection of nodes, most of which I wanted rotated in the same manner. So I defined the following style: my node style/.style={rotate=60,draw} Please ...
1
vote
2answers
39 views

Node attachment position

I'm trying to create solutions to a matching type question which will require me to draw lines between boxes. I've been trying to use tikzpicture to do this: \tikzstyle{block} = [rectangle, draw, ...