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)

5
votes
4answers
267 views

Difficulty with Tikz curves

I would like to draw this curve: Using tikz, I did the following \begin{tikzpicture} \draw [<->,thick] (0,5) node (yaxis) [above, text width=3.5cm,align=center] {$B_{J}(x)$} |- (7,0) ...
5
votes
1answer
104 views

Use timeline library with months

I'm trying to adapt this answer to a timeline that has months instead of years. The first part of the MWE below is just the timeline library. \documentclass[tikz]{standalone} % Timeline library ...
4
votes
3answers
127 views

Draw a binary tree using tikz

I'm trying to draw a binary tree using tikz package. If I use only circle, I get a tree. But I want to represent a subtree using a triangle. Now the tree gets uneven. I want to attach the arrows to ...
3
votes
1answer
88 views

Customizing itemize inside a node in beamer

I am working with the MWE below and I am trying to do something that seems to be easy, but I cannot figure out. \documentclass{beamer} \usepackage{tikz} ...
7
votes
1answer
126 views

How to create consistent 3D images in Tikz

I would like to create images similar to these ones: However I would like to be able to do so in a coordinate system specific way so that I don't have to think about how the 2D projection of the ...
3
votes
0answers
105 views

Create violine plots

I use pgfplots for most of my plots. Now I need to add a violin plot. Is this possible with pgfplots or any other package?
10
votes
2answers
185 views

How to divide with tikz calc (to find center of mass)

I am trying to calculate the center of mass of a few coordinates and the logical way of adding up and then dividing results in an error. \documentclass[a4paper,14pt]{scrartcl} \usepackage{tikz} ...
1
vote
1answer
75 views

Opacity of images in TikZ with beamer

I'm creating some slides and want to integrate a (pixel) graphic in a TikZ picture with opacity less than 1. I expect this code to work: \documentclass{beamer} \usepackage{tikz,graphicx} ...
2
votes
1answer
44 views

pgfplots - How can I fill the background to a “node near a coordinate”?

I'd like to have the nodes/values for each plot fill with white, so the grids get overdrawn, so to speak. Is this possible? (Note: I only activated the major grid for x for the sake of the thread.) ...
4
votes
2answers
185 views

Graph not properly rendered in tikz

I have the following data in data.dat file . TA | OP 6 | 20 17 | 24 18 | 17 19 | 17 22 | 19 33 | 27 19 | 28 13 | 18 24 | 16 19 | 19 9 | 18 21 | 22 16 | 10 19 | 12 ...
0
votes
0answers
45 views

Positioning tikz nodes to the top

