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)

4
votes
2answers
160 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 ...
2
votes
1answer
60 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
1answer
75 views

How can I make concentric circles as grid for a polar plane?

But I need to delimitate the circles for x, y in [-2,6]. \begin{tikzpicture} \draw[yellow!10, fill=hkvbluelogo!5](-2, -2) rectangle (6, 6); \foreach \s in {0, 1, 2} { \draw [lightgray] (0,0) circle ...
1
vote
0answers
28 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: ...
1
vote
1answer
31 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: ...
2
votes
1answer
51 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 ...
2
votes
1answer
52 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 ...
1
vote
2answers
108 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 ...
7
votes
3answers
253 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} ...
4
votes
1answer
52 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?
3
votes
1answer
47 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 ...
2
votes
0answers
32 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 ...
5
votes
1answer
138 views

How do determine the arrow form in Tikz

I plotted following image: Using this code: \documentclass[10pt,a4paper,twocolumn]{article} \usepackage{bondgraph} %Draw bondgraphs ...
1
vote
1answer
28 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 ...
0
votes
0answers
28 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) -- ...
3
votes
1answer
56 views

! Argument of \pgfmathrnd@@ has an extra }

The followin code gives this error : ! Argument of \pgfmathrnd@@ has an extra }. <inserted text> \par l.12 } ? ! Emergency stop. <inserted text> ...
3
votes
1answer
47 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 ...
15
votes
2answers
417 views

“Hobby” library stopped working after updating to TeXLive 2014

After upgrading to TeXLive 2014 compiling my TikZ pictures prepared with the hobby library stopped working. Consider the following MWE: \documentclass{article} \usepackage{tikz} ...
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} ...
1
vote
0answers
55 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
29 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 ...
1
vote
0answers
40 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 ...
1
vote
1answer
81 views

How do I add a “less than” symbol in the flowchart?

This is the edge drawing command using the tikz package. I want to display, Blinks < 3 in the line. \path [line] (L) -- node {Blinks 3}(N); Thanks!
5
votes
1answer
97 views

`shorten` and bounding box in tikz; possible bug?

While working out this answer, I found out that shorten options do not count towards computing the bounding box of a tikzpicture. Case in point: \documentclass{standalone} \usepackage[]{tikz} ...
3
votes
1answer
45 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 ...
60
votes
6answers
6k views

What are the relative strengths of TikZ and Asymptote?

I want to compare TikZ and Asymptote for their abilities in 2D & 3D functional plot and other general purpose, simple drawings. What are the strong aspects of TikZ over Asymptote?
6
votes
2answers
202 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)}) ...
4
votes
1answer
79 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, ...
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 ...
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}% ...
1
vote
1answer
32 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}{!}{ ...
2
votes
1answer
58 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 ...
0
votes
1answer
68 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 ...
1
vote
1answer
34 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
35 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
38 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? ...
3
votes
1answer
122 views

Rotation of braces

How can I rotate a brace to make it appear this way? I'm currently using this code: \documentclass[french]{beamer} \usepackage{tikz} ...
8
votes
1answer
86 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
20 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) ...
3
votes
1answer
113 views

Convert image to code (TikZ? PSTricks?)

I have a ... pdf file, which contains figures of plots such as the following: Now the second plot isn't too hard to draw on TikZ (I assume... I hope? I don't have any experience apart from ...
29
votes
2answers
4k views

Rounded corners on only one side of a TikZ node

How can I make rounded corners on one side of my node (only right, only left)? \documentclass{minimal} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node [fill=gray, rounded ...
1
vote
1answer
78 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
147 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} ...
3
votes
1answer
106 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
0answers
46 views

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} ...
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
3answers
870 views

Define a new environment to combine tikzpicture and lstlisting

I would like to define a new environment to combine the tikzpicture environment from package pgf/tikz and the lstlisting environment from package listings. The result would be to first produce the ...