Articles of tikz pgf

Setting the position of an element using Tikz

Recently I’ve asked a question about “Inserting an image properly in a table”, and I got nice answers. I decided to adopt the accepted one but now I have another problem. I thought it was a minor issue, but I decided to ask another question after being directed by the answerer. Previously I asked about […]

Removing x-labels and confusion

I’m quite new to LaTeX. I’m trying to figure out how to get rid of the x-value labels altogether (because I have the key). \begin{tikzpicture} \begin{axis}[ width = 0.85*\textwidth, height = 8cm, major x tick style = transparent, ybar=2*\pgflinewidth, xticklabels=\empty, bar width=14pt, ymajorgrids = true, ylabel = {Percentage}, xlabel = {}, symbolic x coords={Doramus,Refaltido,Misanit,Fanatha,Sonphay,Laoli,Tidanme}, scaled […]

Graphing trigonometric functions, axes labeled with tick marks

I am providing the code for graphing three trigonometric functions. (In the preamble, I had to put a % before the command \usetikzlibrary{calc,angles,quotes} because LaTeX could not compile it with the command. It gave me the error can’t find file ‘tikzlibraryangles.code.tex’. MikTeX2.9 is compiling the code.) How do I add the labels “$\scriptstyle{y = \sin(x)},” […]

Make thick, patterned, rounded corner adjustable arrow

I want to do a specific type of arrow, patterned like this: Thick and patterned arrows Although I need the line to bend twice, like this: Is there any way to accomplish this? Thanks in advance.

Expansion Issues When Passing TikZ Styles to Macro Created by Macro

I’m struggling (again) with expansions. This time I have a generic function \misdirection that creates a TikZ environment subject to a few options. Then, I create a macro \freezeStyle that creates a new macro that has frozen some of the options to \misdirection. So \freezeStyle receives the style that I ultimately want passed to \misdirection. […]

How to import additional code into class file

I was inspired by the article “Fancy chapter headings with TikZ” (Stefan Kottwitz many thx) and I have created the whole fancy sectioning. But what I need to do now is to import this whole code for sections and chapter into my REPORT CLASS because I dont want this code to be in my project. […]

TikZ – draw only vertices of a path line

Is there a way to draw only the vertices of the triangles? \begin{tikzpicture}[x=1mm, y=1mm] \coordinate (A) at (0:12); \coordinate (B) at (120:12); \coordinate (C) at (240:12); \foreach \i in {0, 1, …, 9}{ \draw[line width=0.1mm] (A) — (B) — (C) — cycle; \path (A) coordinate (X) — (B) coordinate[pos=0.2] (A) — (C) coordinate[pos=0.2] (B) — […]

Using an array for reading and writing within Tikz loop

What is the right way of working with arrays in \foreach loops? I am trying to illustrate the Tower of Hanoi problem. I have a sequence of pairs “disk size”/”rod”, and my code is supposed to draw disks on the rods placed there in accordance to my sequence. However, there seems to be some problem […]

TikZ – Random superposition of drawings

I would like to imitate the first page of this pdf by using the following code for the hard job of making the sudoku grids. Indeed the problem is just to superpose several sudoku grids, and not to draw this sudoku grids individually. CODE \documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds,shapes} \tikzset { digit/.style = { minimum height = […]

Why are the endpoint lines of intervals (`|-|`) not shown completely?

I use \draw[|-|] () to (); to draw a few intervals. I expect that each interval is rendered like |—-| (see the 2nd and the 3rd intervals in the figure below). However, the top and the bottom intervals below show only a half of their endpoint lines (i.e., |). Why are these endpoint lines (|) […]