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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 views

Coloring the region under the standard parabola in TikZ

I have the plot of a parabola over the interval [0,1] and a line segment between (1,0) and (1,1). I would like the region between the parabola and x-axis and to the left of this vertical line segment ...
user143462's user avatar
  • 1,029
0 votes
0 answers
16 views

How can I create a symbol for the origin of a coordinate plane in Tikz?

This symbol appears at the origin of a coordinate plane in the Illustrative Mathematics curriculum, but I have no idea how to produce it using LaTeX or Tikz. Can you help me?
Matthew Hamilton's user avatar
0 votes
0 answers
27 views

Get Tikz/pgfplot figure (quiver+contour) as seen in MATLAB

I have a rather involved MATLAB script that plots the gradient field vectors to be exactly the lengths between the contours of a surface. I want to be able to have this graph natively drawn in LaTeX. ...
David G.'s user avatar
  • 203
1 vote
1 answer
39 views

Using foreach and cs coordinates, foreach evaluate and axis

I was trying to draw dots over a pgfplots axis using axis cs coordinates. This works just fine typing the coordinates by hand, but fails as soon as I try to use the value coming from a foreach ...
Cryme's user avatar
  • 727
1 vote
1 answer
50 views

Using the result of TikZ foreach evaluate

I was trying to display the value of an evaluated variable in a TikZ foreach loop on a very basic example (tweaked from https://tikz.dev/pgffor#pgf./pgf/foreach/evaluate), but somehow it fails. See ...
Cryme's user avatar
  • 727
-1 votes
1 answer
55 views

How to draw this figure in latex, using same arrows and braces?

I need code to draw this figure in latex
Parul Chauhan's user avatar
1 vote
0 answers
37 views

PGF/TikZ Object-Oriented Programming Scope Issue

I'm experimenting with the PGF/TikZ Object-Oriented Programming functionality and have encountered what appears to be a scoping issue that I do not understand. I have provided a minimum example of the ...
James Gardner's user avatar
0 votes
2 answers
61 views

Rectangular node with cross (plus) marks at the edges

I want to divide the working area into some parts and then mark their borders with plus marks. I can do this separately: \documentclass{article} \usepackage[margin=1in]{geometry} \usepackage{...
Przemysław Scherwentke's user avatar
1 vote
2 answers
45 views

tkz-euclide: Set style of angle marks globally

How can I control globally the styles of angles and marks, particularly the color and line thickness/length, with tkz-euclide? I am not sure how to set styles like mkcolor globally. I'm looking to ...
PatrickT's user avatar
  • 2,901
0 votes
0 answers
39 views

How to plot ternary heatmap from .csv data?

I am trying to plot a ternary heatmap using the ternaryaxis environment. This is supposed to plot a variable over three factors that go from 0 to 100. The code I am using is the following: \...
Kaza123's user avatar
0 votes
2 answers
57 views

Chemfig and TikZ

How can I make a chemical graph, with empty boxes, like this: In chemfig + TikZ? Or there is some other way? Somebody try something like this before?
Michał Szymankiewicz's user avatar
2 votes
0 answers
51 views

How to inject \directlua expansions back into TeX files

Is there a simple way (i.e. a flag to latexmk) to preprocess a source TeX file with LuaLaTeX, so that I get back the same source with just the invokations to \directlua expanded? My usecase is that I ...
Champitoad's user avatar
1 vote
0 answers
37 views

tikz: Error that appears only in a certain order of two pictures

I have a very strange behaviour in the following simple code. The purpose is to draw two knots by using tikz, with tikzlibrary knots. \documentclass{amsart} \usepackage{tikz} \usetikzlibrary{knots} \...
user126154's user avatar
3 votes
2 answers
181 views

tikz-cd "equal" arrow with a colored background

I use a Beamer template with black background. Whenever I type an equal arrow with tikzcd, it appears as a large white line (because some background is added between the two lines of the "equal&...
sparusaurata's user avatar
3 votes
2 answers
173 views

Generate TikZ \pics dynamically

I want to generate TikZ \pics dynamically. All information I need to setup the pic (name, x-coord, y-coord) are given in a tabular. Is there a way to inject these information to the TikZ environment ...
PascalS's user avatar
  • 766
1 vote
1 answer
42 views

How to print a \pic in TiKz aligned to one of its border?

The following MWE shows how to draw a background image with scaling and adding a predefined "PowerSupply" pic to it. This works great but the problem is, that the position where I want to ...
PascalS's user avatar
  • 766
0 votes
1 answer
36 views

How to put the caption of a TikZ Picture below an image when using overlay option?

How to put the caption of a figure below an image when using overlay option? I want to avoid to shift the caption manually via \vspace{} or something like that. \documentclass{article}% \usepackage[...
PascalS's user avatar
  • 766
2 votes
1 answer
75 views

Drawing a basketball using Latex

Could you help me to draw a basketball using latex. I tried this version but it doesn't seem to be working. \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \shad[...
Mario Topez's user avatar
0 votes
1 answer
77 views

Visual errors in pgfplots graph [closed]

This is my code \documentclass{article} \usepackage{amsmath, pgfplots, tikz, fullpage} \pgfplotsset{compat=1.15} \begin{document} \begin{tikzpicture}[scale = 1.5] \begin{axis}[ xlabel = {$...
Clyde Kertzer's user avatar
1 vote
1 answer
65 views

TikZ strange default anchor behavior

I am using TeX Live 2023 downloaded from the site on WSL2 Ubuntu 22.04. Using XeTeX to generate PDF documents. xetex -v is XeTeX 3.141592653-2.6-0.999995 (TeX Live 2023). As part of planning to work ...
Kishan Parekh's user avatar
0 votes
0 answers
40 views

Converting plots to tikz code

I am trying to convert the following plot to a tikz code I have seen from some previous QA that first png to svg conversion and after that svg to tikz convertion is possible. I tried to convert this ...
Tanmoy Pati's user avatar
0 votes
1 answer
57 views

Inclined plane with friction

How can I draw friction lines under the box $M$ in the following TikZ draw...? \begin{figure}[h] \centering \begin{tikzpicture} [font = \small] ...
hyriusen's user avatar
  • 167
0 votes
0 answers
48 views

pgfmathsetmacro, pgfmarthparse, pgfmathresult to define command with calculation

I am quite new to using tikz and the pgf package in general, and I'm having a hard time understanding how/when to use pgfmathsetmacro, pgfmathparse and pgfmathresult. I have the following problem: I ...
Pedro Montanari's user avatar
3 votes
1 answer
95 views

Create an electrical installation plan in TikZ

I'm trying to document my electrical installation neatly in Latex and TikZ. A normal TikZ drawing is no problem so far, but I would like to add something like switches, sockets, etc. to a given ...
PascalS's user avatar
  • 766
1 vote
2 answers
49 views

pgfplots bar plot: add labeled arrow from one bar to another

I have a pgfplots chart looking like this. \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.9} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar, bar width=1....
npas's user avatar
  • 13
1 vote
0 answers
22 views

Strange sign change in math operation result with tikz [duplicate]

I am working on a 3d figure using pgfplots. Since I need to operate on some pre-defined functions which are y(x) = - 1 - x and zed(x,y) = - x^2 - y^2. I want to place points using these functions so I ...
Meclassic's user avatar
  • 1,783
0 votes
1 answer
58 views

Replacing a square with a star in TikZ

In the code below I would like to replace the box by a star. How do I do this? \documentclass{article} \usepackage{tikz} \usetikzlibrary{matrix} \begin{document} \begin{center} \begin{tikzpicture} ...
Zoltan Fleishman's user avatar
3 votes
0 answers
122 views

Is It possible to draw 2 merging spherical caps with tikz?

I am trying to reproduce a figure using only tikz. I have produced the figure using Inkscape but I am wondering if I can do it fully in Latex. This is the aimed figure : And with the help of some ...
Waxler's user avatar
  • 584
0 votes
1 answer
39 views

How highlight date or week in TikZ Calendar with background color?

How to highlight a date or week in TikZ Calendar with a background color?
Paulo Rodrigues's user avatar
6 votes
1 answer
537 views

TikZ in XeLaTeX vs. LaTeX

I have a document with some complicated mathematical diagrams (system of commutative maps, arrows and labels). It seems to build the diagrams correctly only in XeLaTeX. The rest of the document ...
mbsq's user avatar
  • 161
-1 votes
0 answers
37 views

Cartesian graph [duplicate]

How can I draw this graph using latex[graph of 2x^2 + 9x + 14]
Anthony Ikenna Obiamalu's user avatar
0 votes
1 answer
48 views

How do I draw a line to connect one entry to another within a tabular environment?

I have a tabular environment intended as an exercise in a textbook. I want it to look like this: And the student is meant to complete the exercise by connecting the remaining lines. Question: How do ...
Rebecca J. Stones's user avatar
0 votes
0 answers
39 views

PRISMA Flow Diagram [duplicate]

Can someone please help me creating this PRISMA 2020 flow diagram? I’m new to Latex and my advisor is forcing me to use TikZ instead of uploading a picture.
user314172's user avatar
3 votes
3 answers
243 views

Is there a way to choose a "horizontal center" of a TikZ picture?

I want my TikZ figure to be horizontally centered around a coordinate. In this example I want the horizontal center of the figure to be at the center of the square, x=2, but a text node extends beyond ...
Anna's user avatar
  • 751
1 vote
1 answer
88 views

Using TikZ (or other package) to draw a gameboard, somewhat similar to chess (Hnefatafl)

I need to write some documentation and need to display a Hnefatafl board. Basically it is an 11x11 board, some of the squares would be highlighted (e.g. cross hatching). The pieces are basically ...
LewisE's user avatar
  • 11
0 votes
0 answers
34 views

Crash of Texstudio 4.7.2

Starting with version 4.6.2 of TeXStudio (updated also to 4.7.2), when compiling complex code or very simply code I have a crash with this message: Help me!
Raffaele Santoro's user avatar
2 votes
3 answers
127 views

How to put arrow between characters (inside text)

LaTeX Community! I'm currently working on my Bachelor's thesis in Linguistics and am looking to implement a specific structure within the text. This structure, which I've encountered in a publication, ...
KoNstantin's user avatar
2 votes
1 answer
60 views

TikZ knots issue: circular "paper-cutout"s at intersections when using double

I'm trying to draw a trinity/trefoil knot with accompanying linking circles with the knots package, but I'm encountering a "paper circular-cutout" issue at intersections as demonstrated in ...
cattywampus's user avatar
0 votes
1 answer
58 views

Improvement of my pgf plots figure

I'd like to make a NMR spectroscopy chart, till now i have this: \documentclass[border=1cm]{standalone} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=newest} \begin{document} \begin{...
Michał Szymankiewicz's user avatar
0 votes
0 answers
17 views

Tree diagram using tikz in latex. How do I make the different forest classes to be on two or three columns?

This is the code I have: \begin{figure} \centering % \tikzset{ basic/.style = {draw, text width=3cm, align=center, font=\sffamily, rectangle}, root/.style = {basic, rounded corners=...
user21060315's user avatar
1 vote
0 answers
15 views

Remove white space around 3D pgfplots figure with no axes nor ticks

This question is similar to the one found here: Pgfplots trimming white space problem I am working on a 3D figure, generated using pgfplots, where I have removed axes and ticks. The problem is that, ...
Meclassic's user avatar
  • 1,783
1 vote
1 answer
135 views

How to draw hebrew text around a circle?

The hebrew text in red (see code below) was not drew in the right-to-left direction as I expected. How to set proper text direction (around a circle) for right-to-left Hebrew language using TikZ? \...
Natanael Martins Neves's user avatar
4 votes
1 answer
69 views

LuaLatex and intersection segments: Error only with Lua

I need to use LuaLatex with my document and somehow run into an error while compiling a plot. I reduced my document to the following MWE: \documentclass{scrartcl} \usepackage{shellesc} \usepackage{...
AcademicCoder's user avatar
3 votes
1 answer
141 views

Vertical alignment issue with tikzpicture

Look at the following image and notice that $2$ is no vertically aligned with $1+i$ and $1-i$ Could someone tell me what I'm doing wrong? Here is my code: \documentclass{standalone} \usepackage{...
Leandro Caniglia's user avatar
0 votes
1 answer
67 views

I have to draw a complete 5-sunlet graph and a 5-barbel graph. I have tried to draw them (code given below). But this is not precise

\begin{tikzpicture}[xscale=1, yscale=1.8] \tikzstyle{every node}=[circle, fill=black!,inner sep=0pt, minimum width=5pt] \node (1) at (0,.65)[label=north east:{$x_1$}] {}; ...
Shahnawaz Ahmad's user avatar
0 votes
1 answer
28 views

Package PGFPLOTS legend empty entry shift to left

I made a plot with 2 y-axis on the same x-axis. One one the left, one on the right. Thats the Code I used: \documentclass{standalone} \usepackage{siunitx} \usepackage{pgfplots} \usetikzlibrary{...
DoDo's user avatar
  • 3
1 vote
1 answer
143 views

Book design and numbering of the chapters

I'm trying to replicate this design but I'm struggling to do it. Any advice ? This is what I tried \documentclass[a4paper,12pt]{book} \usepackage{amsmath,amsfonts,amssymb,amsthm,mathrsfs} \usepackage[...
Dots's user avatar
  • 13
0 votes
1 answer
61 views

Controlling Label Text in TikZ Nodes with \NewDocumentCommand: Including or Excluding Descriptions

I am working on a document where I include images using TikZ nodes. I have a command \myincludegraphics that includes an image along with a rectangle and a label node. However, I am struggling to ...
Marco Moldenhauer's user avatar
4 votes
1 answer
124 views

Create command with decoration in Tikz

I am doing a job that is simple but must be done thousands of times. I want to create a command whose inputs are two coordinates ( \coordinate (A) at (0,0); and B at \coordinate (B) at (3,6); for ...
Alejandro Munoz Ossa's user avatar
0 votes
1 answer
54 views

Controlling Coordinates of Rectangle in Image Inclusion

I'm working on a document where I want to include images with the option to draw a rectangle on them. I've created a command \includegraphicsWithOptionalRectangle that takes two arguments: the path to ...
Marco Moldenhauer's user avatar

1
2 3 4 5
691