caption
stringlengths
0
5.16k
code
stringlengths
99
1.67M
image
imagewidth (px)
336
336
uri
stringlengths
21
93
origin
stringclasses
9 values
date
timestamp[us]
A mapping diagram showing the relation between two sets with the domain and range titles clearly indicated and nodes positioned closely together. Customizing the above MWE, you can achieve this result by adjusting the position and appearance of the nodes and adding skew arrows to illustrate the relation between the set...
\documentclass{article} \usepackage{booktabs} \usepackage{tikz} \newcommand\tikznode[3][]{% \tikz[remember picture,baseline=(#2.base)] \node[minimum size=0pt,inner sep=0pt,#1](#2){#3};% } \begin{document} \begin{tabular}{cc} \toprule Domain & Range \\ \midrule \tikznode{n8}{8} & \tikznode{n0}{0}\\ \ti...
https://tex.stackexchange.com/a/673534
tex.stackexchange.com
2023-01-31T16:23:52.287000
Adding a circle and connecting nodes with the middle of the line in TikZ
\documentclass[12pt,letterpaper]{article} \usepackage[left=20mm,top=30mm,bottom=30mm,right=20mm]{geometry} \usepackage{siunitx} % format SI units \usepackage{tikz} % for drawing pictures \usetikzlibrary{arrows.meta, chains, positioning, quotes, shapes.geometric, arrows} \usetikzlibrary{calc} \begi...
https://tex.stackexchange.com/a/672397
tex.stackexchange.com
2023-01-21T03:01:19.863000
Drawing a rectangle on one side of a triangle. Use appropriate code to create a rectangle with the desired dimensions and position it on the side of the triangle.
\documentclass[tikz,border=0.5cm]{standalone} \begin{document} \begin{tikzpicture}[line join = round, line cap = round;] \path (0,0) coordinate (A) (3,0) coordinate (B) (0,2) coordinate (C); \draw (5,0) -- (A) node[below] {$A$} -- (C) node[above] {$C$} -- (B) node[below] {$B$}; \draw[rotate={-atan(2/3)},t...
https://tex.stackexchange.com/a/683676
tex.stackexchange.com
2023-04-23T09:45:08.433000
Achieving equal height for all nodes in TikZ without altering the first box height. Increasing minimum height results in wider boxes, but not what is desired. What is the best solution to ensure all nodes have the same height?
\documentclass[tikz, border=1cm]{standalone} \usepackage{braket} \usetikzlibrary{arrows.meta, positioning} \tikzset{ >=Stealth, punkt/.style={rectangle, rounded corners, draw, very thick, inner sep=8pt, align=center}, } \begin{document} \begin{tikzpicture}[node distance=1cm] \node[punkt] (oracle) {Oracle circuit\\$O_H$...
https://tex.stackexchange.com/a/672725
tex.stackexchange.com
2023-01-24T00:49:19.673000
Customizing Tikz circle labels to flow along with the circle curve while retaining the current code style.
\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw[|-|] (90.0:3.0) arc(90.0:67.5:3.0) node[sloped, allow upside down, above=1mm, pos=1, blue]{$x_1$}node[sloped, allow upside down, below=1mm, pos=1, red]{$x_{n+1}$}; \draw[|-|] (67.5:3.0) arc(67.5:45.0:3.0) node[slop...
https://tex.stackexchange.com/a/686143
tex.stackexchange.com
2023-05-19T12:09:12.313000
Aligning children of TikZ tree nodes vertically using the LaTeX package TikZ. The code snippet compiles to a tree structure but the two subtrees under node c are not vertically aligned. The aim is to place them both on the same vertical line without manually positioning each node.
\documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[level 2/.style={every node/.style={xshift=-7.5mm}}] \node {0} child {node {a}} child {node {b}} child {node {c} child {node {a1}} child {node {b1}} child[miss...
https://tex.stackexchange.com/a/680918
tex.stackexchange.com
2023-03-27T07:30:44.050000
Scale icon from awesomefont5 library to fill the box border
\documentclass[border=5mm]{standalone} \usepackage{tikz} \usepackage{fontawesome5} \begin{document} \begin{tikzpicture} \tikzset{box/.style={ draw, inner sep=0pt, }} \node[box] (A) at (0,0) {\resizebox{1cm}{!}{\faHeadset}}; \end{tikzpicture} \rule{1pt}{1cm} \end{document}
https://tex.stackexchange.com/a/686217
tex.stackexchange.com
2023-05-20T06:10:01.887000
A time arrow with a solid filled bullet indicating the current position and open bullets for unequally spaced time points. The style and presence of node text should adjust depending on the overlay number, as shown in the MWE. This visualization will show the time evolution of snapshots through a slide presentation.
\documentclass{beamer} \usepackage{tikz} \usetikzlibrary{arrows.meta} \begin{document} \begin{frame} \begin{tikzpicture} \def\axscale{-0.02} \def\thex{0} \def\they{0} \def\prevy{0} \def\times{{-5,2, 12, 22, 32, 44, 76, 116, 182, 300,307}} \def\maxt{9} \foreach \it in {1,...,\maxt} { \pgfmathparse...
https://tex.stackexchange.com/a/678167
tex.stackexchange.com
2023-03-03T13:48:51.337000
a 10-by-13 checkerboard using 4 colours, as shown in the image. However, the provided LaTeX code keeps generating errors. Please help identify and correct the issue.
\documentclass{article} \usepackage{tikz} \usepackage{xcolor} \usepackage[showframe,pass]{geometry} \tikzset{ scale xy/.style={% only scale down, don't scale up x={min(1cm,\linewidth/(#1))}, y={min(1cm,\linewidth/(#1))}}} \begin{document} \begin{figure} \centering \begin{tikzpicture} \def\m{10} \def\n{13} \t...
https://tex.stackexchange.com/a/680873
tex.stackexchange.com
2023-03-26T17:58:19.813000
A smooth arc with nodes evenly distributed in the coordinate system, created using the 'foreach' command in the Beamer template. Each node should appear after each other without overlapping, and the resulting image should showcase the nodes along the arc with no other objects present.
\documentclass{beamer} \usepackage{tikz} \begin{document} \begin{frame}[t] \frametitle{Arc with coordinates} \begin{tikzpicture}[anchor=mid west, mark size=+4pt, ball color=black!80] % \draw [lightgray, thin] (0,0) grid (6,6); \pause \draw [latex-latex,thick] (0,6) -- (0,0) node[rotate=90, midway,...
https://tex.stackexchange.com/a/679921
tex.stackexchange.com
2023-03-18T11:09:30.110000
Center the leftmost bar in a pgfplots bar graph with different number of bars using LaTeX code. Original graph shown.
\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ ybar, bar width=0.1cm, xtick=data, symbolic x coords={Base, Random, Unequal, Imbalanced} ] \addplot+[bar shift=0cm, forget plot] coordinates {(Base, 0.758)}; \addplot coordinat...
https://tex.stackexchange.com/a/675002
tex.stackexchange.com
2023-02-12T12:01:53.467000
Replicate intricate conducting patterns using Tikz for a musical masterpiece.
\documentclass[tikz,border=3mm]{standalone} %https://tex.stackexchange.com/questions/669617/music-conducting-patterns-using-tikz \usepackage{tikz} \usetikzlibrary{decorations.markings} \begin{document} % %https://tex.stackexchange.com/questions/3161/tikz-how-to-draw-an-arrow-in-the-middle-of-the-line % % code of Caram...
https://tex.stackexchange.com/a/669681
tex.stackexchange.com
2022-12-26T11:06:26.423000
Lines drawn between nodes of each square, connecting all nodes that have been drawn symmetrically in the other squares.
\documentclass[margin=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ node distance =6mm and 12mm, dot/.style = {circle, draw=blue, fill=blue!20, inner sep=2pt}, N/.style = {draw=blue, minimum size=10mm, node contents={}} ] \node (...
https://tex.stackexchange.com/a/686886
tex.stackexchange.com
2023-05-27T04:51:26.200000
A flow chart for thesis outline in LaTeX with well-organized and properly arranged nodes for C, D, and E.
\documentclass[tikz]{standalone} \usetikzlibrary{arrows.meta, chains, ext.paths.ortho} \begin{document} \begin{tikzpicture}[ node distance = 10mm and 5mm, box/.style = { rectangle, draw, font=\strut, minimum width=25mm, minimum height=10mm}, boxie/.style = {box, minimum width=15mm}, arr/.style = -Tri...
https://tex.stackexchange.com/a/679487
tex.stackexchange.com
2023-03-14T17:03:19.083000
Icosahedron and Golden Rectangle
\documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{patterns} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{1pt} % % File name: icosahedron-and-golden-rectangle.tex % Description: % A geometric representation of the construction of an ic...
https://tikz.net/icosahedron-and-golden-rectangle/
tikz.net
2023-04-07T14:35:14
TikZ circles with horizontal gradient and different highlighting for current chapter number. Chapter numbers range from 1 to n.
\documentclass[oneside,11pt,a4paper]{memoir} \usepackage[margin=2.5cm]{geometry} \usepackage{tikz} \usetikzlibrary{positioning} \usepackage{titletoc} \pgfmathtruncatemacro{\chaptercount}{6} \makechapterstyle{mystyle}{% \chapterstyle{default} \renewcommand*{\chaptername}{} \renewcommand*{\chapnumfont}{\Huge\sffa...
https://tex.stackexchange.com/a/678746
tex.stackexchange.com
2023-03-08T14:10:50.463000
Setting a Default Color for All Angles and Right Angles in tkz-euclide
\documentclass[tikz]{standalone} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \tkzDefPoints{0/0/A,3/0/B,0/5/C} \begin{scope}[color=magenta] \tkzMarkRightAngle(B,A,C) \tkzMarkAngle(C,B,A) \end{scope} \tkzDrawPolygon(A,B,C) \tkzLabelPoints[below](A,B) \tkzLabelPoints[above](C) \end{tikzpicture} ...
https://tex.stackexchange.com/a/681349
tex.stackexchange.com
2023-03-30T20:48:41.763000
Spacing between z and w in the node is increased using tikz
\documentclass{article} \usepackage{tikz} \usetikzlibrary{chains, positioning} \begin{document} \begin{tikzpicture}[ node distance = 0mm and 4mm, start chain = going right, cc/.style = {fill=#1, rounded corners=2pt, minimum height=1.21cm, minimum width=18mm, align=center, ...
https://tex.stackexchange.com/a/685419
tex.stackexchange.com
2023-05-11T14:13:29.493000
Making Trapezia nodes in a Tikz process flow chart uniform in width
\documentclass{standalone} \usepackage[x11names]{xcolor} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows.meta, graphs, chains} \makeatletter \pgfset{ trapezium utils/extract points/.code n args={6}{% \expandafter\pgfextract@process\csname #1#2point\endcsname{% \centerpoint \advance\pgf@x#6\...
https://tex.stackexchange.com/a/684294
tex.stackexchange.com
2023-04-29T20:41:57.393000
Arrange text next to a calendar created by TikZ using relative placement or similar. Place "Text 2" below "Text 1" while still being in the correct calendar row. MWE: [CODE]
\documentclass[tikz, border=1cm]{standalone} \usetikzlibrary{calendar} \begin{document} \begin{tikzpicture}[every node/.style={anchor=base west}, every day/.style={anchor=center}] \calendar[dates=2000-01-01 to 2000-01-last, week list] if (equals=2000-01-03) {\draw (0,0) circle (7.5pt); \node[right=4cm] (A) {Text 1};} ...
https://tex.stackexchange.com/a/668636
tex.stackexchange.com
2022-12-15T15:00:39.913000
Draw a double arrow using TikZ. The arrowheads should be angled and the arrow should be thicker at the center. The correct code is missing from the question.
\documentclass[border=10pt]{standalone} \usepackage{tikz} %\usetikzlibrary{fit,shapes.arrows} \definecolor{fillcolor}{HTML}{DDE776} \begin{document} \begin{tikzpicture} \fill[fill=fillcolor,rotate=45,yscale=.5,xscale=.5] (-3,-3)--(-5,0)--(-3,3)--(-3,1)--(3,1)--(3,3)--(5,0)--(3,-3)--(3,-1)--(-3,-1)--cycle; ...
https://tex.stackexchange.com/a/686807
tex.stackexchange.com
2023-05-26T02:35:19.270000
Accurate representation of an arc with angles given in "trig format=rad".
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usepackage{etoolbox} \makeatletter \patchcmd\pgfpatharc{\pgfutil@in@}{% \pgfmathiftrigonometricusesdeg{}{% % \typeout{\pgf@temp@a, \pgf@temp@b}% \pgfmathradians@{\pgf@temp@a}\let\pgf@temp@a\pgfmathresult \pgfmathradians@{\pgf@temp@b}\let\pgf@temp@b...
https://tex.stackexchange.com/a/685953
tex.stackexchange.com
2023-05-17T08:36:31.373000
A matrix with a loop performing pycode, where each slot contains the correct calculation based on the provided input. Ensure that the final calculation is only displayed in its respective slot, and not in every slot.
\documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{matrix} \usepackage{etoolbox} \usepackage{pythontex} \begin{pycode} def foobar(number): return 2 * number \end{pycode} \begin{document} \begin{tikzpicture} \let\mymatrixcontent\empty \foreach \n in {1,...,30}{ \xappto\mymatrixcontent{\n \noexpand\...
https://tex.stackexchange.com/a/683656
tex.stackexchange.com
2023-04-23T01:28:41.560000
Adding a function to a tikz drawing without using pgfplots. Here, a sine function is added to the dashed line in the image, and other functions like exponential functions can also be added if possible. This will enhance the visual appeal and enable better representation of the data.
\documentclass{article} \usepackage{tikz} %\usetikzlibrary{calc,matrix,positioning} \begin{document} \begin{center} \begin{tikzpicture}[scale=0.5] \draw (0,4) -- (2,4); \draw (8,4) -- (10,4); \draw[line width=3, color=blue] (2,0) -- (8,0); \draw (2,0) -- (2,-0.5); \draw (8,0) -- (8,-0.5); \draw[line width=3, color=blu...
https://tex.stackexchange.com/a/668557
tex.stackexchange.com
2022-12-14T19:04:46.487000
Reproducing Python's matplotlib Asinh scale using pgfplots. The graph shows a logarithmic scale that behaves like a linear scale near zero, which is achieved through the implementation of the Asinh scale in pgfplots. The ymode=asinh option can be used to access this scale.
\documentclass[tikz]{standalone} \usepackage{pgfplots} \usetikzlibrary{math} \tikzmath{ function asinhinv(\x,\a){ \xa = \x / \a ; return \a * ln(\xa + sqrt(\xa*\xa + 1)) ; }; function asinh(\y,\a){ return \a * sinh(\y/\a) ; }; } \pgfplotsset{ ymode asinh/.style = { y coord trafo/.code={\pgfmat...
https://tex.stackexchange.com/a/678603
tex.stackexchange.com
2023-03-07T10:11:10.770000
Configure TikZ's angle radius option in the angles library to use the same unit of measure as the rest of the TikZ picture. This image illustrates the difference between using and not using explicit units for the angle radius option, and the resulting discrepancy in the size of the angle.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{angles} \begin{document} \begin{tikzpicture} \coordinate (a) at (1,0); \coordinate (b) at (0,0); \coordinate (c) at (0,1); \draw (a) -- (b) -- (c); \draw pic [draw, angle radius = 1cm] {angle=a--b--c}; \coordinate (d) at (...
https://tex.stackexchange.com/a/674423
tex.stackexchange.com
2023-02-08T08:38:22.027000
Heptahedron
\documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{0.125pt} % % File name: heptahedron.tex % Description: % A geometric representation of a heptahedron is shown. % % Date of creation: June, 04th, 2021. % D...
https://tikz.net/heptahedron/
tikz.net
2023-04-07T14:33:22
Adding labels to points in a scatter plot using TikZ. In this example, a label indicating '3x5' is placed next to the blue square point, while '3x10' is placed next to the red square point. The code for achieving this outcome is shown above.
\documentclass[border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{loglogaxis}[ %xmin=0, xmax=1e7, ymin=1e-4, ymax=1e3, xlabel={Number of Epochs}, ylabel={Normalized MSE: $\log_{10} (e)$}, label style={font=\bfseries\boldma...
https://tex.stackexchange.com/a/676124
tex.stackexchange.com
2023-02-22T07:41:09.013000
A stylized illustration of a bird in flight, featuring bold lines and vibrant colors, created using graphic design software. Thank you for the help!
\documentclass[tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[] \draw (0,0) circle (5); \draw[->] (-5.5,0) -- (5.5,0) node[anchor=north west] {x axis}; \draw[->] (0,-5.5) -- (0,5.5) node[anchor=south east] {y axis}; \coordinate (O) at (0,0); \coordinate (A) at (90:5); \coord...
https://tex.stackexchange.com/a/672044
tex.stackexchange.com
2023-01-18T12:29:38.180000
The nodes in this standalone tikz document should be evenly spaced and aligned. However, when using the 'tikz' option for '\documentclass', all of the nodes are clumped together at the bottom left. How can this issue be resolved?
\documentclass[border=10pt]{standalone} \usepackage{pgfplots} \usetikzlibrary{arrows.meta} \pgfplotsset{ compat=newest, % or at least 1.11 every axis/.append style={ tick label style={font=\footnotesize}, } } \begin{document} \begin{tikzpicture} \begin{axis}[ grid=both, xmin=-...
https://tex.stackexchange.com/a/686662
tex.stackexchange.com
2023-05-24T16:04:09.400000
Automatic placing dynamic styling of nodes in a graph. to check the first character in a node’s name if it’s a c (blue) or a p (gray). The integer number will be evaluated to determine the intensity of the color. the /utils/TeX/if and the /utils/TeX/ifnum keys It makes use of the ext.misc library of the tikz-ext bundle...
\documentclass[tikz]{standalone} \usetikzlibrary{ graphs, graphdrawing, ext.misc} \usegdlibrary{force} % requires LuaLaTeX \begin{document} \tikz[ parse node name/.style={ circle, minimum size=10mm, draw, densely dashdotted, thick, decide color/.expand once=#1}, decide color/.style 2 args={ /utils...
https://tikz.net/automatic-placing-dynamic-styling-of-nodes-in-a-graph/
tikz.net
2022-12-03T20:00:26
Illustration of linear models using multiple horizontal Gaussian bells shifted in x and t using TikZ.
\documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture}[line cap=round,scale=2] \coordinate (A) at (-0.5,-0.1); \draw[-stealth] (-0.5,0) -- (5,0) node[below] {$z_1$}; \draw[-stealth] (0,-0.5) -- (0,3) node[left] {$y$}; \draw[blue] (A) --++ (30:6) node[below righ...
https://tex.stackexchange.com/a/679426
tex.stackexchange.com
2023-03-14T09:13:30.693000
A basic linear graph of y = 2x - 4, with a labeled x and y axis and circled x and y intercepts. Please see example image for reference.
\documentclass[border=5pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture}[scale=1] \begin{axis}[x=1cm,y=1cm, axis lines = middle, xlabel = {$x$}, ylabel = {$y$}, xmin=-1, xmax=5.2, ymin=-6.1, ...
https://tex.stackexchange.com/a/687607
tex.stackexchange.com
2023-06-03T21:56:32.983000
A beautiful and realistic garden created using TikZ in LaTeX, showcasing the versatility and creativity of this powerful graphic design tool. Incorporating nodes with images or other TikZ elements, the resulting garden is visually stunning and a testament to the possibilities of TikZ.
\documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[scale=0.5] % Garden dimensions \def\gardenwidth{10} \def\gardenheight{8} % Draw the garden \draw[green!60!black, fill=green!20] (0,0) rectangle (\gardenwidth,\gardenheight); % Add some flowers \foreach \x/\y/\color in {{2/2/red},{4/...
https://tex.stackexchange.com/a/680829
tex.stackexchange.com
2023-03-26T02:57:47.197000
Buck and Buck-Boost Converters. Buck Converter.
% Designed by: Amir Ostadrahimi \documentclass [border=5pt]{standalone} \usepackage{tikz} \usepackage[american,cuteinductors,smartlabels]{circuitikz} % A package to draw electrical networks with TikZ %-- the dimensions of the elements can be changed here \ctikzset{bipoles/thickness=0.7} \ctikzset{bipoles/length=1.5cm...
https://tikz.net/buckboost/
tikz.net
2023-04-23T12:43:34
Align Tikz text flush left in the first node of the path.
\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (11,0) --node [pos=0.25, sloped,fill=white] (sentence) {This is a sentence} (18,1); \end{tikzpicture} \end{document}
https://tex.stackexchange.com/a/667933
tex.stackexchange.com
2022-12-09T04:52:28
A custom plot created in Tikz with spacing and placement issues resolved, as shown in the provided image. Caption: Attempting to replicate a custom plot made using MS PowerPoint with Tikz coding, but encountering placement and spacing issues.
\documentclass[border=3pt,tikz]{standalone} \usepackage{tikz} \usepackage{etoolbox} % for \ifnumcomp \usepackage{listofitems} % for \readlist to create arrays \tikzset{>=latex} % for LaTeX arrow head \colorlet{mywhite}{white!80!black} \colorlet{myred}{red!80!black} \colorlet{myblue}{blue!80!black} \colorlet{mygreen}{g...
https://tex.stackexchange.com/a/672109
tex.stackexchange.com
2023-01-18T20:02:00.717000
Using named paths formed by curves to fill shapes in LaTeX
\documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \fill[blue!20, draw=black] (0.5,4) -- (1.5,5) -- (2.5,4) -- plot[smooth, tension=0.5] coordinates {(2.5,4) (2,3.2) (2.1,2.5) (1.7,1.7) (2,1)} -- (2,1) -- (1,0) -- (0,1) -- plot[smooth, tension=0.5] coord...
https://tex.stackexchange.com/a/684119
tex.stackexchange.com
2023-04-27T20:53:20.083000
align nodes in TikZ like the path, midway and at specific angles.
\documentclass[margin=5mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \begin{document} \pgfmathtruncatemacro\s{10}% \pgfmathsetmacro\R{1.7} \pgfmathsetmacro\r{1.4} \pgfmathsetmacro\Rout{\R/cos(180/\s)}% \begin{tikzpicture}[ EL/.style = {% Edge Labels font=\small, sloped, rotate=#1...
https://tex.stackexchange.com/a/685569
tex.stackexchange.com
2023-05-13T10:00:56.340000
The TikZ picture should be rendered below the text, even when given options such as [H] or [h!]. Note that the current result does not meet this expectation. Attention to details such as float placement and font size may be necessary to achieve the desired outcome.
\documentclass{article} \usepackage{graphicx} % Pictures \usepackage{amsmath} % Maths formulas \usepackage{float} % Figure placement \usepackage[margin=3cm]{geometry} \usepackage{tikz} % Pretty graphs \usetikzlibrary{graphs} \usetikzlibrary{graphdrawing} \usegdlibrary{trees, layered} \title{Assignment 1} \begin{docu...
https://tex.stackexchange.com/a/675007
tex.stackexchange.com
2023-02-12T13:26:24.600000
Increase the size of the open pole ocirc without affecting other components. The manual suggests using \ctikzset{nodes width=0.15}, but this would also increase the size of ocirc in the switch. The image displays the original ocirc and the desired larger ocirc for clarity.
\documentclass{article} \usepackage[american, siunitx]{circuitikz} \begin{document} \begin{tikzpicture}[thick] \draw (0,5) node[circle, draw, fill=white, inner sep=3pt] at (0,5){} to [I] ++ (2,0) to [cute closing switch] ++(2,0); \end{tikzpicture} \end{document}
https://tex.stackexchange.com/a/668302
tex.stackexchange.com
2022-12-12T12:36:23.277000
A figure with multiple tables contained within red color curly brackets, as shown in the example, but with the ability to customize the bracket color and include multiple tables in the same bracket.
\documentclass[11pt]{report} \usepackage{textcomp} \usepackage{amsmath} \usepackage{array, multirow, bigdelim, makecell, booktabs} \usepackage{tikz} \usetikzlibrary{tikzmark, decorations.pathreplacing, arrows.meta} \tikzset{mybrace/.style={decorate, decoration={brace, amplitude=2mm}, red, thick}} \begin{document} \...
https://tex.stackexchange.com/a/678379
tex.stackexchange.com
2023-03-05T22:40:41.557000
Ensuring Times New Roman font for all text in circuitikz and tikz figures, as per IEEEtran journal guidelines. Including math formulas. Consistency in font style, capitalization, and formatting is important.
\documentclass[border=10pt]{standalone} \usepackage[T1]{fontenc} \usepackage{mathptmx, helvet, courier} \usepackage[siunitx, RPvoltages]{circuitikz} \begin{document} \begin{tikzpicture}[american] \draw(0,0) to[R, v=$V_x$, name=R] ++(2,0); \end{tikzpicture} \end{document}
https://tex.stackexchange.com/a/687186
tex.stackexchange.com
2023-05-30T12:44:30.713000
Drawing diagonal lines indicating a solid body in a schematic of two masses connected by a string
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \begin{scope}[shift={(-1.5,0)}] \fill[pattern=north east lines] (-1,0) rectangle (1,-0.25); \draw[thick] (-1,0) -- (1,0); \fill (0,0.35) circle[radius=0.35]; \end{scope} \begin{sc...
https://tex.stackexchange.com/a/686652
tex.stackexchange.com
2023-05-24T15:03:46.247000
Side-by-side Tikzfigures labeled (a) and (b) with proper referencing in the text.
\documentclass[a4paper, 12pt]{article} \usepackage{pgfplots} \pgfplotsset{compat=1.15} \usepackage[showframe]{geometry} \usepackage{subcaption}% added <<<<< \captionsetup{subrefformat=parens} \makeatletter \renewcommand\p@subfigure{\thefigure.} % added <<<<<<<<<<<<< \makeatother \begin{document} \begin{figure}[...
https://tex.stackexchange.com/a/668126
tex.stackexchange.com
2022-12-10T17:00:48.197000
Fixing the 'Package tikz Error: Giving up on this path. Did you forget a semicolon?' error message by identifying and correctly placing the missing semicolons in the code, as shown in this before and after comparison.
\documentclass[dvipsnames]{standalone} \usepackage{pgfplots} \usepackage{tikz-3dplot} \usepackage{tikz} \usetikzlibrary{decorations.markings} \pgfplotsset{compat=newest} \begin{document} \tdplotsetmaincoords{130}{130} \begin{tikzpicture}[tdplot_main_coords,scale=.8] \begin{axis}[axis lines=middle,height=12cm,xtick...
https://tex.stackexchange.com/a/666273
tex.stackexchange.com
2022-11-24T04:40:15.933000
In this flowchart, arrows are properly aligned inside rectangular boxes and text is centered above and below each arrow.
\documentclass[margin=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta, positioning, quotes, shadows.blur} \begin{document} \begin{tikzpicture}[ node distance = 24mm and 24mm, N/.style = {draw, thick, font=\sffamily\bfseries, align=center, ...
https://tex.stackexchange.com/a/684066
tex.stackexchange.com
2023-04-27T12:13:20.997000
A Tikz surface with markers concealed, recreated from a Matlab plot with markers both above and below the surface. Current code attempts to achieve this with 'clip mode=individual' but all markers are concealed.
\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ view={20}{20}, xmin=0, xmax=1, ymin=0, ymax=1, zmin=0, zmax=1, clip mode=individual, ] \addplot3[ only marks, domain=0.01:1, samples=10, samples y=1, z filter/.expression={0.2...
https://tex.stackexchange.com/a/668402
tex.stackexchange.com
2022-12-13T11:33:46.520000
Change the line style in specified sections of the plot using a single addplot command in pgfplots.
\documentclass[border=10pt]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usetikzlibrary{pgfplots.groupplots, fillbetween} \pgfplotsset{ dashed between/.style args={#1:#2}{ draw=none, postaction={ draw, decorate, decoration={ soft c...
https://tex.stackexchange.com/a/685785
tex.stackexchange.com
2023-05-15T16:31:35.137000
Achieving the desired quiver diagram with lines connecting nodes to dots, and dots inserted in between lines. Code and hand-drawn sketch included for reference.
\documentclass[12pt]{article} \pdfoutput=1 \usepackage{mathtools} \usepackage{float} \usepackage{tikz, pgfplots} \usetikzlibrary{arrows.meta, calc, positioning} \usetikzlibrary{decorations.pathmorphing} \begin{document} \begin{figure}[H] \begin{center} \begin{tikzpicture} [ node distance = 17mm and 31mm, b/.style={rect...
https://tex.stackexchange.com/a/667730
tex.stackexchange.com
2022-12-07T12:45:34.167000
Use Tikz commands to create different shapes around letters to represent the difficulty level of an exercise. Insert text using the new commands \easy{}, \medium{}, \hard{}, \vhard{}.
\documentclass{article} \usepackage{enumitem} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \newlist{problems}{enumerate}{1} \setlist[problems]{ label=\alph*, } \newcommand*{\easybox}[1]{% \begin{tikzpicture}[anchor=base, baseline] \node[circle, fill=black, text=white, font=\bfseries, inner sep=2p...
https://tex.stackexchange.com/a/673264
tex.stackexchange.com
2023-01-28T21:25:22.860000
A semicircle node centered at chord center with lines directed to both the chord center and the anchor point. Achieve this using the option anchor and modifying the style.
\documentclass[border=3mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.geometric} \colorlet{pagebackground}{yellow!10} \pagecolor{pagebackground} \begin{document} \begin{tikzpicture} \coordinate (a) at (1,1); \draw [red](0,0) -- (a); \node [semicircle,draw,shape border rotate=180,anchor=chord center,oute...
https://tex.stackexchange.com/a/679673
tex.stackexchange.com
2023-03-16T04:48:09.380000
Reproduce these conducting patterns in Tikz code to achieve the expected output image.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, bending, decorations.markings} \tikzset{mytip/.tip={Stealth[width=3mm, length=3mm, inset=1pt]}, midarrow/.style={decoration={markings, mark=at position #1 with {\arrow{mytip}}}, postaction={decorate}}, midarrow/.default={.5}} \begin{docum...
https://tex.stackexchange.com/a/670098
tex.stackexchange.com
2022-12-30T06:12:11.753000
Arrow shape should match start and end exactly with point A/B.
\documentclass[convert,border=10mm]{standalone} \usepackage{tikz} \usetikzlibrary{shapes.arrows, calc} \newcommand{\darr}[3]{% \path (#1) -- (#2) node[ shape=single arrow, draw=black, at start, anchor=tail, inner sep=0mm, outer sep=0mm, insert path={let \p1=($(#2)-(#1)$) in}, minimum width=0mm, ...
https://tex.stackexchange.com/a/687049
tex.stackexchange.com
2023-05-29T00:13:44.990000
Text and image alignment in a tikz environment. By importing three images with includegraphics and adding text above each image, the result is a visually appealing and organized image.
\documentclass[tikz, border=1cm]{standalone} \begin{document} \begin{tikzpicture} \node[align=center] at (-5,0) {some text\\\includegraphics[width=0.35\columnwidth]{example-image-a}}; \node[align=center] at (0,0) {some text\\\includegraphics[width=0.35\columnwidth]{example-image-b}}; \node[align=center] at (5,0) {som...
https://tex.stackexchange.com/a/669038
tex.stackexchange.com
2022-12-19T15:43:51.377000
Draw two triangles intersecting on a common triangle using TikZ. The dashed box represents the area of intersection. #TikZ #triangle #drawing
\documentclass[tikz, border=1mm]{standalone} %\usetikzlibrary{calc} \usetikzlibrary{decorations.pathreplacing, quotes} \tikzset{ above'/.style={above=\pgfdecorationsegmentamplitude}, right'/.style={right=\pgfdecorationsegmentamplitude}, brace settings/.style={amplitude=4pt}, brace length/.initial=.75cm, pics/...
https://tex.stackexchange.com/a/676091
tex.stackexchange.com
2023-02-21T22:27:22.830000
Centering a clipped tikz graph and aligning the base of the pentagon node to the right of another node. Use `\begin{center}` command to center the graph. Specify the y-position of the pentagon node below one node and to the right of the other. Provided image and code not visible.
\documentclass{article} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usepackage{geometry} \usetikzlibrary{arrows} \usetikzlibrary{arrows.meta} \usetikzlibrary{positioning} \begin{document} \begin{center} \begin{tikzpicture}[node distance=5cm and -2cm] \node[text width=5cm,align=center,draw] (ftli) { ...
https://tex.stackexchange.com/a/681875
tex.stackexchange.com
2023-04-04T23:54:49.700000
Make the arrow start and stop at the boundary of the square/circle in the image above by modifying the code.
\documentclass{article} %\usepackage[utf8]{inputenc} \usepackage{tikz} \begin{document} \begin{tikzpicture} [every rectangle node/.style={draw}, every circle node/.style={draw,double}] \node[rectangle] (0) at (0,0) {0}; \node[circle] (1) at (1,2) {1}; \node[circle] (2) at (2,1) {2}; \node[...
https://tex.stackexchange.com/a/672768
tex.stackexchange.com
2023-01-24T11:01:02.347000
Place multiple nodes evenly spaced around a circle utilizing the provided code and image for reference.
\documentclass[tikz,border=1.618]{standalone} \tikzset { big node/.style={circle,draw,fill=gray!#1}, small node/.style={rectangle,rounded corners,draw,fill=gray!#1}, } \begin{document} \begin{tikzpicture}[line cap=round,line join=round,-latex] \node[big node=80,fill=gray,minimum size=2.5cm] (s) at (0,0) {System}; ...
https://tex.stackexchange.com/a/686888
tex.stackexchange.com
2023-05-27T05:49:26.040000
Improving Tikz coloring and arrow drawing in the given image
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{patterns} \begin{document} \begin{tikzpicture} \fill[blue] (.4,0) rectangle (1.4,1); \fill[red] (1.4,0) rectangle (2.4,1); \fill[cyan] (2.4,0) rectangle (3.4,1); \draw (.2,-.5)--(.2,.5); \draw (3.6,-.5)...
https://tex.stackexchange.com/a/686435
tex.stackexchange.com
2023-05-22T17:53:30.230000
Remove faded tick markers on x-axis of a pgfplot
\documentclass[margin=3mm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=middle, axis line style={-}, xmin=40, xmax=100, ymin=0, ymax=14, xlabel={Grades}, ylabel=Frequency, x label style={at={(0.5,-0.2)},anchor=sout...
https://tex.stackexchange.com/a/668876
tex.stackexchange.com
2022-12-17T23:12:49.153000
A 3D plot of a complex Gaussian wave packet using TikZ. In this visualization, the plot should show the propagation of the wave packet over time and space, with colors representing the amplitude of the wave at each point. The code provided does not produce the desired outcome. If anyone has ideas or solutions on how to...
\documentclass[tikz,border=1.616mm]{standalone} \usetikzlibrary{3d,perspective} \tikzset {% pics/spiral/.style 2 args={code=% { \draw[pic actions] plot[domain=#1:#2,samples=1001] ({exp(-2*\x*\x)*cos(1140*\x)},\x, {exp(-2*\x*\x)*sin(1140*\x)}); }}, } \begin{document} \begin{tikzpicture}...
https://tex.stackexchange.com/a/687188
tex.stackexchange.com
2023-05-30T13:14:57.937000
Modifying line style and adding dots in between lines for a quiver diagram in TikZ.
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc, positioning, decorations.pathmorphing} \begin{document} \begin{tikzpicture} [ node distance = 17mm and 31mm, b/.style={rectangle, draw=black!60, fill=gray!15, very thick, minimum size=35}, c/.style={circle, draw=black!60, fill=gray!15, ver...
https://tex.stackexchange.com/a/667728
tex.stackexchange.com
2022-12-07T12:04:32.470000
A clear and accurate plot of the function abs(x)^3-abs(x) using TikZ picture environment. The x-axis should be labeled and the function should be plotted with a solid, smooth line without any anomalies or discrepancies.
\documentclass[tikz, border=30mm]{standalone} \usepackage{tikz} %you can skip this line since I already declared TikZ before (but my guess is you'll copy this without reading it) \usepackage{amsmath, amsfonts} \begin{document} \begin{tikzpicture}[>=stealth] \draw[->] (-4,0)--(4,0) node[above] {$x$}; \draw[->] (0,-2)-...
https://tex.stackexchange.com/a/673018
tex.stackexchange.com
2023-01-26T13:28:10.597000
A Tikz diagram illustrating a sensor and actuator system with labeled components and clear lines. Use the provided code as a starting point and refer to the image provided for reference.
\documentclass[12pt,letterpaper]{article} \usepackage[hmargin=20mm,vmargin=30mm]{geometry} \usepackage{siunitx} \usepackage{tikz} % for drawing pictures \usetikzlibrary{arrows.meta, decorations.markings, positioning, quotes, shapes.geometric} \begin{doc...
https://tex.stackexchange.com/a/672223
tex.stackexchange.com
2023-01-19T14:52:18.967000
A tangent line is drawn to a curve at a specified angle using TikZ.
\documentclass[tikz,convert]{standalone} \makeatletter %% Utils \def\pgfextractxy#1{\pgf@process{#1}\pgfgetlastxy} \newcommand*\fpUnlessIf[1]{ \edef\pgfmathresult{\fpeval{#1}}% \ifnum\pgfmathresult=1 \expandafter\@gobble \else\expandafter\@firstofone\fi} \newcommand*\fpsetmacro[2]{\edef#1{\fpeva...
https://tex.stackexchange.com/a/671425
tex.stackexchange.com
2023-01-11T23:03:54.913000
A grid with semi-circles drawn at specific points using a foreach loop in LaTeX. Unfortunately, the code provided is producing an error. The error message suggests that the syntax is faulty. Can you help me identify the mistake in the code and provide guidance on how to use the foreach loop to draw the semi-circles at ...
\documentclass[tikz]{standalone} %\documentclass[10pt, a4paper]{article} \usepackage{tkz-euclide} \begin{document} \begin{tikzpicture} \draw[help lines] (0,0) grid (10,8); \foreach \i in {(1,0.5), (5,0.5)}{ % \expandafter\tkzDefPoint\i{origin} % \path \i coordinate (origin); \coordinate[at=\i](origin); \coordinat...
https://tex.stackexchange.com/a/682344
tex.stackexchange.com
2023-04-10T00:15:53.477000
An image of an equilateral triangle with length 1 and circles with radius 1/2 on each corner of the triangle, where the intersections are highlighted with dots. The triangle should be perfectly equilateral for accurate placement of the intersections.
\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=1.5, big circ/.style={draw, circle, minimum size=1cm, solid, transform shape}, sm circ/.style={fill, circle, minimum size=2pt, inner sep=0, transform shape}] \draw[dashed] (0,0)node[big circ]{}--node[sm circ]{}++(1,0)node[big circ]{...
https://tex.stackexchange.com/a/667747
tex.stackexchange.com
2022-12-07T15:29:47.193000
Tikz matrix with milsymbs and colors, without errors.
\begin{filecontents}{tikzlibraryshapes.Symbols.code.tex} \usetikzlibrary{shapes.symbols} \end{filecontents} % \documentclass{standalone} \usepackage{tikz} \usepackage{milsymb} \pgfqkeys{/MilSymb}{color/.style={/tikz/color={#1},/tikz/nodes={/tikz/color={#1}}}} \begin{document} \begin{tikzpicture} \matrix[row sep=2mm, c...
https://tex.stackexchange.com/a/680713
tex.stackexchange.com
2023-03-24T23:09:43.947000
Adding axis labels on all four sides.
\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{filecontents*}{data.csv} group, x, y 1.10, 0.1, 0 1.10, 2, 2.2 1.10, 3, 2.1 1.10, 4, 1.5 \end{filecontents*} \begin{document} \begin{tikzpicture} \pgfplotsset{xmin=0, xmax=5, ymin=1, ymax=10} \begin{axis}[ymode=...
https://tex.stackexchange.com/a/668343
tex.stackexchange.com
2022-12-12T19:40:33.327000
Fill between area using decoration function in pgfplot for a specific plot within a groupplot environment, while avoiding weird outcomes.
\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \usepgfplotslibrary{fillbetween} \usetikzlibrary{decorations.markings} \begin{document} \begin{tikzpicture} \begin{axis}[ axis lines=center, xmin=0, xmax=12.5, ymin=0, ymax=15, ] \draw[name path=line] (0,5) -- (12.5,5); \addplo...
https://tex.stackexchange.com/a/671476
tex.stackexchange.com
2023-01-12T13:36:57.747000
Create a 3D plot of the given function using TikZ with accurate scaling and a viewpoint that allows for negative values to be visible, as shown in the GeoGebra image.
\documentclass[tikz, border=1cm]{standalone} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \begin{document} \begin{tikzpicture}[ declare function={ f(\x,\y)=(-\y*\y+2*\y*\x)/2-sin(deg(\y-\x)); g(\x,\y)=(\x*\x)/2+\y-\x; }] \begin{axis}[ view={-60}{20}, xmin=-5, xmax=5.5, ymin=-3, ymax=6, zmin=-2, zmax=4, xlabel=$x$, y...
https://tex.stackexchange.com/a/667504
tex.stackexchange.com
2022-12-05T11:56:42.710000
10x10 grid of shapes with a minimum of 10 red circles, maximum of 50, minimum of 10 red diamonds, maximum of 50, and white circles filling the remaining cells. Each shape is randomly selected from {red circle, red diamond, white circle}.
\documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{shapes} \tikzset {% styles shape1/.style={draw,circle,fill=red}, shape2/.style={draw,diamond,fill=red}, shape3/.style={draw,circle,fill=white}, } %% counters \newcounter{NumberOfRC} % Number of Red Circles \newcounter{NumberOfRD} % Number of Red Dia...
https://tex.stackexchange.com/a/676461
tex.stackexchange.com
2023-02-25T07:29:46.110000
Connecting tikz nodes with a 'hollow' wire that creates a continuous inner space, as shown in the mockup. This should be achieved through a custom Tikz command that draws a hollow wire from one coordinate to another, always placed on a vertical edge of a shape. The resulting output should look seamless, as shown in the...
\documentclass{article} \usepackage{tikz} \usetikzlibrary{backgrounds} \begin{document} \begin{tikzpicture} \node[draw,rounded corners=0.5mm,fill=white] (a) at (0,0) {$A$}; \node[draw,rounded corners=0.5mm,fill=white] (b) at (1.5,0.5) {$B$}; \coordinate (a out) at ([yshift=1mm] a.south east); \coordinate (b in) at ([y...
https://tex.stackexchange.com/a/680606
tex.stackexchange.com
2023-03-24T02:56:37.173000
Holding text in a global variable and using it as content for a tabular placed using tikzpicture in expl3.
\documentclass{beamer} \mode<presentation> \usepackage{tikz, tabularray} \ExplSyntaxOn \tl_new:N \l_userx_temp_tl \NewDocumentCommand{\mycontent} { m } { \tl_clear:N \l_userx_temp_tl \tl_put_right:Nn \l_userx_temp_tl { \hline #1 \hline } } \NewDocumentCommand{\myframe} {} { ...
https://tex.stackexchange.com/a/681517
tex.stackexchange.com
2023-04-01T12:12:07.187000
Connecting points on a circle using Tikz. The figure shows the red points where the portions of circles need to be drawn. The solution should be simple and efficient, preferably avoiding computation of angles for every portion of circle. Circles can be drawn using \clip, but the exact implementation is not clear.
\documentclass{article} %\url{https://tex.stackexchange.com/q/71548/86} \usepackage{tikz} \usetikzlibrary{calc,intersections,spath3} \begin{document} \begin{tikzpicture} \coordinate (a) at (0,0); \coordinate (b) at (-1,-1); \coordinate (c) at (1,-1); \draw[spath/save=circleA] (a) circle (1.5cm); \draw[spath/save=cir...
https://tex.stackexchange.com/a/682553
tex.stackexchange.com
2023-04-11T19:49:03.970000
A line that divides a circle node at a specific point, fitting perfectly within the circle and cutting off any excess line outside.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc,positioning,fit,intersections} \begin{document} \begin{tikzpicture} \begin{scope} \node[baseline] (f1p) {\(f_1'(x)\)}; \node[baseline, right =3mm of f1p] (f1) {\(f_1\)}; \node[name path=cir,circle,draw,fit={(f1p)(f1)}] (f1c) {};...
https://tex.stackexchange.com/a/671543
tex.stackexchange.com
2023-01-13T01:39:56.830000
Rotating the upper part of a Tikz code to create the above image, currently only the lower part is tilted. Is it possible to modify the code to achieve the desired outcome, or must the entire picture be redrawn tilted from the start?
\documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz, pgfplots} \usetikzlibrary{positioning} \usetikzlibrary{arrows.meta} \tikzset{>={Classical TikZ Rightarrow[width=2mm,length=2mm]}} \newcommand{\newCommandName}{text to insert} \newcommand\li{10} \newcommand\ra{1.5} \newcommand\net{3.5} \newcommand\o...
https://tex.stackexchange.com/a/679869
tex.stackexchange.com
2023-03-17T19:21:37.240000
Vertically align black text on the left with relevant table cells on the right, eliminate excess space between columns, and align TikZ pictures in the lowest row without cropping.
\documentclass{article} \usepackage{nicematrix,tikz} \begin{document} \NewDocumentCommand{\Fill}{m}{\Block[fill=#1,rounded-corners]{}} \begin{NiceTabular}{rw{c}{2cm}cw{c}{2cm}cw{c}{2cm}}[cell-space-limits=3mm] xx: & something \\ yy: & \Fill{blue!15} A && \Fill{blue!15} B && \Fill{blue!15} C \\ xx: & && \...
https://tex.stackexchange.com/a/678194
tex.stackexchange.com
2023-03-03T19:11:32.170000
Find the total width of a tabularray table and pass it to other packages such as tikz or tcolorbox to create a picture or box with the exact same width as the table. Note the difference in position and size between the box created by tcolorbox and the rectangle created by tikz, despite having the same width. How can th...
\documentclass[12pt]{article} \usepackage[a4paper, total={180mm,257mm},left=15mm,top=20mm]{geometry} \usepackage{tabularray} \usepackage{tikz,tcolorbox,blindtext} \newlength{\foo} \newsavebox{\mybox} \begin{document} \savebox{\mybox}{\begin{tblr}{colspec={Q[3.2cm,c]Q[5.2cm,c]Q[5.2cm,c]},rows={0.8cm,m},vlines,hline...
https://tex.stackexchange.com/a/672577
tex.stackexchange.com
2023-01-22T19:51:08.680000
Draw the boundary of a polyomino with thicker lines using the binary matrix as input, and adjustable line thickness for grid lines and boundary lines.
\documentclass[tikz]{standalone} \tikzset{ polyomino/rect/.style={thin}, polyomino/border/.style={very thick, line cap=rect}, polyomino/picture/.style={yscale=-1}, polyomino/.code=\pgfqkeys{/tikz/polyomino}{#1}, store matrix/.style={ /utils/exec=\def\listrow{0}, /utils/rows/.style={ /utils/exec=...
https://tex.stackexchange.com/a/681053
tex.stackexchange.com
2023-03-28T14:42:25.500000
Surface of Revolution
\documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{math} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{1pt} % % File name: surface-of-revolution.tex % Description: % A geometric representation of a surface of revolution is shown. % % D...
https://tikz.net/surface-of-revolution/
tikz.net
2023-04-07T15:57:09
Changing node background color in TikZ using Milsymb library
\documentclass{standalone} \usepackage{tikz} \usepackage{forest} \usepackage{milsymb} \begin{document} \begin{tikzpicture} \node (nA) {\tikz{\pgfsetstrokecolor{red}\MilLand[faction=friendly,monochrome,echelon=division,main=armoured,red,fill=green]{}}}; \end{tikzpicture} \end{document}
https://tex.stackexchange.com/a/680666
tex.stackexchange.com
2023-03-24T16:10:22.287000
Directional Angles
\documentclass{article} \usepackage{tikz} \usepackage{tikz-3dplot} \usetikzlibrary{math} \usepackage[active,tightpage]{preview} \PreviewEnvironment{tikzpicture} \setlength\PreviewBorder{0.125pt} % % File name: directional-angles.tex % Description: % The directional angles of a vector are geometrically represented. % ...
https://tikz.net/directional-angles/
tikz.net
2023-04-07T14:16:40
Ebbinghaus. Optical illusions, 2/5.
\documentclass[tikz,border=10pt]{standalone} \newcommand{\centercircle}{\filldraw (0,0) circle(0.5);} \begin{document} %% definition of the circle in the center, just to show %% that in both configurations the same one is used \begin{tikzpicture} %% surrounded by big circles (looks smaller) \centercircle \foreach ...
https://tikz.net/ebbinghaus/
tikz.net
2023-01-28T00:33:53
Drawing five semi-circles in a row with different centers using Tikz. The first photo shows a single semi-circle centered at the origin, while the second photo displays the intended graph with the dots as vertices/nodes. The challenge lies in duplicating the appearance of the semi-circle at the specified center points ...
\documentclass[border=1.618]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ semicircles/.pic={ \draw (0,0) arc (180:0:#1) -- cycle; \foreach\j in {0,30,60,...,180} \fill (#1,0) ++ (\j:#1) circle (1pt); \draw (#1,0) --++ (0,#1); ...
https://tex.stackexchange.com/a/685454
tex.stackexchange.com
2023-05-11T20:12:05.763000
Perpendicularly oriented axes in Tikz-3dplot for a cuboid drawing, as shown in the reference image. Ensure that the axes are correctly aligned with the cuboid face by correcting any rendering issues or methodological errors. Attainable by reviewing the provided code snippet.
\documentclass[border=5pt]{standalone} \usepackage{tikz, tikz-3dplot} \usetikzlibrary{arrows, arrows.meta} \tikzset{ mycube/.style ={ color = black!80, fill = blue!50, line width = 0.2pt, rounded corners=1.5pt, opacity=0.8 } } % Defining the cuboid with a bottom left corner at (x,y,z) cordinate and length, width ...
https://tex.stackexchange.com/a/687256
tex.stackexchange.com
2023-05-31T00:59:49.833000
Align text and boxes in tabular environment using tabularray package while maintaining proper vertical alignment and avoiding excess space between columns. Ensure alignment of text and boxes in the lowest set of boxes on the right column.
\documentclass{article} \usepackage{tabularray} \usepackage{tikz} \tikzset{ baseline={([yshift=-2pt]current bounding box)}, every edge/.style={draw, ->}, ccgeneral/.style={ fill=#1, rounded corners=2pt, thick, inner sep=4, outer sep=0, minimum width=18mm, }, cc/.style={ccgeneral=blue...
https://tex.stackexchange.com/a/678134
tex.stackexchange.com
2023-03-03T10:35:38.150000
Complex arrows added to tikzpicture for a flow diagram.
\documentclass[tikz, margin=10pt]{standalone} \usetikzlibrary{arrows.meta, backgrounds, chains, ext.paths.ortho, fit, positioning, quotes, scopes, shadows} % Define block styles \tikzset{% arr/.style = {...
https://tex.stackexchange.com/a/680732
tex.stackexchange.com
2023-03-25T07:09:23.953000
Drawing a shape with overlapping regions and opacity using Python and Matplotlib library.
\documentclass[tikz]{standalone} \usetikzlibrary{fit} \tikzset{ Unode/.style 2 args={ shape=rectangle, path only, append after command={ \pgfextra{% \pgfmathanglebetweenpoints{\pgfpointanchor{\tikzlastnode}{west}} {\pgfpointanchor{\tikzlastnode}{east}}% ...
https://tex.stackexchange.com/a/668569
tex.stackexchange.com
2022-12-14T22:08:45.990000
Sankey Diagram Tikz with consistent color coding for each category.
\documentclass{standalone} \usepackage{tikz} \usepackage{verbatim} \usepackage{sankey} \begin{document} \begin{tikzpicture}[] \begin{sankeydiagram}[] \sankeyset{ ratio=1cm/15, outin steps=4, start style=arrow, end style=simple, draw/.style={draw=white,line width=.4pt}, color/.style={fill/.style={fill=#1,fill opacity=...
https://tex.stackexchange.com/a/675692
tex.stackexchange.com
2023-02-18T14:51:27.327000
Fixing the positioning of labels in a top-down phylogenetic graph using `phylogenetics` library in TikZ with LuaLaTeX. Avoid the special fixing style done by hand and find the good style to be fixed.
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{graphs, graphdrawing} \usegdlibrary{phylogenetics} \pgfgdset{ phylogenetic inner node/.style={ /tikz/.cd, draw, circle, inner sep=0pt, minimum size=5pt } } \tikzset{ every node/.style={text height=1.5ex, text depth=0.33ex, d...
https://tex.stackexchange.com/a/676069
tex.stackexchange.com
2023-02-21T19:44:19.270000
Generalizing the body of tikzpicture environment in the preamble to easily change the numbers as the square is rotated
\documentclass[border=3.14mm]{standalone} \usepackage{tikz} \newcommand{\mysquare}[4]% {% \def\myradius{4cm} \begin{tikzpicture} \foreach \l [count=\i from 0] in {#1,#2,#3,#4} { \draw[fill=yellow!20] (45+90*\i:\myradius) rectangle (45+90*\i:0.8*\myradius); \node at (45+\i*90:1.1...
https://tex.stackexchange.com/a/675015
tex.stackexchange.com
2023-02-12T14:35:26.303000
Tikz plot of a custom figure from a Powerpoint presentation, with proper spacing and accuracy. Despite importing the high-quality PPT, the tikz plot may differ, and there may be a learning curve. Online resources can be utilized for guidance, but it may require trial and error to produce the desired outcome. [IMAGE] [C...
\documentclass[border=10pt]{standalone} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{matrix} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture} \begin{scope}[scale=0.75] \draw[blue!50!black] plot[domain={-1.5:5}] (\x,{e^-\x-1}); \draw[b...
https://tex.stackexchange.com/a/671796
tex.stackexchange.com
2023-01-16T09:24:13.430000
Adding and labeling angles in TikZ-3D to enhance the visual representation of the geometric figure. See the original figure and code in the provided links for reference.
\documentclass[tikz]{standalone} \usepackage{tikz} \usetikzlibrary{angles} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{60}{-30} \begin{tikzpicture}[tdplot_main_coords, >=stealth, scale=2.5] \draw[->, thick] (0,0,0) coordinate (O)--(0,0,3) coordinate(A) node[left] {$\vec{z}_{n-1}$}; \draw[->, thick] (...
https://tex.stackexchange.com/a/682711
tex.stackexchange.com
2023-04-13T03:42:26.647000
The arrow in the tikz image should begin at the point labeled \ell, not in the center of the colored box. To achieve this, modify the code to correctly cross-reference the node labels and adjust the arrow centering.
\documentclass{article} \usepackage{lipsum} \usepackage{tikz} \usetikzlibrary{arrows.meta, backgrounds, fit, shapes.multipart} \tikzset{every picture/.append style = {remember picture,baseline}, MN/.style = {rectangle split, rectangle split horizontal, ...
https://tex.stackexchange.com/a/684140
tex.stackexchange.com
2023-04-28T02:33:44.567000
An overlay TikZ picture below the ordinary text, with the colored layer appearing below the text rather than above it. Achieving this requires adjusting the z-order of the TikZ picture and the text.
\documentclass{article} \usepackage{tikz} \usetikzlibrary{tikzmark} \newsavebox{\tempbox} \begin{document} \savebox{\tempbox}{\begin{minipage}{\textwidth} This is some text: \tikzmarknode{Foo}{foo}. And this is some text in between that the filling partially covers And this is another node:\tikzmarknode{Bar}{bar} ...
https://tex.stackexchange.com/a/685720
tex.stackexchange.com
2023-05-14T21:46:19.910000
Handout for Gauss algorithm with linear systems of equations in row echelon form, emphasizing the triangular shape at the end using arrow indicators.
\documentclass {article} \usepackage {lipsum} % dummy text \usepackage {tabularray} \usepackage {tikz} \usetikzlibrary{tikzmark} \tikzset {% styles plus/.style={midway,right,yshift=#1}, my arrow/.style={-latex,thick,line cap=round,line join=round,shorten >=0.5em,shorten <=0.2em} } \definecolor{mygreen}{...
https://tex.stackexchange.com/a/671373
tex.stackexchange.com
2023-01-11T15:05:48.120000
Printing a value in math print using command input. Input values should be displayed in the correct format without any conversion errors.
\documentclass[border=2pt]{standalone} \usepackage{tikz} \usepackage{xstring} \newcommand{\arcR}[2]{ \begin{tikzpicture}[thick, font=\sffamily\Large,scale=0.5] \StrSubstitute{#2}{\pi}{*pi}[\RadianMeasure]% Replace '\pi' with '*pi' \pgfmathsetmacro\DegreeMeasure{deg(\RadianMeasure)}% %% ------------- \d...
https://tex.stackexchange.com/a/685938
tex.stackexchange.com
2023-05-17T06:41:32.657000
A clear and concise flowchart depicting the peer-review process, recreated using Tikz or any other preferred tool. Please share your thoughts on the best approach for creating this diagram.
\documentclass[tikz]{standalone} \usetikzlibrary{ arrows.meta, cd, chains, ext.positioning-plus, ext.paths.ortho, graphs, quotes} \begin{document} \begin{tikzpicture}[ >={Straight Barb[scale=2, angle'=45, round]}, box/.style={ shape=rectangle, align=flush center, fill=blue!50, draw, rounded corners}...
https://tex.stackexchange.com/a/683036
tex.stackexchange.com
2023-04-16T01:42:19.377000