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)

2
votes
1answer
26 views

plot with tikz/pgf from external txt file with one X axis and several Y axis

I am a very beginner of Tikz/pgf. I have searched quite long but didn't found the answer. How could I plot from an external txt or dat file that with one X value and several Y values? For example, the ...
4
votes
1answer
37 views

Connect parallel lines to node

Sorry guys, I literally can't work out how to do this... Consider the following figure: This is drawn by: \begin{tikzpicture} \begin{scope}[rotate=+60] \foreach \x in {-0.3, -0.2, ...
1
vote
0answers
41 views

Fading along a plot line in tikz

I'm using the following to draw the electron wavefunction around an atom. I'd like to fade out the line towards it's end. I've read all the relevant questions I can find, Any ideas? ...
4
votes
1answer
56 views

Half arrows in graph using TikZ

How can I create half arrows like the colored ones in the answer to this post using TikZ? I know how I can create custom arrow tips, but how can I extend this to the tail of the arrow? I would ...
2
votes
0answers
12 views

Definition conditional on pgfversion [duplicate]

Due to a change in behaviour between versions of pgf, I want to introduce a conditional definition that depends on whether or not \pgfversion >= 3. How can I do this?
2
votes
1answer
59 views

How can I parametrize two tikz circles to fit tufte marginpar?

Ho can I parametrize the circles to fit the tufte marginpar? I want to able to change the sovrapposition of the circles (possibly in ratio from 0 to 1) and get an adjusted \diameter to fit ...
2
votes
1answer
32 views

Nodes put one on top of the other

I am a total beginner in tikz and I am using the following code (slight modification from texample.net) to draw 2 red black trees. The problem I am facing is that both trees are placed one on top of ...
0
votes
0answers
41 views

how can add axes to spy box in latex?

i want add axes to spy box for example on spy box shown interval [-1,1] or interval that zoom in automaticly.please with this code.not change. \documentclass{standalone} \usepackage{pgfplots} ...
1
vote
0answers
51 views

how arrange my data in txt file for plot mesh in latex?

i have a data file and want plot mesh/surface for it but the output isn't suitable. \documentclass{article} \usepackage{tikz, pgfplots} \usepackage{pgfplots} \begin{document} % Preamble: ...
2
votes
1answer
65 views

2 censoring ticks, 2 different colors

I'm trying to create a plot with two distributions, two different censoring points and two different colors. I've managed to create both distributions and give them different colors. I've also created ...
4
votes
1answer
59 views

Coloured shapes inside triangle

How would it be possible to achieve something like the following I attach with TikZ and further to be able to color differently and even put a legend inside each smaller shape?
2
votes
1answer
73 views

TikZ- Filling a circle with a Pattern- Unexpected behavior

Can anyone help me understand why this behavior? \documentclass[journal]{IEEEtran} \usepackage[pdftex]{graphicx} \usepackage{tikz,pgfplots} ...
2
votes
0answers
37 views

How to use variables in calculations when defining a new TikZ command

I'm trying to define a new command to use in a TikZ picture. but it seems I can't work with variables (in this case the \defs) inside the newcommand definition. At least not the way I am doing it ...
2
votes
1answer
41 views

Package pgf Error: No shape named is known

I have encountered a problem Package pgf Error: No shape named is known but, I do not know what's wrong with it and how to fix it? Can anybody help me? My code is as follows: ...
0
votes
0answers
49 views

How to build a shade over more than one rectangle with TIKZ?

