Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [tikz-pgf]

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.

2
votes
3answers
132 views

Tikz: Draw lines between edges of rectangles

The following code \documentclass[tikz,border=1mm]{standalone} \usepackage{tikz} \begin{document} \newcommand{\opacity}{0.6} \begin{tikzpicture} ...
1
vote
1answer
31 views

Relative coordinate in node placement

When I try to use relative coordinates in \node using the syntax: (x,y)++(a:r) it gives me an error, but when I just specify the second coordinate as ++(a:r) it's like the (x,y) first coordinate is ...
3
votes
1answer
79 views

TikZ: help coordinate grid lines [duplicate]

When creating tikz pictures I quite often think that it would be quite useful to display a coordinate grid like this in the background of my picture in order to align certain points, lines, etc. I ...
3
votes
2answers
81 views

Tikz: Connect chain of rectangles with lines

I want to be able to connect the white rectangles with lines as shown in the picture below (this example consists only of two rectangles, the original code consists of more than 10 of such rectangles)....
8
votes
2answers
224 views

Filling a box excluding circles inside it

I was trying to create an image in TIKZ. My code is as below: \documentclass[10pt]{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, shadows, fit, arrows, ...
1
vote
0answers
50 views

Make a floating box anchored to text using inline code

I'm trying to make an Organizer, including a weekly planner, based on one I found on the net using tex. I've managed, until now, to make some changes to adapt it to my needs and, for example, include ...
1
vote
1answer
59 views

Draw a circle with a pointed radius using tikZ

I would like you to help me create this graphic. I would like to be able to use this one as an example for other graphics that I have to do.
1
vote
2answers
76 views

problem with creating a graph using tikz

I have a little problem. I have create with latex a graph. Here is my code \[ \begin{tikzpicture}[->,>=stealth,shorten >=1pt,auto,node distance=2.5cm, semithick] \...
0
votes
1answer
45 views

How to modify the following code to add 3 adjcent lines to the left of the generated code?

I made this lines in tkiz to make 3 adjacent parallel lines \node (A) at (-8.5,+1){}; \node (B) at (-8.5,-15){}; \draw[-] (A)--(B); \node[right=-10.3 of A] (b) (...
3
votes
2answers
67 views

Tikz: Create depth effect with circles

I want to draw circles to create a 3D effect. I'm having trouble figuring out how to rotate the image. Here is the code: `\documentclass[a4paper]{article} \usepackage{tikz} \usetikzlibrary{...
1
vote
2answers
62 views

Adding a small colored rounded box around inline text [duplicate]

Is it possible to write a command using TikZ to produce a small rounded and colored box around a piece of text, inside sentence? I know the \framedbox command gives a rectangle around a piece of text (...
2
votes
2answers
55 views

legend style customization in pgfplots

I have this bar graph, and I want to do 3 things: Remove the numbers in the bars, they are overlapping (If possible keep only one, symbolizing that both bars have the same value); Within the frame of ...
1
vote
1answer
46 views

How to scale down a group of tikzpictures and label texts independently

I have a multipicture figure \documentclass[parskip]{scrartcl} % \usepackage[margin=15mm,landscape]{geometry} \usepackage{tikz} \newif\ifcuboidshade \newif\ifcuboidemphedge \tikzset{ cuboid/.is ...
5
votes
5answers
159 views

font or tikz to draw tally counting symbols (///)

In a book I have the following to illustrate the traditional counting symbols used for hand tallying. They were drawn using PPT and saved in a PNG image, but look ugly and when I try to use one in ...
4
votes
2answers
107 views

Help with a node diagram

I am trying to recreate this diagram from a paper for my thesis. The idea would be that I can scale it to different sizes, only use parts of it and insert different nodes like the circles and ...
4
votes
2answers
109 views

Using a data file as input in tikz

I have a sorted data in a file (named data.dat). These data should be plotted vertically. I prepared a code in latex using tikz that works. The problem is each data is typed one by one in the main ...
1
vote
1answer
85 views

How to increase font using Tikz for the following dense protocol?

This figure is made with Tikz package, I need suggestions to make font more bigger and more readable. I tried many solutions such as \Large but still not able to increase the font more clear. My ...
4
votes
1answer
62 views

Placing a Tikzpicture and Matrix together

I need help a little on the matrix again and putting together the matrix and tikzpicture I created. \documentclass{article} \usepackage{tikz,amsmath} \usetikzlibrary{decorations.pathreplacing} %%% ...
3
votes
3answers
611 views

Reproduce a geometric drawing

How can I reproduce the following drawing using LaTeX? I suspect that TikZ has the right instruments to do it, but I'm not familiar with the package. Indeed, the most I can do with it is drawing ...
3
votes
1answer
70 views

How to scale a TikZ matrix?

I have the following matrix: which is obtained from the following code: \usetikzlibrary{patterns} \usetikzlibrary{matrix,decorations.pathreplacing,calc} %opening \title{} \author{} \pgfkeys{tikz/...
0
votes
1answer
99 views

What is the most efficient way to draw sets in LaTeX?

What is the best way to draw sets in LaTeX. I want to have a visualization of the Sets of a certain proof because it is way easier to see than to read. But I am not sure if it is worth the effort to ...
4
votes
1answer
67 views

How to make cuboids with different dimensions xyz with TikZ

I want to plot blocks (transportation pallets). Each block has 0.8m width, 1.2m depth, and 2.15m high, and they are placed horizontally (only one block height) grouped 2x2, 3x3, 4x4, 5x5, 6x6, 7x7 ...
4
votes
2answers
141 views

Making a (filled) surface in a 3d plane to look like a (filled) ellipse in 3d plane

I have the following MWE: %&lualatex % !TeX program = lualatex \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{tikzpicture} \begin{axis}[ ...
2
votes
1answer
62 views

Making a Table (Matrix) with Tikz

I need to get start with making a matrix in Tikz. I need to study the manual but need some help with an example to get started. My minimal example is very poor but it is the best I can do without ...
2
votes
2answers
103 views

How can I avoid escaping the # character as a command argument in a Tikz environment?

I am attempting to write a music related package where the user can enter chord names, that will be nicely printed: % this prints out the C chord \somecommand{C} However, a chord names can have ...
6
votes
1answer
102 views

Changing Color in Coordinate Plot in Tikz

I want to change the color in alternates of red and blue. So far I only have: \documentclass{article} \usepackage{tikz} \begin{document} \begin{center} \begin{tikzpicture}[scale=.8] % Axes \...
3
votes
1answer
49 views

Tikz bar plot Issues: The histogram is not scaling properly

I am having trouble with my tikz plot, Even the value is 21508 corresponding to drive, it is evident from the figure that histogram is not scaled properly. I do not know why this is happening. My ...
4
votes
1answer
68 views

draw a circuit with circular loop

I need to add a loop as in the picture. The MWE below is what I have tried. \documentclass[tikz]{standalone} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw (0,0) to[sV] (3,0);...
5
votes
1answer
56 views

Comparison line chart

I want to produce a comparison graph chart like this: I have found information about bar graphs, but not about line comparison graphs as I am trying to do. Any help?. Thanks.
12
votes
2answers
540 views

TikZ-Roulette: Make animation more realistic

Consider the following MWE: \documentclass[tikz]{standalone} \usetikzlibrary{backgrounds} \definecolor{filz}{RGB}{56,114,73} %\pagecolor{filz} \newcommand{\roulette}[1]{ % \pgfmathsetseed{3} \...
12
votes
1answer
297 views

Representing 3 points (also with negative coordinates) in a 3d cartesian plane

I'm trying to represent 3 points in a 3D Cartesian plane. I can do the Cartesian plane but I can not make the grid and color the parts of the plan in yellow, orange and blue. Can you help me? \...
3
votes
1answer
70 views

Transform decorations too

The following code is an attempt to draw "flags". A flag is a line segment together with a box at the middle, on the left side when looking from the start point to the end point. I'm using a ...
6
votes
2answers
140 views

Test whether a circle fully lies within a polygon in TikZ

Given the following TikZ picture with an irregularly shaped polygon: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \path[draw=blue] (0,3) -- (5,4) -- (3,2) -- (4,0) -...
1
vote
1answer
52 views

Align filled rectangle using tikz

I want to create my document with a specific format as in attached figures In my LaTeX code I can't put the rectangle a little far from the left edge of the page as shown in the figures. I want the ...
1
vote
1answer
118 views

The construction of Rooty helix, code explanation

Could someone please explain some parts of this code? I'm newbie on LaTeX and could not understand some parts. What does this \foreach \y in {86,38,15} means? Could you explain with details what is ...
3
votes
0answers
72 views

Wrong direction of vertices in tikz-feynman remains under macOS, using PGF 3.1 and luatex 1.07 [duplicate]

This question is originally from the discussion under github issue CTeX-org/forum#4. The similar problems raised by questions Fresh install of TL2018: no tikz graph drawing libraries found, and ...
5
votes
4answers
506 views

Could I name a number in tikz?

I have been drawing some pictures using tikz, and am wondering if I can name a number. For example, I pick a point $A$ with position angle $\alpha=45\degree$ on a circle, and a line going through ...
5
votes
3answers
148 views

Reflecting a line and/or point with named coordinates

This code does not work with named coordinates (such as the following code). How can I reflect the blue line over the red line by using coordinate names. And how do I reflect just a named coordinate? ...
9
votes
3answers
221 views

How to fill a split node with two different colors?

I have that issue when try to fill a split node with two different colors. After using rectangle split part fill={red,blue} as an node argument the drop shadow overlap the node because I don't use the ...
4
votes
2answers
270 views

Line passing through a point and parallel to another: Where am I wrong?

\documentclass{standalone} \usepackage{tikz} \usetikzlibrary{intersections} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) at (2,4); ...
6
votes
2answers
225 views

Improve this TikZ picture

MWE \documentclass[12pt]{book} \usepackage{tikz} \usetikzlibrary{patterns,shapes.geometric} \begin{document} \begin{tikzpicture} \draw[line width=.8pt,->] (-2,0.) -- node[pos=1,right]{}(2,0); \...
5
votes
2answers
181 views

How to draw 'English coastline' fractal?

As far as I know, fractal, especially fractal dimension, is really related to the coastlines of countries. The fractal shape of the coastline and the border of United Kingdom of Great Britain and ...
2
votes
1answer
46 views

a curve representing the dip

I want to draw a curve representing the dip as in the figure. \documentclass[border=5mm,tikz]{standalone} \usetikzlibrary{decorations.pathmorphing,patterns} \usepackage{tikz} \usetikzlibrary{...
5
votes
3answers
135 views

How to create a vertex at the intersection of two edges with tkz-graph?

I want to draw But I don't know how to create v_6 which is the intersection of \Edge(v_3)(v_5) & \Edge(v_1)(v_4) and v_7 is the intersection of \Edge(v_3)(v_5) & \Edge(v_2)(v_4). Here the ...
2
votes
4answers
213 views

Drawing numerical ray

Maybe i am seearching wrong but I couldn't find way to draw this ray with vertical lines. How?
2
votes
1answer
63 views

Labeling Sudoku Field

I am trying to draw Sudokus with Latex and this works so far quite well, but when I explain some strategies it is hard to follow without any labeling on the side and on the top. I would like to have ...
1
vote
0answers
45 views

Trouble with the intersection of 3 planes

I am trying to make a 3d plots as follows. This is my MWE: ‎\begin{tikzpicture}‎ ‎\begin{axis}[xlabel=$x$‎, ‎ylabel=$y$‎, ‎zlabel={$z$},legend pos=outer north east,z post scale=1.1,grid=both,view={50}...
2
votes
1answer
76 views

How can I get a nice view with a big triangle?

I am trying to draw a triangle with vertices A(-297,-209), B(-5,10), C(67,31)and inscribed. I tried \documentclass{standalone} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{...
7
votes
2answers
546 views

How to draw ░░░░░░░ blank with overlaid text in tikz

Wondering how to draw this sort of thing with tikz: I ░░░░░░░░░░░░░░░ am a blank space. ...but with text overlaid on the dot grid. Also, instead of the dot-grid being diagonal, I would like to make ...
11
votes
1answer
164 views

Arabic Text inside Tikz decorations.text

I am trying to create a TikZ figure as below, but the compilation is problematic when one adds some Arabic text. \documentclass[tikz, border=5pt, multi]{standalone} \usepackage{polyglossia} \...