I have four circles in a beamer frame, \begin{tikzpicture}[% common options for the circles: ball/.style = {circle, draw, align=center, anchor=north, inner sep=0}] \node<1>[ball,text ...
6
votes
2answers
124 views

How do I fix this error with my arrows

I am using tikz to generate sine and cosine graphs with arrows at the ends of each curve. The arrows appear fine for the sine curve, but not so for the cosine curve. Why does this occur and how do I ...
5
votes
1answer
103 views

TikZ: trying to draw a phyllotaxy (sunflower pattern) and get short by computation limits

As the title says, I'm trying to draw a sunflower pattern with TikZ. I base my experiment on information found on this tutorial written by Jim Bumgardner, mainly from examples 8 and 10. His ...
5
votes
3answers
191 views

Using calc: Draw tangent lines to an ellipse path by tikz

I wonder if one can draw tangent lines out of a point to a path of an ellipse using tikz. Actually for the case of circle paths this can be accomplished easily as given in the tikz-pgf manual, but for ...
5
votes
1answer
103 views

Alignment of lines with Grid

I am trying to draw the following figure. In this figure, I am trying to provide the dimensions of the rectangular blocks. I draw the figure using following code- \documentclass{article} ...
0
votes
1answer
67 views

Convert pdf image to png. TiKZ

I'm making a small automata with TiKZ and I need to convert it to a png without having all the empty space around. Right now I get a whole page but I only want the automata. I have followed the ...
6
votes
1answer
63 views

how to avoid drawing of graph through inset

I have a figure which requires an inset. Using pdfplots i am nearly there but have the main graph plotting through the inset. How can i avoid the drawing through the inset? Also is it possible to ...
2
votes
3answers
131 views

Create a good looking 2-actor normal-form game such as Prisoner's Dilemma

I am having difficulties in adjusting the TikZ code to get a symmetrical output matrix; I guess the * is the reason the right block is somehow higher? ...
0
votes
1answer
64 views

Drawing two angles, with arrowheads, and labeling edges of a triangle

I was given the following code on Stack Exchange for drawing a triangle with one vertex at the origin and with two angles drawn from the positive x-axis. I am using WinEdt to compile it. It is ...
2
votes
1answer
329 views

Want to add the Skype and LinkedIn Icon on the left side of Friggeri Resume?

\documentclass[]{myfriggeri-cv} % Add 'print' as an option into the square bracket to remove colors from this template for printing \usepackage{unicode-math} \usepackage{fontawesome} ...
3
votes
2answers
150 views

Tikz: How to Align the Text of simple Nodes?

I tried to put up a nice little graphic, to make an example for String-Matching. My Problem is the "b" is not aligned with a and c and i can't find a way to handle this: \begin{figure}[h] ...
2
votes
2answers
115 views

Setting Text on a Path

Using LuaLaTeX, I want to create an effect where text begins as a footnote but curves upward and ends up in front of the body text. Sort of hard to describe, but picture the body text ending ...
4
votes
1answer
111 views

\chaptermark in tikz header (book design)

How can I add the current chapter and section to the node? \node[color=white, anchor=west] at ($(current page.north west) - (-10ex,3.5ex)$) {\ifnum\value{chapter}>0 \thechapter.~\chaptermark\fi}; ...
0
votes
0answers
42 views

Aligning figures in a table

I'm trying to align four figures vertically and horizontally. But I couldn't get it right in spite of repeated tweaks. I guess its a fairly small error. Can someone help me out? Here is a MWE -- there ...
1
vote
0answers
89 views

Tikz code not working in LyX but working in pure Tex

I'm trying to add a tikz picture in my LyX document. To do this, I organize the tikz tex code in Texmaker (a friend sent me a tikz code model in a .tex file) and then I copy it to a ERT in LyX (making ...
6
votes
0answers
51 views

tikz foreach loops: is there an equivalent of metapost's step?

I apologise if I'm using and searching with incorrect terminology. This seems an obvious question (to me) so I'm surprised I've not found anything (and so assume I'm missing something). In metapost, ...
2
votes
1answer
68 views

Unwanted empty page in the middle of a chapter

I am having an empty page in the middle of a chapter of my document. The only information that appears is the page number. The pages before and after are filled with text and figures. I have checked ...
9
votes
1answer
101 views

Problems with TikZ when I change document class

I encountered a problem related to TikZ when I changed from article document class to mnthesis document class, which is custom made. The mnthesis document class does not recognize tikz. Please see ...
6
votes
1answer
112 views

Smooth edge surrounding without specifying control points

I'm trying to build a curved edge from s to a named x and a curved edge from s to b named y. Beside the problem to >>curve<< them properly i want to give them a background like in this question ...
5
votes
1answer
107 views

Is it possible to define the position of top bottom and middle color in fill?

In the following example: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,calc,shapes,shapes.geometric,patterns} \begin{document} \begin{tikzpicture} ...
5
votes
1answer
127 views

TikZ: Re-arranging the hierarchical diagram

