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
8 views

How to color tikz mindmap nodes by y-coordinate

In a mindmap, I would like to color (most) nodes according to their y-coordinate, that is, their height on the page. For this, I am accessing the viridis colormap and sample its colors. Using code ...
5
votes
2answers
44 views

Drawing people along with x and y axis

I need to draw what’s on this picture: I would like to add tikzpeople instead of the simple drawings that you can see in the original picture. \documentclass[tikz,border=2mm]{standalone} \...
0
votes
0answers
12 views

How to graph boxes and texts within an image

I'm trying to do the following but it has not occurred to me what package to use, over there I heard Tiks:
1
vote
1answer
28 views

How to draw this center trajectory of rolling ball?

I'm a beginner to the latex tikz and I want to draw this picture but dunno what's the best command or idea here
1
vote
1answer
23 views

How to store a number inside \def or \newcommand command?

In the of the following code, I store in-center to the point I by command \incenter(A,B,C)(I). I want to store in-radius to a real number \inr by command \inradius(A,B,C)(inr), then later I could ...
2
votes
2answers
228 views

how to plot complicated function

i know how to draw axis and everything else except the function here , please give me hint to plot this function Thanks for the help
3
votes
3answers
45 views

How to draw a graph with twin straight edges between each vertex and a central hub

I want to make this graph. I found a few different things in the PGF manual that were kind of similar but I couldn't find a way to draw: The central hub/node (vertex) The straight twin edges (i.e. ...
5
votes
2answers
125 views

Drawing text in between arrows using TIKZ

