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
1answer
74 views

Change node style in a tikz picture

I'm trying to change the node style so a node looks like a cylinder with a variable height. currently i'm using this code \documentclass{scrartcl} \usepackage[utf8]{inputenc} \usepackage{tikz} ...
2
votes
0answers
47 views

Why is there a compilation error? - moderntimeline

I am using article class to prepare my CV. When I went through this, I found that moderntimeline package can be used only with moderncv. So I took only the TikZ code answered by Jake.But I get ...
6
votes
1answer
96 views

Aligning both tikz pictures and their captions

I am using two tikz pictures in subfigures. The baseline parameter allows aliging the subfigures via the nodes, however the caption (b) is much above the caption (a) in such case. If I don't you ...
3
votes
1answer
144 views

How can I draw an ellipse with a rainbow color?

I need to draw a rainbow-colored (hue colormap) ellipse in tikz. Something like this but then in an ellipse shape, and in tikz. I've thought about drawing to ellipses, one with rainbox filling, the ...
3
votes
1answer
95 views

Using tikz to create fancy Table of Contents

I am trying to create a fancy thesis style and I am stuck in the table of contents. I am adopting Pluton's idea from How to customize the table of contents using TikZ? but I get an error stating that ...
4
votes
0answers
61 views

Plot 3D stacked squares with shadow

This is an image I draw with tools. But I need to draw it with Tikz. And The 3 squares in the middle, I need to make them looks like 3D stacked with shadow. And the fonts on it, like 'a1', 'a2', ... ...
0
votes
1answer
56 views

Add a horizontal line to a PGFPlot and add it to the legend

I have a PGF Plot with some computational results from a CSV file. At the time the CSV file was generated, there was a value that was not known. That value needs to be on the plot also, however. What ...
3
votes
0answers
46 views

Getting a value, which has been given to a TikZ key

I'm trying to write a package based on TikZ, and this is the problem i'm currently stumbling upon. Let's assume, that I have a key, for example /tikz/circuit symbol unit, which executes some code. ...
3
votes
1answer
73 views

How do i get the coordinates (east, west, north) of an ellipsoid? (code does work for rectangulars)

\documentclass{report} \usepackage{tikz} \tikzset{add reference/.style={insert path={% coordinate [pos=0,xshift=-0.5\pgflinewidth,yshift=-0.5\pgflinewidth] (#1 south west) coordinate ...
4
votes
0answers
89 views

Draw background lines dashed in TikZ-3dplot depending on view position

In the graphic the red line is partly covered (in the background) of the 3d-object. Is it possible to draw the background parts of the lines dashed (or calculate the "intersection" points)? After ...
4
votes
1answer
148 views

Using TikZ to draw array figures

I am new in LaTeX and even more on TikZ. I want to use TikZ to draw the kind of figure described in the below picture. I looked for some tutorial or particular topics that deals with that but never ...
4
votes
1answer
47 views

tikz edges too long, how to control the distance of nodes

I have in a beamer class document the following graph: \begin{center} \begin{tikzpicture} [auto] \tikzstyle{every node}=[font=\small] \tikzset{ inst/.style={draw=black, rectangle}, ...
17
votes
4answers
802 views

How to shade text in different colors?

I need a single character in two colors. Figuring I could use the shadings library of TikZ, I followed the manual (section 23.4.1, the TikZ example): \documentclass{article} \usepackage{tikz} ...
1
vote
1answer
65 views

PGFplots - single legend in a group plot [duplicate]

I have a group plot and when I try to add a legend it repeats on all subgraphs. I want a single common legend line at the top of the whole graph. \documentclass{standalone} \usepackage{graphicx} ...
1
vote
1answer
48 views

PGFplots multiple ylabels

I want to have multiple y labels in a group plot. Now I have 4 different values for ylabels:Range1, Range2, Range3 and Range4. I want to add a common ylabel say "throughput". How do I do that? ...
2
votes
0answers
38 views

pgf Error: Arrow end type ``latex''' unknown

The following document: \documentclass[]{article} \usepackage{tikz} \usepackage{tikzscale} \usetikzlibrary{trees} \usetikzlibrary{calc} \begin{document} \tikzset{ block/.style = {draw, fill=white, ...
8
votes
2answers
111 views

Arrow tip center with TikZ (and pgfplots)

The arrow default behaviour is shown on the left picture part. How can I achieve that the “circle” arrow tips (see the picture below) end at their center, as drawn in the right image, but without ...
4
votes
1answer
52 views

Fading Nodes Along edge using `\draw`

How can i make nodes along an edge fade, here is the code i used to create the nodes \documentclass{standalone} \usepackage{tikz} \listfiles \usetikzlibrary{shapes,snakes} ...
6
votes
2answers
254 views

Drawing on a 3d cone with tikz

I can draw a cube as: \documentclass[12pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \pgfmathsetmacro{\cubex}{2} \pgfmathsetmacro{\cubey}{1} ...
5
votes
4answers
265 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
103 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
123 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
86 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
125 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
101 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
182 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
44 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
123 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
100 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
187 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
96 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
64 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
62 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
62 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
319 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
149 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] ...
0
votes
0answers
47 views

Notify changes into linked figures [closed]

In my previous post I had an initial linked figure. However I would like to annotate some changes like the image following: The already existing code is: \documentclass{article} \usepackage{tikz} ...
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
106 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
79 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
50 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
65 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
99 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
111 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
104 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} ...