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)

1
vote
1answer
62 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
28 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}[ ...
4
votes
0answers
54 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
30 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
22 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
34 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 ...
2
votes
1answer
30 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
18 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 ...
3
votes
1answer
76 views

Plotting a function on a triangular domain using tikz

I would like to draw a function on a triangular domain using tikz. For example, I would like to draw the function x*y on (-1, -1) -- (-1, 1) -- (1, -1). This is a MWE for the rectangular domain (-1, ...
4
votes
1answer
42 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
354 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
37 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
27 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 ...
1
vote
1answer
34 views

pgfplots very small Y values

I need to plot the following function: ...
1
vote
1answer
36 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
84 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
69 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
37 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
73 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} ...
0
votes
0answers
52 views

How do I convert a simple raster image to TikZ

How would you go about converting for example this logo into a tikz picture not using the png but drawing it yourself? I dont ask you to Draw the complete logo but I would like to know how to draw ...
4
votes
4answers
107 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
37 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, ...
0
votes
0answers
29 views

In Ubuntu 14.04 — Package pgfkeys Error:

I borrowed the following code from here (answer by @Gonzalo). I switched from Windows 7 to Ubuntu 14.04. Given code was working fine on Windows 7 but now on Ubuntu 14.04, I'm getting the following ...
3
votes
1answer
70 views

Making a random number

I have a problem. I have a graph, and I must paste a random number in every vertex of this graph. Vertices have coordinates. A part of code : \foreach \pos/\name in {{(0,0)/a}, {(1,-1)/b}, ...
6
votes
1answer
127 views

How to draw the physical tree with balls under both the stress of strings and gravity?

I want to draw the physical model of graph that has a ball for each vertex and a piece of string for each edge. In this model, if you lift a ball high enough, the other balls are pulled up along with ...
6
votes
3answers
140 views

Text projection onto plane in 3D pgf plots

I'd like to have text that appears as though it's written "on" one of the walls of a 3D tikz plot. MWE: \documentclass{standalone} \usepackage{tikz,pgfplots} \usetikzlibrary{positioning,3d} ...
4
votes
1answer
60 views

tikz foreeach list is empty?

I' m trying to make an animation with the following code \documentclass[presentation]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{graphicx} ...
0
votes
2answers
84 views

Rectangular Approximation Method (Riemann Sums) Diagrams

Does anyone know how to make relatively simple diagrams like the images below? Is there a some sort of "template" I could use perhaps? I'd like to code my Calculus notes but I'm not sure how to make ...
3
votes
1answer
52 views

A simple line plot in LyX

I am a LyX user and I would like to use a line plot in one of my papers. This is simply a line with few identified points. For me the points of interest are 24, 32 and 38. Could you please tell what ...
7
votes
3answers
202 views

cannot combine \foreach and \draw

I just cannot debug this code. After typesetting it keeps on giving the error of: "Undefined Control Sequence" When individually coding rectangles for each set of coordinates the code works though, ...
14
votes
6answers
536 views

Draw incline in 3D with TikZ

I need to draw an incline in 3D (triangle in 3D), I have tried to modify this example but it ends up looking wrong. Can anyone suggest how to get started with this or provide an example that's closer ...
0
votes
0answers
41 views

Pgfplots externalizing figures: (inconsistent) white borders

I'm using the external library \usepgfplotslibrary{external} \tikzexternalize[prefix=tikz_figures/] to externalize my figures from one document and include them in another. The problem is that the ...
4
votes
1answer
107 views

Is TIKZ sending ambiguous PDF instructions that only TEXstudio understands well?

TEXstudio is the only MAC software (although not originally designed for MAC) that has a PDF viewer that renders perfectly well dashed and hatched lines drawn with tikz. What does TEXstudio do that ...
3
votes
2answers
67 views

How can you use square brackets in tikz diagram?

I am trying to draw a sequence in TeX with Tikz where the vertices are $[X,Y]$, however I can't seem to get the code to work. Here is the code I am trying to use. \documentclass[12pt]{amsart} ...
11
votes
1answer
203 views

Demonic correspondence: Best practices when defining devils in TiKZ

tikzsymbols defines a series of symbols which can be used in text (or nested in larger pictures) and which can be customised in various ways e.g. scaling size, choice of colours etc. For example: ...
2
votes
1answer
67 views

How to plot a graph of arbitrary points in TikZ

I have this code: \documentclass[border=2mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows,decorations.pathmorphing,backgrounds,positioning,fit,petri} \begin{document} ...
6
votes
2answers
156 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} ...
4
votes
1answer
49 views

Tikz: clipping path from external file

I would like to use the data of an external file as the clipping path with Tikz. Something in the line of: \documentclass[10pt,tikz]{standalone} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
3
votes
3answers
111 views

Annotate stoichiometric numbers below chemical reaction

I use the chemmacros packages to write chemical reactions in LaTeX, like this: \ch{CH4 + 2 O2 -> CO2 + 2 H2O} But now, I want to annotate the stoichiometric numbers below chemical reaction, as ...
4
votes
2answers
95 views

Trying to emulate CSS “object-fit” behaviour with PDF's and LaTeX/TikZ

I have a collection of PDF files (each exactly one page) each one with a possibly different size and aspect ratio. I'd like to create a document where I include each PDF into a box of the same size, ...
2
votes
0answers
128 views

Tikz issues: mood etc [closed]

I'm sorry if this has been answered before (e.g. see Tikz drawing different type of arrows) but: I am also new to the TikZ package, and I need to make this image: in tikz. Is there a quick way ...
0
votes
2answers
195 views

Drawing in LaTeX

I really like Tikz for drawing little and easy diagrams in my LaTex documents. However, I am not very skilled so I'm looking for someone to give me a help to realize this drawing (without colors: D). ...
3
votes
0answers
54 views

In TikZ, what are the coordinates “node” uses to “draw”? (the effects of the difference between “inner sep” and “outer sep”)

I'm trying to duplicate as best as possible a particular flow chart design from a textbook. The following code almost achieves what I want: \documentclass{article} ...
10
votes
1answer
126 views

Draw closed section of sphere using pgfplots

I want to draw a section of a sphere to represent its volume. I have currently got the following: \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.11} \begin{document} ...
4
votes
1answer
121 views

How is TikZ meant to be pronounced? “tiks”, “tikz” or “tik-zee”?

Disclaimer: I'm not sure this question is on topic on either the main site or the meta site, but the question itself is definitely "meta". Knuth writes about the canonical pronunciation of TeX at the ...
2
votes
1answer
37 views

TikZ and tikzorbital: bacground and caption fill width correspondence

Current question related with my other question, TikZ and tikzorbital: problem with background. In prevous question, the problem with layers has been decided: All I need is just fill rectangle ...
5
votes
2answers
174 views

How to draw 3d vector field on a line?

How to draw 3d vector field on a line? I want to visualize the vector field $( m_x(x), m_y(x), m_z(x) )$. After searching "visualize vector field", I find that most plotting software either plotting ...
5
votes
1answer
128 views

Macromize a tikzfigure

I have this figure (/ 2 figures) \documentclass{article} \usepackage{pgfplots} \usepackage{subcaption} \newcommand{\xfigscale}{.5} \newcommand{\yaxscale}{.75} \begin{document} \begin{figure} ...
4
votes
2answers
66 views

In tikz, is it possible to define a node and set its position later?

I'm trying to draw a diagram and my code is getting too cluttered and difficult to read. For code style purposes, is it possible to define a node in one place and mess with its positioning later? ...