Hi dear TeX community! I hope you can help me out a bit with some matrices I have drawn (with the community's help of course) using the TIKZ package. I think that I need to post almost the whole ...
0
votes
1answer
23 views

How to connect points on a circle with arcs and label them

I have a "circle" or a circular region. I want some nodes on the circular region to be connected by the arcs. and I also want some nodes (like \hdots) to appear very close on the circle. and the ...
3
votes
1answer
49 views

Alternative to using nested tikz in reference-able markers

based on this nice question and its answers, I have this little code: % % circled steps (with labels to reference them!) % \newcommand*\circled[2][]{\tikz[baseline=(char.base)]{ \node[...
2
votes
0answers
24 views

Problem with bounding box in TikZ using inner sep=0pt

maybe this is a well-known problem, but I haven't been able to find a solution for it yet. The TikZ option inner sep=0pt at a node leads to a wrong bounding box (at least for characters or numbers as ...
1
vote
0answers
45 views

Tikz language syntax

I'm hoping to add a tikz-specific language environment to my LaTeX editor (vscode), I've run into a bit of an issue looking for any speicifications for tikz grammar though. Would anybody know of any ...
2
votes
0answers
1k views

How can I create airfoil images for fluid mechanics presentations in Tikz? [closed]

I need some help on how to create good looking vectorized images of these kinds of themes: (source: caltech.edu) I work a lot with Latex when it comes to typesetting so I have some basic ...
2
votes
1answer
127 views

fill cylinder in latex

I want to fill the below cylinder same as picture And my code \begin{tikzpicture} \def\a{1} % bán trục lớn = bán kính trụ \def\b{0.3} % bán trục nhỏ \def\h{3} % chiều cao trụ \shadedraw[left ...
-4
votes
2answers
643 views

How I can create a graph of forces - tikz?

How can I create a graph of the forces acting on an object like the one in the picture? \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \end{tikzpicture} \end{...
2
votes
1answer
24 views

Bar plot in terminal node of tikz-qtree

I want to draw a bar plot at the terminal nodes of a tree drawn with tikz-qtree. I have tried this: \documentclass{article} \usepackage{tikz-qtree} \usepackage{pgfplots} \begin{document} \begin{...
5
votes
3answers
124 views

Putting a plot inside a tab

How to put the graph of this interval plot inside the box denoted graph1. Here are the code for the tables and the code for the interval plot. By the way can we change the code to have the first ...
6
votes
2answers
213 views

CircuiTikZ: Start ground relative to the closest component

Here is a short compilable example \documentclass{article} \usepackage{tikz} \usepackage{circuitikz} \begin{document} \begin{circuitikz} \draw node[ground]{} to [short,*-] (0,0) to [C] (...
3
votes
1answer
81 views

best way to draw planes in 2d?

I would like to replicate the following image and I would like to know how to represent the third state into the page by using the tikz-3dplot package, maybe starting from the answer to a previous ...
1
vote
1answer
30 views

How to add horizontal, then vertical shorts in circuitikz

I've noticed that in circuitikz, while the regular tikz lines of horizontal-then-vertical (-|) and vertical-then-horizontal (|-) lines work fine when joining two items with different absolute ...
3
votes
5answers
225 views

How to draw such kind of shape in latex?

How do i achive such type of shape in latex
2
votes
2answers
47 views

Aligning of text within tikz boxes

i have tried to no avail to vertically align the text in tikz boxes. I somehow cannot get the vertical alignment of text within the box right. Thanks in advance. \documentclass[varwidth=true, border=...
-1
votes
0answers
28 views

How to show a magnification of a part of a pdf without showing the pdf itself? [duplicate]

I am very new to latex. I have a pdf file, which I want to show a part of it magnified using spy. But I don't want to show the original file itself. For example, consider this example Spy Example, I ...
0
votes
1answer
25 views

Problem with spacing in syntactic trees using tikz [duplicate]

I am trying to get a tree like this using the tikz package and the syntax for this, according to a manual, is \begin{tikzpicture}[mytree] \node (top) {DP} child {node {D\\the}} child {node {NP} ...
1
vote
1answer
28 views

Eliminate tail of curved arrow [duplicate]

I tried to draw a curved arrow like this: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[->,thick] (2,1) edge[bend left=50] (3,2); \end{tikzpicture} \end{...
1
vote
0answers
47 views

tikz - define color in hex format

I have a color hex string, e.g. ecd9ed, I know I can define it as below: \definecolor{color1bg}{RGB}{236,217,237} But I wish to skip the conversion from hex to decimal. Is it possible to define a ...
0
votes
1answer
49 views

Union and Intersection of intervals

I want to make this pictures below using tikz or pstricks. I know how to draw intervals using pstricks but unfortunately I am not able to draw intersections and union like done in the picture
4
votes
1answer
392 views

How to draw these big arrows?

\begin{tikzpicture} \draw[gray!50, very thick,, fill = blue!30,rounded corners] (0,0) rectangle (2.5,1.5)node[pos=.5]{$\begin{array}{c}\text{\textcolor{blue!75}{\textbf{Combinatorial}}} \\ \text{\...
2
votes
1answer
50 views

TiKZ arrows and text inside of lslisting code

I have some lslistings code and I want to add some text and math elements as is shown in red color in the image below I tried using TiKZ but I got many errors. I'm attaching a MWE and thanks in ...
0
votes
1answer
35 views

Resizing a tikz picture in a beamer presentation

I want to resize a tikz picture in a beamer presentation. I was trying to use \resizebox like in this answer. In my original tex file I have \resizebox{0.5}{0.5}{\input{pathname/SSM1Code.tex} } ...
1
vote
2answers
671 views

How to create an instance in pgf-umlsd?

I'm using Modelio but I want to do everything on my paper with LaTeX, so I chose pgf-umlsd to do my sequence diagram. The trouble I have is that I don't know how to create an message to create a ...
1
vote
0answers
54 views

Tikz color opacity spills over to page

for some reason, the use of the opacity option in my tikz diagram "spills over" to the rest of the page. Weirder still, this isn't visible from the preview window in texstudio, but it is when opened ...
3
votes
2answers
51 views

Draw axis in block diagram

I would like to add plots inside TikZ nodes. Here is a minimum working example of the code I already have. \documentclass[]{standalone} \usepackage{pgf,tikz,pgfplots} \usetikzlibrary{calc,positioning}...
0
votes
1answer
22 views

Changing the number colours in tikz when using dark theme in texmaker

I'm using the dark theme, and while creating a diagram in the tikz environment. As you can see, I can hardly see the dark purple numbers... Is there a way to change it to a clearer one?
0
votes
1answer
27 views

Constructing a network graph

I saw this question Constructing a network-graph using TikZ, which is nice however I want my numbers outside the 'circles'. How can I do this?
2
votes
3answers
80 views

Text alignment in tikzpicture

I would like to have two lines of text with my time line below. How could I do this: MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} % draw horizontal line ...
0
votes
0answers
28 views

restrict text inside tcolorbox

I have defined a tcolorbox as: \tcbset{% outerlayer/.style={% enhanced, sharpish corners=all, colbacktitle=dcol, coltitle=white, coltext=dcol, ...
10
votes
5answers
3k views

Draw a symmetric alien head

I am trying to draw the following "symmetrical alien head": Using the mirror code from Can we mirror a part in tikz? I was able to produce the following result While the result looks good I am not ...
8
votes
2answers
656 views

Matrix with effects

Sending out the bat signal 🦇. Could you please help me to get this piece of art? I have no idea about how to obtain it. In the meantime I’m working on a MWE: documentclass[tikz,border=3....
0
votes
1answer
23 views

Tikz markers shape

I want to know what's wrong when I change this code, which yields a red star, to a triangle shape: This one works: \pgfdeclareplotmark{mystar}{ \node[star,star point ratio=2.25,minimum size=6pt, ...
1
vote
1answer
24 views

Changing markers shape in tikz

Hi I would like to know how can I get the following markers that appear on the attached picture: This is a mwe with the coordinates: \documentclass{standalone} \usepackage{subcaption} \usepackage{...
0
votes
1answer
21 views

edgeworth box can't draw node

I would like to draw in a caption on the top, bottom, left and right of this graph. Unfortunately I can't seem to draw anything at all: MWE: \begin{document} \begin{tikzpicture} \begin{axis}[axis x ...
4
votes
1answer
48 views

How to draw magnetic lines of force in coil with Tikz?

I'm trying to draw the magnetic lines of force in a coil that should looks like this picture using the tikz package. I've tried to use a foreach loop with controls but (maybe I'm placing the controls ...
1
vote
1answer
21 views

Problem naming certain arrows in tikz-cd

There's something I'm doing wrong in a certain diagram, and I can't seem to figure out how to name an arrow that bends. Here's a MWE (both with the package tikzcd and tikz + library cd the same error ...
2
votes
1answer
54 views

Dissapearing of table/cell borders with coloured cells in the PDF viewer depending on the zoom

I have a problem with the coloured tables that I want to include in my master thesis, so it is a very important issue for me. I generate the tables with tablesgenerator.com, and in the LaTeX viewer ...
2
votes
1answer
30 views

pgfplots: axis tick labels within the frame of the plot

For quite some time, I have been searching for a way to insert axis tick labels of plots within the frame/area of the plot. I think it less disturbs the axis labels themselves. However, there is an ...
11
votes
2answers
956 views

Densest sphere packing

I would like to represent the densest sphere packing in dimension 3 as the following picture, for a beamer presentation. Is Tikz the way to go for it? It is not a real 3D drawing since I only want a ...
2
votes
1answer
29 views

Why does `\tkzInterLC` calculate the wrong radius?

The following description of a triangle is given: Let Δ ABC be a right angle triangle. With ∠ABC=90, AB=12cm, AC=15cm. The point D lies on AB such that DB = 7cm. The last point E lies on AC such ...
4
votes
1answer
51 views

Drawing colored sticks

I am trying to draw some "matrices" that looks like this So above the diagonal the sticks should be blue and below they should be red. Using some help from the answer by marmot in my previous ...
5
votes
1answer
84 views

Effects on rectangles

I want to make my diagram’s rectangles look like these, the arrows and rectangles are in bold plus they have a shadow effect: Right now they look like this: \documentclass{article} \usepackage[...