i have the following code, thats build a Rubikscube: \foreach \x in {0,1,2} { \foreach \y in {0,1,2} { \path[draw,fill=blue] (\y,\x,3) -- (\y+1,\x,3) -- (\y+1,\x+1,3) -- ...
1
vote
1answer
31 views

How to use optional arguments in newcommand with TikZ in the middle of a path?

I am trying to define a new command that will enable me to automatically format certain parts of my diagram. These parts consist of two nodes added above and below a path. I have a default value that ...
7
votes
3answers
357 views

How to draw stacked cubes of different sizes and colors?

I can (I learned here!) to draw, but I can't change the colors or make several distinct cells. \documentclass[12pt]{article} \usepackage{tikz} \usepackage{verbatim} \usetikzlibrary{positioning} ...
2
votes
1answer
58 views

Selectively boxing and labeling parts of an image

I want to let these boxes and text-labels fade after sometime, as it would lead to unwarranted cluttering in the image. Also, I want to ultimately put the image slideshow as a part of the beamer ...
1
vote
0answers
60 views

How do I use TiKz to draw lines in 3D grid?

I would like to draw this 3D picture using TikZ. Any suggestions?
0
votes
1answer
30 views

Adding text between two nodes in mindmap

I can't seem to find an example online that adds text in between two nodes. I can find a few examples that add annotation to the left or right, but I'd like to add text along the connection between ...
5
votes
2answers
188 views

Making a diagram like this in TeX?

I want to make two diagrams, along these lines: I'm having trouble finding a way to do it most simply, I've been able to do it with bubbles which I then don't draw the borders of, but that leaves a ...
1
vote
0answers
47 views

TikZ: double line, one dashed?

I'd like to draw a double line between two nodes; one of the two lines in the double should be solid and one dashed. I'd prefer not to have to manually shift one of the lines, but maybe this is the ...
3
votes
1answer
57 views

Changing filling of some node in tikzpicture using \matrix

I have used the handy \matrix trick in a tikzpicture (see code) to build up a graph. Now I wanted to change the filling of one node. I can't find out how! Of course, I can find out, how to change ...
3
votes
1answer
47 views

pfgplots plot in degrees

Everywhere on the web, and in this forum, tells me pfgplot plots trig functions in degrees, which is what I'm after. Here is the code for my graph: \begin{figure}[H] \centering ...
3
votes
1answer
51 views

adding single points to bar figure in pgfplots

I have a bar plot, in which I would like to add some single points overlayed on the bars. Those points are in another scale compared to the error bars. Below, I'm illustrating those single points in ...
1
vote
1answer
33 views

redundant number in the border

I have a piece of latex code and I would like to remove the redundant number 1 form top left of the border. How can I do this? \begin{algorithm}[t] \centering \small \resizebox{\linewidth}{!}{ ...
1
vote
1answer
36 views

Issue in plotting a grouped bar chart

I was getting the X-axis labels to be printed without spaces. There is an issue with legends, it is in the way of the delay values How do I keep the values horizontally and enlarge them for better ...
1
vote
1answer
37 views

Increasing the fontsize in a TikZ picture beyond \HUGE

I am using the follow code to create name signs for my students. How can I increase the size of the font beyond \Huge? I'd like to scale the size of the word without scaling the whole picture. ...
2
votes
1answer
39 views

Reason for multiple bars in Legend entries

I am have a similar Grouped Bar Chart as shown in this question and wish to know why there are multiple bars in the legend entry. Is it possible to modify the legend so as to consolidate these bars? ...
6
votes
2answers
204 views

Lua code with Tikz

Is there a reason why the code below leads to the error: ! Illegal unit of measure (pt inserted). <to be read again> e l.16 ...t [domain=-.1:.1,samples = 100] (\x,{G(\x)}) ...
0
votes
1answer
69 views

Triangle design/texture for Pythagorean theorem

I found a very nice and intuitive figure for a proof of the Pythagorean theorem: My main question is how to get that "look" for the triangles--I really like how the colors complement each other and ...
2
votes
1answer
60 views

TikZ/PGF number in shape name

I'm currently creating my own shapes in TikZ. I'm trying to get a multiplexer to work, but I named the shape mux4to1 and one of its anchors D0. Basically, I'm getting a syntax error with the ...
8
votes
1answer
88 views

Arrows are crossing in tikz

The arrows from Training Examples and Hypothesis Set are crossing eachother. Is there a way to avoid this, i.e. that they change the "dock" position on Learning Algorithm? \documentclass{article} ...
1
vote
0answers
21 views

Draw a set in set (subset) with tikz [duplicate]

I want to draw a set in a set with M being the subset and N the other set. I want them to look like "clouds", not perfect circles. I only came up with drawing perfect circles using the \draw (circle) ...
1
vote
1answer
81 views

Tikz: Shading a rectangle diagonally,

I'm trying to draw a 3D picture with some shading to make it look a bit prettier. So far it's just a cuboid, and I discovered the shading command. Here is what I have so far: ...
2
votes
2answers
148 views

I am trying to post a picture adjacent to bullet points

Please check the code block below: \documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame} { \frametitle{Characteristics of ABCDE} \begin{minipage}[c]{.5\linewidth} ...
1
vote
2answers
121 views

Flow chart path specification

I would like to draw a flow chart like one shown in the image. The problem with the code I have generated is the arrows leading to top blocks and the bottom blocks, i.e., B&C,D&E meet at a ...
10
votes
2answers
120 views
+50

How to position vertically more letters according to alphabetical order in the margin of the page?

The original question with accepted answers shows how to set a letter to the margin of the page and position it vertically according to alphabetical order. There appears two issues that I need to ...
0
votes
0answers
28 views

TikzFooter and Page Numbering

I have an issue with Tikzfooter which I have not had before. When I compile the tex file the Tikzfooter (a Orange coloured node with page number does not appear on my document but no error message. ...
0
votes
0answers
32 views

Highlighting specific parts of the figure [duplicate]

I want to know if I can use a particular type of formatting to differentiate one part of the figure from the text. For example, in the figure below, I would like to talk only about the role of part M5 ...
3
votes
1answer
67 views

tikz, pgfplots and polaraxis

I found a nice template for a polar graph 1 and I adjusted it as follows: \documentclass[12pt]{standalone} \usepackage[x11names]{xcolor} \usepackage{tikz} \usepackage{pgfplots} \begin{document} ...
3
votes
1answer
108 views

How to draw a cube wich covers the square exactly?

I want the top face of the cube that is whit and the otherfaces that are black. \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[scale=.4] ...
2
votes
2answers
55 views

Build PGF/TikZ matrix from CSV file

I want to automatically build a PGF/TikZ based drawing based on some external data that is read using csvsimple. My main issue at the moment is that most of the nodes are part of a matrix, mainly to ...
2
votes
1answer
84 views

Why in the following code, Father always goes below %mother?

I want that "Father is over mother". Why in the following code, Father always goes below mother? \documentclass{article} \usepackage{calc} \usepackage{tikz} \usetikzlibrary{trees} \begin{document} ...
4
votes
2answers
74 views

Is it posssible to embed list items `\item` in `NewEnviron` environments?

Question Is it possible to keep the \item commands in the body and wrap the itemize list environment with \NewEnviron from the environ package? I am also trying to wrap the list inside a TikZ node, ...
0
votes
0answers
45 views

TikzFooter and page numbering

I have a line of code in my TeX file \fancyfoot{\tikzfoot{\thepage\ / \pageref{LastPage}}} Since I updated my software the footer no longer appears on my PDF document once compiled. Has anyone ...
0
votes
0answers
36 views

More control over section headings than in my MWE; would using \titlesec and TikZ be better? [on hold]

\documentclass{book} \usepackage{xcolor} \usepackage[explicit]{titlesec} \titleformat{\section}[block]% {\bfseries\itshape\fontsize{13.6}{20}\selectfont} {} {1pt}% ...
3
votes
1answer
35 views

Spacing issue in subfigure/tikzpicture when labelling arcs

I have two simple graphs side by side that align perfectly when the arcs are not labeled, but as soon as I add the labels I get a spacing issue where there is a space between the second figure and its ...
4
votes
1answer
80 views

Plotting in random color within axis environment

I want to plot lots of (50, to be precise) function (Brownian motions, if you want to know) in one TikZ axis environment, with each line with a different randomly chosen color. I achieved to do it, ...
2
votes
0answers
28 views

Problem with `in` (to path) angle when negative scale factor are applied

Trying to convert a coment into a complete answer for How do determine the arrow form in Tikz I think that my solution there worked by chance and that MWijnand found a wrong behavior in to path ...