I was quite impressed by the solution given by "cfr" for the question posted here. Can you suggest a method to change the two main children (labelled Projection matrix Theory and Reconstruction ...
7
votes
2answers
332 views

Drawing circular paths in random locations (TikZ)

How can I draw circular paths as shown below in random locations (randomly spaced in the x and y directions)? MWE: \documentclass[border = 0.12cm,tikz]{standalone} ...
2
votes
1answer
74 views

Subgraph node overlaps with regular - tikz

I'd like to have beautiful state machine without any thinking of it's layout. I also need some node grouping with description of the group. So, I wrote the following: \documentclass{article} ...
7
votes
3answers
94 views

Conditional compilation of code based on package version [duplicate]

I am working on a document with a colleague and we have different versions of PGF/Tikz installed -- I have version 3 and he has version 2.10. This is causing a problem for compilation on our two ...
2
votes
1answer
67 views

How to line up a tikz image with the bottom of a cell in a tabular

The code for the two images below is identical except for the colors and the 4pt in the bounding box in the bottom image. In the bottom image the diagonal line touches the corner of the blue area; in ...
1
vote
1answer
68 views

Tikz: Problem with Standalone

I have difficulty in using standalone package along with TikZ. I have the following standalone file: l1NormInAction.tex \documentclass[tikz,border=3mm]{standalone} \begin{document} ...
1
vote
1answer
80 views

Difference in Sound Intensity Level Plot

I've been trying to produce the following plot: And here's mine (No labels, still just trying to get the plot right). I can't seem to get a square grid, nor can I get the plot to start at -10dB. ...
4
votes
1answer
55 views

Sharp-symbol offset and text left-justification problem with tikz

I'm trying to improve a figure that I made with the tikz package. It currently looks like this: Specifically, I have the following two questions regarding the row and column headers: The sharp ...
1
vote
1answer
38 views

unwanted white space when combining surface plot with a vector plot

I am trying to produce a surface plot of a scalar field with a vector plot imposed on top using pgfplot/tikz. I am nearly there except that depending on the scale of the arrows white space is added ...
1
vote
0answers
71 views

Electric network one-line diagrams

I'm looking for a way of drawing one line diagrams of power distribution grids. So far I've come across CircuiTikZ, but this package seems to be oriented to a different kind of circuit diagram and ...
2
votes
2answers
110 views

String scattering diagrams with TikZ or other package in LaTeX

I am working on a paper and I need in the introduction to put a diagram. The diagram is the following (or something similar) and I was wondering how can I reproduce it in LaTeX code.
2
votes
1answer
69 views

Tikz: Using standalone

The following program copied from Mindmap/trees in TikZ is compiling independently. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{mindmap} \begin{document} \begin{tikzpicture}[ ...
2
votes
2answers
74 views

Trying to align dots along part of a circle

I'm working on a circle with legs problem and I'm trying to replace n "unseens" legs with dots. But I can't find a good way to align them. I tried aliging them along an arc, but I can't find a good ...
4
votes
1answer
74 views

Difference between \pgfmatharray{\a}{0}, \pgfmathparse{\a[0]}, and \pgfmathparse{array(\a, 0)}

There are at least 4 different (in code a-d) ways to access items in lists/arrays. Out of curiosity I wanted to see what happens with different combinations. I selected 6 different (in code A-F) input ...
2
votes
1answer
60 views

Table Occupies all text area

How can I do this in an easy way using pstricks or tikz , i cant put the text in the right place my MWE \documentclass[a4paper]{article} \usepackage[margin=1.5cm]{geometry} ...
3
votes
1answer
326 views

Beginner: Drawing using Tikz

I was quite impressed by the figures generated by TikZ and wanted to try TikZ to generate a few figures (please see the attached image drawn using an external WYSWYG program). When I tried to ...
4
votes
1answer
34 views

Setting result from pgfmathifthenelse as variable

So I'm trying to set a variable using the value of another variable. Basically something like below: \pgfmathsetmacro{\newVar}{\pgfmathifthenelse{\oldVar==0}{(\x/2)}{\x}} But no matter what I do I ...
4
votes
1answer
227 views

How can I efficiently draw multiple connections between nodes?

I believe the following figure has been drawn very inefficiently. I need help drawing the same figure using nodes and relative positioning (right=of, below=of, ...etc) instead of using the absolute ...
3
votes
1answer
63 views

Syntax for the node command

Look at the two diagrams at the top of page 50 and the diagram at the top of page 220 in the manual at the following web site. http://mirrors.rit.edu/CTAN/graphics/pgf/base/doc/pgfmanual.pdf I have ...
4
votes
1answer
83 views

Creating triangle commutative diagram with tikz-cd

I've just started using TikZ and need to create a simple triangle commutative diagram like this one. The closest I've been able to get is this. How do I get the h arrow to go from A2 to A3? ...