Stack Exchange Network

Stack Exchange network consists of 175 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.

1
vote
0answers
16 views

draw dynamic circle around node and edges

How do I add the red circle as shown in below image but with dashed line circle. I want it to follow the path structure. So far, this is my code: \begin{forest} [$root : s_0$ [$a: s_*$ [$d: s_*$] [$...
4
votes
2answers
35 views

How to draw/optimize this graph with tikz

I would like to know if is there a way to optimize the code that I use to draw the next graph: I do it using this: \documentclass[11pt]{article} \usepackage{tikz} \begin{document} \begin{figure}[h]...
4
votes
1answer
43 views

I want to complete my figure

This is my very simplest MWE, I honestly say that I haven't done anything new. \documentclass{article} \usepackage{tkz-euclide} \begin{document} \begin{figure}[h] \begin{tikzpicture} ...
0
votes
0answers
26 views

My figures has disappeared after using tikz picture in overleaf [on hold]

I have been writing notes to my Calculus I course. These notes include some figures that I constructed using Geogebra, then I upload to my overleaf account. This week I decided to learn more about ...
1
vote
1answer
41 views

Creating an environment

I'm trying to create an environment. The code below performs something similar to what I want. My difficulty is in adjusting the content that will stay within the environment. I would like to reduce ...
0
votes
1answer
51 views

Intersecting a sphere with a line

I would like to replicate the following image in Tikz. Would anybody be able to help me? I've heard that drawing spheres and lines with good coordinate systems are hard...
1
vote
1answer
57 views

Grid in pattern in TikZ

Referring to the answer in How do I fill this area with inclined parallel lines , the pattern is generated with grid lines as well. I am not able to understand the behavior. \documentclass{article} \...
2
votes
1answer
57 views

Direction of Arrows in TikZ

The following TikZ code is for the preparation of flowchart. \documentclass[11pt]{article} \usepackage{tikz} \usetikzlibrary{shapes,shadows,arrows} \usepackage{lscape} \begin{document} \tikzstyle{...
1
vote
1answer
21 views

Two parallel lines between nodes of arbitrary size and position

I would like to draw two parallel arrows between two nodes in TikZ. The difficulty is that the nodes can be of any size and can be arranged in any order. Related: The question Parallel arrows ...
2
votes
1answer
52 views

Square-tiling a torus

I want to use tikz to draw something similar to this: https://www.youtube.com/watch?v=O7qsB5boS7s That is, we tile the tore with squares, we cut it open, twist it and then glue it back again. The ...
0
votes
0answers
11 views

Removing ticks from top, bottom and right-hand side of column chart and rename x-axis labels

I am trying to make a nice looking histogram of my data, and have managed to produce the following so far: \begin{tikzpicture} \centering \begin{axis}[ ymin=0, ymax=8000, minor y tick num = 2,...
1
vote
1answer
22 views

arrow across two tree Tikz

How do i add the dash line between two tree as in image below, \begin{center} \begin{tabular}{p{4cm}p{4cm}} \tikzset{my dbl/.style={double,double distance=2pt}} \centering \begin{forest} for tree={...
2
votes
1answer
32 views

How do I fill this area with inclined parallel lines

I have achieved the following: with the below code: \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); \coordinate (B) ...
1
vote
1answer
20 views

Text positioning in tikz arrow

I'm trying to place correctly some kind of legend below or above an arrow in a circuit. My intention is representing an external stimulus with an arrow and that text. However the only way I've found ...
0
votes
2answers
46 views

Semicircle from a circle in TikZ

Referring to the \clip answer in Drawing a semicircle in TikZ, I wanted to draw a semicircle. But the approach doesn't work here. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \...
1
vote
1answer
32 views

How to label a Huffman Tree with the code given here

\begin{frame} \frametitle{\textbf{Huffman Coding}} \begin{figure} \centering \scalebox{0.6}{ \begin{tikzpicture} \tikzstyle{iv}=[draw,fill=red!50,circle,minimum size=20pt,inner sep=0pt,text=black] \...
0
votes
1answer
22 views

Use of \@next doesn't match its definition

I get the error: Use of \@next doesn't match its definition With the following TikZ code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (A) at (0,0); ...
1
vote
1answer
24 views

Summation of matrix elements / table cells

Using the following code \documentclass{beamer} \beamertemplatenavigationsymbolsempty \usepackage{verbatim} \usepackage{tikz} \usetikzlibrary{calc, fit, matrix} \begin{document} %begin matrix autofit ...
1
vote
1answer
40 views

Unexpected error message (Undefined control sequence. l.18 \xwm@secstopagerange)

The following basic TikZ code is throwing the compilation error via PDFLaTeX: ("C:\fakepath\AppData\Local\Programs\MiKTeX 2.9\tex/generic/pgf/frontendla yer/tikz/libraries\tikzlibrarytopaths.code.tex"...
8
votes
1answer
523 views

Old style “caution” boxes

Technical manuals from the 1960s and 1970s sometimes had eye-catching CAUTION boxes surrounded by wavy or curly lines. My best attempt at re-creating this is not ideal as I can't get the snake to ...
1
vote
1answer
37 views

How to draw a line on a ball?

Basically I want to draw a line from the tip of the z-axis vector to the tip of the red vector. I do not quite know how to do this. This is the code I have so far, I hope someone has an idea on how to ...
1
vote
1answer
20 views

Aligning a rightarrow with path between images in tikzpicture

I would like to know if there is a better way to align the right arrow between Fig 1 and Fig 2. Currently I was able to do it with node[right=2cm]. I wonder why I wasn't able to use the node[midway] (...
1
vote
1answer
18 views

draw arbitrary domain with different colors on the domain boundary

I want to draw an arbitrary domain in tikz with different colors on the boundary. I have managed to draw an arbitrary domain but I am not able to color the boundary properly. here's a picture of how ...
1
vote
1answer
91 views

How to draw small a triangle mesh using tikz?

My question is simple but I haven't been able to find any answers. How can I draw a small a small triangle mesh (4-5) triangles using tikz and label each node and triangle face? This is a diagram ...
2
votes
1answer
25 views

Trying to recreate a graph using Tikzpicture and Pgfplots, doesn't turn out the way I want it to

Trying to recreate this graph: however mine turns out like this: Issues that I am having: The curve doesn't look very smooth and even. Nothing I try to draw (\draw) appears in the figure, I'm ...
2
votes
2answers
31 views

Double line edge using TikZ

How do I draw such tree like this where the some of the edges are double lines using TikZ or any other package? Here is the code: \Tree [.root [.a (i want here to have double edge line)b [.b c ] ] ...
2
votes
1answer
46 views

Setting transparency of background picture in Latex

I am currently creating a short advertisement in Latex. I would like to include a pretty transparent background image for that. Including the background image per se is not the problem, I have ...
4
votes
2answers
168 views

Matrices and TikZ : arrows inside the matrix

In the example below, the arrows fit inside the matrix but I would like them to stop at the limit of the delimiters. \documentclass[border=5pt]{standalone} \usepackage{tikz} \...
0
votes
1answer
28 views

tikz picture: unit instead of penultimate number of the axis

Is there a way to insert the unit instead of the penultimate number of the axis like this? 0 1 2 3 m 5 Thats something my university wants to see in my Bachelor thesis... But after searching ...
2
votes
0answers
33 views

Plot Velocity field having three components with Quiver pgfplots

I am stuck into plotting velocity field having three components. My data file contains velocity values on a plane y=0. My data is in the form. x z u v w where x and z are coordinates on y plane ...
0
votes
1answer
34 views

Changing a tikz figure to have more blocks

I have the following figure: which is generated using the following code: \tikzset{% block/.style = {draw, thick, rectangle, minimum height = 3em, minimum width = 8em, fill=white, text width=...
2
votes
1answer
51 views

Draw an X through a figure

How can I draw a line through Figure 2? I was thinking of trying to draw two lines that cross the figure out, but don't know how I can identify the 4 corners of the figure to do that \documentclass[...
3
votes
2answers
206 views

How to align text above triangle figure

I managed to align my hypotenuse text with the hypotenuse side of my triangle, but I feel like it was done inefficiently using a lot of ~~~~~~ in this line node[above] {$\sqrt{1+x^2}$~~~~~~~} (B) --. ...
2
votes
1answer
23 views

Package pgfkeys Error. What does it mean'

Package pgfkeys Error: I do not know the key '/tikz/5' I keep receiving this error at the "\end{axis}" line although I don't see where the mistake is. \usepackage{amsmath, amsfonts, amssymb, amsthm} ...
0
votes
2answers
41 views

Horizontal Flow Chart with Images

I am wanting to create a standalone flowchart with images and arrows. Here is the mockup: Each box would be an image.
0
votes
0answers
30 views

How to incorporate TiKz code in main LaTeX document? [on hold]

I'm working on a book, and I want to have my graphs done in TikZ. I have a nice TikZ picture made, but I can't seem to get it incorporated into the main document. What I would like is to get the TikZ ...
2
votes
1answer
43 views

Plot of function in tikz has kink

When plotting the square root function I get a kink, in this MWE at ca. x=0.2 (this depends on the domain). Is there a way avoiding this? \documentclass{article} \usepackage{tikz} \begin{...
0
votes
1answer
17 views

pgfplots reading XYY File

I am trying to read an external ascii file with multiple y-values per x value, to keep it simple I'll limit myself to xyy as the problem already occurs here. However, I am trying to make several, ...
1
vote
1answer
39 views

Tikz: two labels on one edge (one following the other one)

I would like to add a label which follows another one. For instance, I have: \documentclass[10pt]{beamer} \usepackage{tkz-graph} \GraphInit[vstyle = Shade] \tikzset{ LabelStyle/.style = { ...
1
vote
1answer
39 views

Put exam \answerline blanks as nodes inside \tikzpicture

The exam class allows you to leave spaces for students to write answers, using the answerline command. Furthermore, when \printanswers is enabled, an file can be generated that fills in these blanks ...
1
vote
1answer
39 views

pgfpointpolar bug / documentation bug?

In the current pgmanual, at page 976, section 96.2, you can find this: ...and as you can see, even the example in the manual is showing that the command is not working. I checked that: \...
2
votes
4answers
162 views

Problem drawing boxes with arrows in tikZ

Could someone, whenever it's possible, post a minimal tikZ example to draw this? I also would like to put an "R" inside the upper box. This is mi code so far (I know, it's a mess): \documentclass[...
6
votes
2answers
865 views

Diagram with tikz

Hi¡ I'm workin with a diagram and I don't know how to do. I almost finished it but the last part is so difficult. Can you help me? I want to my diagram looks like And the code that I have is the next ...
1
vote
1answer
75 views

How to do this path/lattice with tikz

I am looking for a way to do this lattice with tikz, and other similars to it. There are other similars to it, any idea?
0
votes
0answers
55 views

Question regarding tikz

I wanted to know if it is possible to draw the fruits and kids in the picture by using tikz! Thank you
0
votes
0answers
21 views

How do I plot the graph of arctan using Tikz, NOT using pgfplots [duplicate]

I am trying to plot the atan() function, but it keeps giving me an error. This is my code. What in the world am I doing wrong? Why doesn't it plot on the graph I made. Also I cannot use pgfplots. \...
0
votes
1answer
34 views

Picture of a Matching

I am trying to use tikz to plot this picture Any idea?
1
vote
1answer
39 views

Drawing of a “thick” subset of the unity sphere

Let A be a subset of the unity sphere as in the next picture: \begin{tikzpicture} \shade[ball color=blue, opacity=0.4] (0,0) circle (2); \draw (0,0) circle (2); \fill[fill=blue!80,rotate around={60:(...
1
vote
1answer
76 views

The following mesh/grid like diagram in tikz

I need to create a picture as shown in the attachment. I know how to create the hexagonal substructure and the code for the same can be found in this question: Hyperbolic polyhedron in tikz Please ...
0
votes
1answer
52 views

Hyperbolic polyhedron in tikz

I want to create the following hyperbolic polyhedra in Latex using tikz. I can create the hexagonal structure, but I'm clueless regarding the circular arcs. Edit: The code I used for the hexagonal ...