TikZ
- Is it possible to change the color of lines in a TikZ pattern?by sgmoye on October 30, 2026 at 12:06 pm
I cannot seem to change the color of the lines in the following, they are always black (based on page 735 of the TikZ documentation, version 3.1.12). The documentation (page 180) says "This option is used to set the color to be used for form-only patterns. This option has no effect on inherently colored patterns" but I'm not entirely sure what that means. Are lines "inherently colored" or "form-only"? The documentation (uses on page 735) seems to imply that the color can be altered. \documentclass[tikz,border=1pt]{standalone} \usetikzlibrary{calc,patterns,patterns.meta} \begin{document} \begin{tikzpicture} \draw[fill=red!20](0,0) rectangle (1,1); \draw[pattern={Lines[angle=-45,yshift=2pt]},pattern color=cyan](0,0) rectangle +(1,1); \end{tikzpicture} \end{document} List of files article.cls 2025/01/22 v1.4n Standard LaTeX document class size10.clo 2025/01/22 v1.4n Standard LaTeX file (size option) tikz.sty 2026-08-01 v3.1.12 (3.1.12) pgf.sty 2026-08-01 v3.1.12 (3.1.12) pgfrcs.sty 2026-08-01 v3.1.12 (3.1.12) pgfutil-common.tex pgfutil-latex.def pgfrcs.code.tex pgf.revision.tex pgfcore.sty 2026-08-01 v3.1.12 (3.1.12) graphicx.sty 2026-05-17 v1.2e Enhanced LaTeX Graphics (DPC,SPQR) keyval.sty 2026-05-17 v1.15 key=value parser (DPC) graphics.sty 2026-05-17 v1.4h Standard LaTeX Graphics (DPC,SPQR) trig.sty 2023/12/02 v1.11 sin cos tan (DPC) graphics.cfg 2016/06/04 v1.11 sample graphics configuration xetex.def 2025/11/01 v5.0p Graphics/color driver for xetex pgfsys.sty 2026-08-01 v3.1.12 (3.1.12) pgfsys.code.tex pgfkeys.code.tex pgfkeyslibraryfiltered.code.tex pgf.cfg 2026-08-01 v3.1.12 (3.1.12) pgfsys-xetex.def 2026-08-01 v3.1.12 (3.1.12) pgfsys-dvipdfmx.def 2026-08-01 v3.1.12 (3.1.12) pgfsys-common-pdf.def 2026-08-01 v3.1.12 (3.1.12) pgfsyssoftpath.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfsysprotocol.code.tex 2026-08-01 v3.1.12 (3.1.12) xcolor.sty 2024/09/29 v3.02 LaTeX color extensions (UK) color.cfg 2016/01/02 v1.6 sample color configuration mathcolor.ltx pgfcore.code.tex pgfmath.code.tex pgfmathutil.code.tex pgfmathparser.code.tex pgfmathfunctions.code.tex pgfmathfunctions.basic.code.tex pgfmathfunctions.trigonometric.code.tex pgfmathfunctions.random.code.tex pgfmathfunctions.comparison.code.tex pgfmathfunctions.base.code.tex pgfmathfunctions.round.code.tex pgfmathfunctions.misc.code.tex pgfmathfunctions.integerarithmetics.code.tex pgfmathcalc.code.tex pgfmathfloat.code.tex pgfint.code.tex pgfcorepoints.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathconstruct.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathusage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorescopes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoregraphicstate.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransformations.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorequick.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreobjects.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepathprocessing.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorearrows.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreshade.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreimage.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoreexternal.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorelayers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcoretransparency.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorepatterns.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcorerdf.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleshapes.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmoduleplot.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-0-65.sty 2026-08-01 v3.1.12 (3.1.12) pgfcomp-version-1-18.sty 2026-08-01 v3.1.12 (3.1.12) pgffor.sty 2026-08-01 v3.1.12 (3.1.12) pgfkeys.sty pgfkeys.code.tex pgfmath.sty pgfmath.code.tex pgffor.code.tex tikz.code.tex pgflibraryplothandlers.code.tex 2026-08-01 v3.1.12 (3.1.12) pgfmodulematrix.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarytopaths.code.tex 2026-08-01 v3.1.12 (3.1.12) tikzlibrarypatterns.meta.code.tex pgflibrarypatterns.meta.code.tex l3backend-xetex.def 2026-09-09 L3 backend support: XeTeX
- Interaction between ltproperties, the hook system and the package pgfby jlab on October 26, 2026 at 9:44 am
The other day, I tried to answer a question with the requirements that: some packages are loaded through the hook \AtBeginDocument; some data are saved through the hook \AtEndDocument, to be retrieved at the next run. I finally used an auxiliary file to store the data, but initially I tried to use the new LaTeX properties mechanism documented in ltproperties-doc.pdf. I came across a strange interaction between ltproperties the LaTeX hook system and the pgf package. If I compile \documentclass{article} \NewProperty{test}{now}{}{test} \AtEndDocument{ \RecordProperties{here}{test} } \AtBeginDocument{ \usepackage{lipsum} % \usepackage{pgf} } \begin{document} aaa \RefProperty{here}{test} bbb \end{document} the property is correctly read and the output file contains But, if I uncomment the line \usepackage{pgf} and load the pgf package \AtBeginDocument, the property is lost. The problem doesn't occur with the lipsum package, nor if \usepackage{pgf} is moved outside \AtBeginDocument. Any idea?
- TikZ code, OK directly in a file, not OK in a standalone subfileby Denis Bitouzé on October 21, 2026 at 5:13 pm
The following file (which comes from an article in the TeXnische Komödie about the schulma-physik package), say subfile.tex, compiles like a charm: \documentclass{article} \usepackage[compatibility]{circuitikz} \usetikzlibrary{circuits.ee.IEC} \makeatletter % Ergänzungen von Schaltzeichenformen auf der Grundlage von pgflibraryshapes.gates.ee.IEC.code.tex \pgfdeclareshape{leere diode} {% \inheritsavedanchors[from=rectangle ee]% \inheritanchor[from=rectangle ee]{center}% \inheritanchor[from=rectangle ee]{north}% \inheritanchor[from=rectangle ee]{south}% \inheritanchor[from=rectangle ee]{east}% \inheritanchor[from=rectangle ee]{west}% \inheritanchor[from=rectangle ee]{north east}% \inheritanchor[from=rectangle ee]{north west}% \inheritanchor[from=rectangle ee]{south east}% \inheritanchor[from=rectangle ee]{south west}% \inheritanchor[from=rectangle ee]{input}% \inheritanchor[from=rectangle ee]{output}% \inheritanchorborder[from=rectangle ee]% % \backgroundpath{ \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@xa=\pgf@x \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y % Move tip back a little bit \advance\pgf@xb by-.5\pgflinewidth % Triangle triangle: \pgfpathmoveto{\pgfqpoint{\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfqpoint{\pgf@xa}{\pgf@yb}} \pgf@yc=.5\pgf@ya \advance\pgf@yc by .5\pgf@yb \pgfpathlineto{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgfpathclose }% \beforebackgroundpath{ { \pgf@process{\pgfpointadd{\southwest}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}} \pgf@ya=\pgf@y \pgf@process{\pgfpointadd{\northeast}{\pgfpointscale{-1}{\pgfpoint{\pgfkeysvalueof{/pgf/outer xsep}}{\pgfkeysvalueof{/pgf/outer ysep}}}}} \pgf@xb=\pgf@x \pgf@yb=\pgf@y \pgf@yc=.5\pgf@ya \advance\pgf@yc by.5\pgf@yb \pgfusepathqstroke \pgftransformshift{\pgfqpoint{\pgf@xb}{\pgf@yc}} \pgf@yc=.5\pgf@yb \advance\pgf@yc by-.5\pgf@ya \pgftransformscale{\pgf@sys@tonumber{\pgf@yc}} \pgfkeysvalueof{/pgf/generic diode IEC/before background} } }% } \makeatother \tikzset{ leere diode graphic/.style={ circuit symbol open, circuit symbol size=width 1.25 height 1.25, transform shape, shape=leere diode, /pgf/generic diode IEC/before background={ \pgfpathmoveto{\pgfqpoint{0pt}{-1pt}} \pgfpathlineto{\pgfqpoint{0pt}{1pt}} \pgfusepathqstroke }, }, } \begin{document} \begin{tikzpicture}[circuit ee IEC,circuit symbol unit=5.5pt] \tikzset{set diode graphic=leere diode graphic}\draw (0,0) to[diode] (1,0); \end{tikzpicture} \end{document} But if it is compiled via another file—say, mainfile.tex—using the standalone package: \documentclass{article} \usepackage[subpreambles]{standalone} \begin{document} \input{subfile.tex} \end{document} the second compilation fails with the following error: (./subfile.tex ! Undefined control sequence. \pgf@sh@bg@leere diode ->\pgf @process{\pgfpointadd {\southwest }{\pgfpoint ... l.77 ... diode graphic}\draw (0,0) to[diode] (1,0) ; ? Although the mainfile.sta file contains the entire preamble of the subfile.tex file—including the \makeatletter and \makeatother commands—it appears that the @ character is not treated as a letter. Do you understand why, and do you know how to solve this problem?
- How to enlarge the bounding box of `tblr` with `tikz` if the `overlay` get out of the `tblr` itself?by Explorer on September 16, 2026 at 3:47 pm
Just for fun, I try to mimic this question with tikz-extension with tabularray: \documentclass{article} \usepackage{tabularray} \UseTblrLibrary{tikz} \begin{document} \begin{tblr}{ colspec={*{3}{Q[c,m,12mm]}}, hlines,vlines, } multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \\ \end{tblr} \bigskip \begin{tblr}{ colspec={*{3}{Q[c,m,12mm]}}, % hlines,vlines, rows={rowsep=+5pt}, columns={colsep=+5pt}, } multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \begin{tblrtikzabove}% \foreach \i in {1,...,\arabic{rowcount}}{ \foreach \j in {1,...,\arabic{colcount}}{ \coordinate (A) at ([xshift=+2pt,yshift=-2pt]h\i-|v\j); \coordinate (B) at ([xshift=-2pt,yshift=+2pt]h\inteval{\i+1}-|v\inteval{\j+1}); \draw[cyan] (A) rectangle (B); } } \draw[magenta] ([xshift=-1.5pt,yshift=+1.5pt]h1-|v1) rectangle ([xshift=+1.5pt,yshift=-1.5pt]h\inteval{\arabic{rowcount}+1}-|v\inteval{\arabic{colcount}+1}); \end{tblrtikzabove}% \end{tblr} \end{document} However, the bounding box was not enlarged with the overlay. It looks not a good idea to do so with tabularray...? Now I turn to focus, if we need to draw something outside the tblr, how to enlarge the corresponding bounding box? Edit Now let's only focues the bounding box, similar to this post(?), following example: \documentclass{article} \usepackage{showframe} \setlength{\parindent}{0pt} \usepackage{tabularray} \UseTblrLibrary{tikz} \usetikzlibrary{bending} \begin{document} \begin{tblr}{colspec={*{3}{Q[c,m,12mm]}},hlines,vlines} multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \begin{tblrtikzabove}% \draw[ultra thick,cyan,-latex] (1-1.north west) to[bend right] (3-1.south west); \end{tblrtikzabove}% \end{tblr} \bigskip some text% \begin{tblr}{colspec={*{3}{Q[c,m,12mm]}},hlines,vlines} multiple lines & b & c \\ d & multiple lines & f \\ g & h & i \begin{tblrtikzabove}% \draw[ultra thick,cyan,-latex] (1-1.north west) to[bend right] (3-1.south west); \end{tblrtikzabove}% \end{tblr} \end{document} The "some text" was overlapped with the arrow outside the tblr, my focus here, was how to enlarge the bounding box of tblr in similar case?
- Hollowed-out sphere effectby Sebastiano on July 13, 2026 at 10:49 pm
How can I obtain the hollowed-out sphere effect? The drawing above is my original done many years before. \documentclass{article} \usepackage{tikz} \usetikzlibrary{arrows.meta, calc, positioning, shapes.geometric} \begin{document} \begin{tikzpicture}[ scale=1.2, axis/.style={thick, ->} ] \coordinate (O) at (0, 0); \coordinate (X) at (-2, -2.3); \coordinate (Y) at (5.5, 0); \coordinate (Z) at (0, 4); \coordinate (P) at (3.1, 1.3); \draw[axis] (O) -- (X) node[left, font=\large, xshift=-3pt] {$x$}; \draw[axis] (O) -- (Y) node[below, font=\large, yshift=-3pt] {$y$}; \draw[axis] (O) -- (Z) node[left, font=\large, xshift=-3pt] {$z$}; \begin{scope} \shade[ball color=gray!30!white, opacity=0.85] (O) circle (0.9); \draw[gray!60, thin] (O) circle (0.9); \fill[gray!60!black, opacity=0.9] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \shade[inner color=black!80, outer color=gray!70!black, opacity=0.5] plot[smooth cycle, tension=0.7] coordinates { ($(O)+(-0.2, 0.4)$) ($(O)+(0.5, 0.5)$) ($(O)+(0.6, -0.4)$) ($(O)+(0.1, -0.6)$) ($(O)+(-0.3, -0.3)$) }; \end{scope} \fill[black] (O) circle (0.07) node[below, yshift=-4pt, font=\large] {$O$}; \draw[->, >=Stealth, shorten >= 2.5pt, shorten <= 2pt] (O) -- (P) node[midway, above, yshift=2pt, font=\large] {$r$}; \fill[black] (P) circle (0.08) node[above, yshift=3pt, font=\large] {$P$}; \node[right, font=\Large\itshape, xshift=2pt, yshift=-2pt] at (P) {$m$}; \node[below, font=\large] at (0.2, -0.95) {$M$}; \end{tikzpicture} \end{document}
- How to avoid code duplication in path along with patterns?by Explorer on May 21, 2026 at 1:06 pm
Here below is my original code: \documentclass[tikz,border=5pt]{standalone} \usepackage{fourier} \usetikzlibrary{bending,patterns.meta,angles,quotes} \begin{document} \begin{tikzpicture}[>=latex] \draw[thick,->] (0,0) -- (10,0) node[below] {$x$}; \draw[thick,->] (0,0) -- (0,-3) node[right] {$y$}; \draw[ultra thick] (7,2) -- (7,0) coordinate (A) -- (8,0) -- (8,-4) -- (7,-4) coordinate (B) -- (7,-6); %%%%%%%%%%%%%%%% path coordinate duplicated \fill[pattern={Lines[angle=-45,distance={5pt}]},preaction={fill=white}] (7,2) -- (7,0) -- (8,0) -- (8,-4) -- (7,-4) -- (7,-6) -- ++(.5,0) -- ++(0,+1.5) -- ++(1,0) -- ++(0,+5) -- ++(-1,0) -- ++(0,1.5) -- cycle; %%%%%%%%%%%%%%%% \draw(0,0) node[label={[label distance=-2.5mm]above left:$O$}] (O) {} -- (7,-4) pic[draw,<->,angle radius=2cm,angle eccentricity=1.15,"$\alpha$"] {angle = B--O--A}; \end{tikzpicture} \end{document} which gives: However, the path: (7,2) -- (7,0) -- (8,0) -- (8,-4) -- (7,-4) -- (7,-6) appeared twice, and I think that is duplicated. How to avoid and make the code more neater?
- nicematrix, \CodeAfter and overlappingby projetmbc on December 25, 2025 at 11:11 am
Is there an automatic way to avoid "TikZ code after" overlap the text? I give a real use case, and not a MWE. \documentclass[12pt]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[top=1cm, bottom=1.95cm, left=.9cm, right=.9cm]{geometry} \usepackage{nicematrix} \usepackage[svgnames]{xcolor} \usepackage{tikz] \tikzset{ product/.style = { shorten > = 3.75mm, thick }, product-times/.style = { pos=0.5, circle, fill=white, inner sep=2pt }, arrow/.style = { ->, thick }, rounded-frame/.style = { draw, rounded corners, thick, inner sep = 5pt, anchor = west } } \begin{document} XXX $\begin{NiceArray}{*{9}{c}}[cell-space-limits=3pt] & & & & & & & & C_j^{\,\prime} \\ & & & & & & & & \phantom{X} \\ & & & & & & & & \Vdots[shorten-start=11pt] \\ & & & & & & & & \color{IndianRed}a[k]_{qj} \\ & & & & & & & & \Vdots \\ & & & & & & & & \color{ForestGreen} a[k]_{rj} \\ & & & & & & & & \Vdots[shorten-end=21pt] \\ & & \NotEmpty & & & & \NotEmpty & & \\ L_i & \hspace{3pt} & \Cdots[shorten-start=18pt] & \color{IndianRed} 1 & \Cdots & \color{ForestGreen} 0 & \Cdots[shorten-end=18pt] & \hspace{12.5pt} & a[k{+}1]_{ij} % \CodeAfter % Sous-matrices. \SubMatrix({3-9}{7-9})[slim] \SubMatrix({9-3}{9-7}) \SubMatrix({9-9}{9-9}) % Décorons... \begin{tikzpicture} % Indication pour la ligne et la colonne. \draw[ arrow, shorten > = 8mm, ] (1-9.south) to (4-9.north); \draw[ arrow, shorten < = 1mm, shorten > = 9.5mm, ] (9-1.east) to (9-4.west); % Flèches des produits. \draw[ product, IndianRed, ] (9-4.north) to [bend left] node[ product-times, draw = IndianRed, ] {$\times$} (4-9.west); \draw[ product, ForestGreen, ] (9-6.north) to [bend left] node[ product-times, draw = ForestGreen ] {$\times$} (6-9.west) ; % Signification des entrées. \draw[ arrow, ForestGreen, ] ([yshift=-5mm]9-6.south) to (9-6.south); \node[ rounded-frame, ForestGreen ] at ([yshift=-8.1mm, xshift=-2mm]9-6.south) {Pas de lien direct de $i$ à $r$.}; % \draw[ arrow, IndianRed, ] ([yshift=-13.5mm]9-4.south) to (9-4.south); \node[ rounded-frame, IndianRed ] at ([yshift=-17mm, xshift=-2mm]9-4.south) {Un lien direct de $i$ à $q$.}; % \draw[ arrow, IndianRed ] ([xshift=8.5mm] 4-9.east) to ([xshift=3.5mm] 4-9.east); \node[ rounded-frame, IndianRed, ] at ([xshift=8.5mm] 4-9.east) {Nombre de parcours de longueur $k$ de $q$ à $j$.}; % \draw[ arrow, ForestGreen, ] ([xshift=8.5mm] 6-9.east) to ([xshift=3.5mm] 6-9.east); \node[ rounded-frame, ForestGreen, ] at ([xshift=8.5mm] 6-9.east) {Nombre de parcours de longueur $k$ de $r$ à $j$.}; \end{tikzpicture} \end{NiceArray}$ XXX \end{document}
- Surface plots using Tikzby skm on December 27, 2024 at 11:09 am
I want to show surface approximation plots, in which I have two variables called calculated and approximated. I need to show two 3D surface plots corresponding to these two variables, whose values are stored in .dat file. I want to have plot as shown in this SO answer. I am able to compile and run the code provided in the answer. However, when I try to make some dummy modifications i.e. adding another hard-coded plot, the code is not running. My non-running Code: \documentclass[border=1cm]{standalone} \usepackage{amsmath} \usepackage{pgfplots} \pgfplotsset{compat=1.18} \pgfplotsset{colormap={violet}{rgb255=(25,25,122) rgb255=(238,140,238) color=(white)}} \begin{document} \begin{tikzpicture}[ declare function={ f(\x,\y)=-exp(-(\x^2+\y^2)/1.3; }] \begin{axis}[ view={30}{20}, mesh/interior colormap name=violet, colormap/viridis, hide axis, xmin=-2, xmax=2, ymin=-2, ymax=2, zmin=-2.5, zmax=0, ] \addplot3[ surf, samples=4, % Reduced number of samples for demonstration domain=-2:2, domain y=-2:2, point meta=explicit, ] table { x y z -2 -2 -2 -1 -2 -1.5 0 -2 -1 1 -2 -0.3 2 -2 0.2 -2 -1 -1.5 -1 -1 -0.8 0 -1 -0.3 1 -1 0.2 2 -1 0.7 -2 0 -1 -1 0 0.1 0 0 0.7 1 0 1.2 2 0 1.5 -2 1 0.2 -1 1 0.6 0 1 1 1 1 1.3 2 1 1.5 -2 2 0.8 -1 2 1 0 2 1.3 1 2 1.5 2 2 1.8 }; \end{axis} \end{tikzpicture} \end{document} How to get a figure like below (Plus added plot using hard-coded or file-loaded values)?
- Draw a TikZ picture with forces and a ropeby selector on December 26, 2024 at 3:47 pm
I am trying to draw a TikZ picture of this screenshot. I was trying to adapt this template which I found when asking Google and which looks a lot like the picture I am aiming at. But I did not succeed. \documentclass[border=3pt,tikz]{standalone} \usepackage{physics} \usepackage{ifthen} \usepackage{tikz} \usetikzlibrary{patterns} \tikzset{>=latex} % for LaTeX arrow head \colorlet{myred}{red!65!black} \tikzstyle{ground}=[preaction={fill,top color=black!10,bottom color=black!5,shading angle=20}, pattern=north east lines,draw=none,minimum width=0.3,minimum height=0.6] \tikzstyle{mass}=[line width=0.6,red!30!black,fill=red!40!black!10,rounded corners=1, top color=red!40!black!20,bottom color=red!40!black!10,shading angle=20] \tikzstyle{rope}=[brown!70!black,line width=2] %very thick \def\rope#1{ \draw[black,line width=2.3] #1; \draw[rope] #1; } % FORCES SWITCH \tikzstyle{force}=[->,myred,thick,line cap=round] \newcommand{\vbF}{\vb{F}} \newcommand{\vbT}{\vb{T}} \newboolean{showforces} \setboolean{showforces}{true} \begin{document} % VERTICAL ceiling \def\h{0.6} % mass height \def\w{0.7} % mass width % VERTICAL ceiling 2 \begin{tikzpicture} \def\W{2.0} % ground width \def\D{0.2} % ground depth \def\H{1.5} % ground depth \def\y{0} % mass y coordinate \coordinate (M) at (0,0); \rope{(-0.4*\W,1.05*\H) -- (M) -- (0.4*\W,1.05*\H)} \draw[ground] (-\W/2,\H) rectangle++ (\W,\D); \draw (-\W/2,\H) --++ (\W,0); \draw[mass] (M)++(-\w/2,0) rectangle++ (\w,-\h) node[midway] {$m$}; \end{tikzpicture} \end{document} Do you see an easy way to adapt the template or to draw this picture otherwise?
- TikZ: Shapes with an angular colour gradientby StormyTeacup on April 18, 2024 at 2:05 pm
Cross-posting from Stack Overflow: https://stackoverflow.com/q/78347764/2777074 Good people! I'm trying to draw some shapes with an angular colour gradient, but I am unable to find the general syntax for how fill a shape like that. I'm going to need to draw an awful lot of these diagrams, but to give you an idea of the basic way I want these things to look like when they're finished, I am attaching this picture: So, what I want is something so that I can specify "the gradient starts with colour X at angle A, and ends with colour Y at angle B". Does TikZ picture have such a function, or is it necessary to define something on one's own? Look forward to your responses! The only thing I've been able to come up with would be to use the method described in this answer to create a circular shape as a background, then to "hide" most of it with white with a cut-out of my shape remaining, but the problem with this approach is not only that it's kind of inelegant, it also will not work if I need to have several shapes next to one another. https://stackoverflow.com/questions/72813749/tikz-fill-a-circle-with-shading-color-by-angle EDIT: It being requested that I add some code snippet, I have put together this one, which produces the figure I have in mind, albeit without the desired gradient: \begin{tikzpicture} \draw[thick, arrows=<->] (-5,0)--(5,0); \draw[thick, arrows=<->] (0,-5)--(0,5); \draw[fill=red, draw=none] (2.5,0) arc (0:225:2.5) -- (225:2.2) -- (243:3) -- (225:3.8)--(225:3.5) arc (225:0:3.5) -- cycle; \draw[fill=blue, draw=none] (290:2.5) arc (290:335:2.5) -- (335:2.2) -- (353:3) -- (335:3.8) -- (335:3.5) arc (335:290:3.5) -- cycle; \end{tikzpicture} The image produced looks as follows:
- How to Create an Interactive Diagram with TikZby psygo on February 3, 2024 at 3:57 pm
I'm trying to create an interactive diagram, much like the one used in the EPUBs sold by Go Books: What I mean by "interactive" is that the user controls when things are triggered. For example, animations are not what I would call interactivity because they happen regardless of what the user does. (Of course, in-between each move, we could have an animation.) I quite frankly don't know if that's even possible with TikZ. Is it? Maybe there's a way of injecting HTML and JS into TikZ? Here's a minimal example of a Go board with 3 moves, the idea would be to have TikZ add some sort of UI for going back and forth, and then showing each move accordingly — no need for the play button —: \documentclass{article} \usepackage{tikz} \newlength{\step} \begin{document} \begin{tikzpicture} \setlength{\step}{\dimexpr 10cm / 18 \relax} \draw[step=\step] (0, 0) grid (10, 10); \draw[draw = white, fill = black, line width = 0.1mm] (2 * 10cm / 18, 3 * 10cm / 18) circle [radius = 0.2575cm] node[color = white] {1}; \draw[draw = black, fill = white, line width = 0.1mm] (3 * 10cm / 18, 3 * 10cm / 18) circle [radius = 0.2575cm] node[color = black] {2}; \draw[draw = white, fill = black, line width = 0.1mm] (4 * 10cm / 18, 3 * 10cm / 18) circle [radius = 0.2575cm] node[color = white] {3}; \end{tikzpicture} \end{document}
- Add angles in TikZ-3dby Echelle-courte on April 13, 2023 at 2:26 am
I've done this figure in TikZ, but I don't know how to add and label the angles in TikZ-3D, how can I do it? Here's the original figure : Here's mine plus the code : \documentclass[tikz]{standalone} \usepackage{tikz} \usepackage{tikz-3dplot} \begin{document} \tdplotsetmaincoords{60}{-30} \begin{tikzpicture}[tdplot_main_coords, >=stealth, scale=2.5] \draw[->, thick] (0,0,0)--(0,0,3) node[left] {$\vec{z}_{n-1}$}; \draw[->, thick] (0,0,0)--(3,0,0) node[below] {$\vec{x}_{n-1}$}; \draw[dashed] (0,0,0)--(0,0.53,0.47); \draw[dashed] (1.75,0,0)--(1.75,0,1); \draw[->, thick] (1.75,0,0)--(1.75,2,1.75) node[left] {$\vec{z}_{n}$}; \draw[dashed] (1.75,0.97,0.85)--(3,0.97,0.85); \draw[->, thick] (1.75,0.97,0.85)--(3,0.97,1.5) node[below] {$\vec{x}_n$}; \draw[<->, thick] (0,0.32,0.25)--(1.75,0.32,0.25) node[above, midway] {$d_n$}; \draw[<->, thick] (2.75,0,0)--(2.75,0.97,0.85) node[right, midway] {$r_n$}; \end{tikzpicture} \end{document}
- TikZ - 3D surface plotby sobat on January 25, 2022 at 4:33 pm
I want to draw something like this: For the moment I just managed to draw a 3D plate and I don't know how to do it with the 3D sinus curves. I managed to draw something like that, but I don't know how to do for have 2 color in the curve and the same shape. It's not that good !! \documentclass {standalone} \usepackage{pgfplots} \pgfplotsset{compat = newest} \begin{document} \begin{tikzpicture} \begin{axis}[hide axis] \addplot3 [ domain=-2:2, domain y = -2:2, samples = 40, samples y = 40, surf, fill=pink, faceted color = teal] {-exp(-(x^2+y^2)/1.3}; \end{axis} \end{tikzpicture} \end{document} Could you help me?!
- Drawing Complicated geometry figures in tikzby furfur on April 13, 2020 at 9:49 am
I want to get this kind of figures in LaTeX: I am pretty sure these were not written manually in tikz, since it would take too much time. How can I draw hard geometry in tikz without needing to spend half an hour on each figure? I tried geogebra but the figures produced are horrible. Even by changing the software’s settings you still get ugly tikz figures and the nodes labels are placed incorrectly. Please help me, maybe with something like a WYSIWYG program for tikz, because it is not the best option to manually write the tikz code for 200 figures..
- Special table - rounded bordersby ez5653 on February 15, 2020 at 11:36 am
Can you help me with creating this type of table in Latex ? Thank you
- Densest sphere packingby Wokwok on June 16, 2019 at 5:38 pm
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 fixed representation of the picture, right? Thank you for your help.
- I want to make a picture in physics with TikZ. Can you help me?by Hiếu Trần on March 30, 2019 at 2:06 am
A similar example: \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \begin{document} \begin{tikzpicture}[ force/.style={>=latex,draw=blue,fill=blue}, axis/.style={densely dashed,gray,font=\small}, M/.style={rectangle,draw,fill=lightgray,minimum size=0.5cm,thin}, m/.style={rectangle,draw=black,fill=gray,minimum size=0.3cm,thin}, plane/.style={draw=black,fill=blue!10}, string/.style={draw=red, thick}, pulley/.style={draw, thick, circle}, ] %mainshape \filldraw[blue!30!white, draw=black] (0,0) coordinate (b) rectangle (3,1) coordinate (c); % \draw[pulley] (3.1,1.2) circle (0.25cm); \node (pulley) [pulley, minimum width=.5cm, anchor=south west] at (c) {}; \filldraw[gray!40!white, draw=black] (1.5,1.05) rectangle (2,1.55); \draw[red,thick] (2,1.2)--(pulley.west); \filldraw[gray, draw=black] (3.10, 0.1) rectangle (3.6, 0.6) coordinate (a); \draw[red,thick] (a -| pulley.south)--(pulley.south); %FBD1 \begin{scope}; \node[M, right=50pt of a](M){}; {[axis,->] \draw (0,-1) -- (0,2) node[right] {$+y$}; \draw (M) -- ++(2,0) node[right] {$+x$};} {[force,->] % Assuming that Mg = 1. The normal force will therefore be cos(alpha) \draw (M.center) -- ++(0,1) node[above right] {$F_N$}; \draw (M.west) -- ++(-1,0) node[left] {$F_f$}; \draw (M.east) -- ++(1,0) node[above] {$T$};} \draw[force,->] (M.center)-- ++(0,-1) node[below] {$Mg$}; \end{scope}; %FBD2 \node[m, left=25pt of b] (m) {}; \draw[axis,->] (m) -- ++(0,-2) node[left] {$+$}; {[force,->] \draw (m.north) -- ++(0,1) node[above] {$T'$}; \draw (m.south) -- ++(0,-1) node[right] {$mg$}; }; \end{tikzpicture} \end{document}
- footnote outside tikzbox and tcolorboxby Kώστας Κούδας on March 25, 2019 at 9:52 am
I use tikz and tcolorbox for theorems. Also I want footnotes outside of the boxes, at the bottom of the page and with the same numbering like the others. I want something like this, but with the numbering style to be the same with the outside footnotes. Is there any solution? This is my code \documentclass{article} \usepackage{tikz} \usetikzlibrary{shapes,snakes} \usepackage[most]{tcolorbox} \usepackage{environ} \renewcommand{\thefootnote}{[\Roman{footnote}]}% Footnote style!!! \tikzstyle{mybox} = [draw=black, fill=white, very thick, rectangle, rounded corners, inner sep=10pt, inner ysep=20pt] \NewEnviron{tikzbox}{\begin{tikzpicture} \node [mybox] (box){% \begin{minipage}{0.50\textwidth} \BODY \end{minipage} }; \end{tikzpicture}% } \NewEnviron{Tbox}{ \begin{tcolorbox}[enhanced, breakable] \BODY \end{tcolorbox} } \begin{document} Some main text Some main text Some main text Some main text Some main text Some main text\footnote{The first footnote.} Other main text Other main text Other main text Other main text\footnote{The second footnote.} \begin{tikzbox} Some tikzboxed text Some tikzboxed text Some tikzboxed text\footnote{I want this footnote outside of the box and with number [III].} \end{tikzbox} \begin{Tbox} Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text Some tcolorboxed text\footnote{I want this footnote outside of the box and with number [IV].} \end{Tbox} \end{document} and this is how it looks like: Thanks in advance!!!
- Simple pulley free body diagramby user2175783 on September 26, 2018 at 12:58 pm
I would like to create the following image in tikz. I am completely new to it, so I tried to change the code at http://www.texample.net/tikz/examples/free-body-diagrams/ to \def\iangle{90} \def\down{-90} \def\arcr{0.5cm} \begin{tikzpicture}[ force/.style={>=latex,draw=blue,fill=blue}, axis/.style={densely dashed,gray,font=\small}, M/.style={rectangle,draw,fill=lightgray,minimum size=0.5cm,thin}, m/.style={rectangle,draw=black,fill=lightgray,minimum size=0.3cm,thin}, plane/.style={draw=black,fill=blue!10}, string/.style={draw=red, thick}, pulley/.style={thick}, ] \matrix[column sep=1cm] { \draw[plane] (0,-1) coordinate (base) -- coordinate[pos=0.5] (mid) ++(\iangle:3) coordinate (top) |- (base) -- cycle; \path (mid) node[M,rotate=\iangle,yshift=0.5cm] (M) {}; & %%% % Free body diagram of M2 pulley \draw[pulley] (top) -- ++(\iangle:0.25) circle (0.5cm) ++ (90-\iangle:0.5) coordinate (pulley); \draw[string] (M.east) -- ++(\iangle:2.0cm) arc (90+\iangle:0:0.25) -- ++(0,-1) node[m] {}; \\ }; \end{tikzpicture} but I am not close. Some basic pointers would be appreciated.
- How to create horn torus in LaTeX?by Arindam Jha on June 6, 2018 at 5:20 pm
This is a horn torus. How can I use LaTeX to generate it ?
- How to draw non square Go board in latex?by qwerty on April 4, 2018 at 9:12 am
As the title says, the square Go board is easy to draw with lots of Go board packages, such as igo or psgo. But there is no way to draw a non square Go board support. How do I draw rectangular Go boards? I have found a paper that draw these Go boards, but don't know how it was done... The paper is: van der Werf, Erik CD, and Mark HM Winands. "Solving Go for rectangular boards." Icga Journal 32.2 (2009): 77-88.
- Drawing topology of network with TikZby MEDIOUNI on June 26, 2016 at 12:07 am
I want to draw with TikZ a topology as illustrated below: The shape of node preferred is ball, can you help me ?
- How I can create a graph of forces - tikz?by user98690 on April 17, 2016 at 9:36 am
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{document}
- Representing general transformations on a 3D grid using TikZby Sid on August 20, 2015 at 9:50 am
I have a cuboid made from unit squares which in 2D looks like the following: Considering a 3D version of this (i.e. a cuboid). I wanted to use Tikz to demonstrate some of the possible deformations that we can introduce to this 3D grid. I wanted to show arbitrary streching (in any direction), shearing (where one half is pulled in one direction and the other half is pulled in the other direction) and some general inhomogeneous deformation (a deformation which cannot be described by any of rotations, shearing, streching etc. It is a very general transformation). I would like each of the spheres shaded and shown in different colours for the different transformations. Many thanks for your help in advance!!!!
- 3d Graph Error with Plotby dreez91 on June 16, 2015 at 3:25 pm
I have a problem with plotting a 3d-graph \documentclass[border=5pt]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[ title=Exmple using the mesh parameter, hide axis, colormap/cool, ] \addplot3[ mesh, samples = 40, domain=0:1, ] {exp(-(ln(x)-ln(y)))}; \addlegendentry{$\frac{sin(r)}{r}$} \end{axis} \end{tikzpicture} \end{document} The problem is NOTE: coordinate (0Y0.0e0],0Y0.0e0],3Y0.0e0]) has been dropped because it is un bounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y2.5641e-2],0Y0.0e0],3Y0.0e0]) has been dropped because it i s unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y5.1282e-2],0Y0.0e0],3Y0.0e0]) has been dropped because it i s unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y7.6923001e-2],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y1.02564001e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y1.2820499e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y1.5384598e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y1.7948697e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y2.0512796e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y2.3076895e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y2.5640994e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y2.8205093e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y3.0769193e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y3.3333292e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y3.589739e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y3.846149e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y4.1025589e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y4.3589688e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y4.6153787e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y4.8717886e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y5.1281985e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y5.3846085e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y5.6410184e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y5.8974283e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y6.1538382e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y6.4102481e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y6.666658e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y6.923068e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y7.1794778e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y7.4358878e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y7.6922977e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y7.9487076e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y8.2051175e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y8.4615274e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y8.7179373e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y8.9743472e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y9.2307571e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y9.487167e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y9.743577e-1],0Y0.0e0],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (1Y9.9999869e-1],0Y0.0e0],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y2.5641e-2],3Y0.0e0]) has been dropped because it i s unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y5.1282e-2],3Y0.0e0]) has been dropped because it i s unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y7.6923001e-2],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y1.02564001e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y1.2820499e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y1.5384598e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y1.7948697e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y2.0512796e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y2.3076895e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y2.5640994e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y2.8205093e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y3.0769193e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y3.3333292e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y3.589739e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y3.846149e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y4.1025589e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y4.3589688e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y4.6153787e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y4.8717886e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y5.1281985e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y5.3846085e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y5.6410184e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y5.8974283e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y6.1538382e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y6.4102481e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y6.666658e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y6.923068e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y7.1794778e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y7.4358878e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y7.6922977e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y7.9487076e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y8.2051175e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y8.4615274e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y8.7179373e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y8.9743472e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y9.2307571e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y9.487167e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y9.743577e-1],3Y0.0e0]) has been dropped because it is unbounded (in z). (see also unbounded coords=jump). NOTE: coordinate (0Y0.0e0],1Y9.9999869e-1],3Y0.0e0]) has been dropped because i t is unbounded (in z). (see also unbounded coords=jump). ! Package pgfplots Error: An internal error occurred during z buffer reordering s: the rows/cols where not balanced! I have rows= 40, cols=40. If this happens to be wrong, you might want to provide rows and cols manually.. See the pgfplots package documentation for explanation. Type H <return> for immediate help. ... l.17 \end{axis} ? Is there anyone who knows how to fix the problem? It works e.g. with the function sin(x)*sin(y)...
- How to create a text box using PGFby Arya Mz on December 24, 2014 at 12:59 pm
I'm styling my beamer presentation using PGF picture and I want to add a textbox with a specific width. The following line doesn't provide a width parameter. \pgftext[at=\pgfpoint{.05\paperwidth}{-.3\paperheight},left,base]{\inserttitle} Note: I strictly want to use PGF. Tikz is not an option.
- Creating a Free Body Diagram in TikZby Severian on March 25, 2012 at 7:24 am
I'm trying to create a free body diagram of an an object, more specifically the Orion spacecraft. I'm trying to create a diagram that consists of the vectors with F_g pointing downwards, F_D (drag) pointing at an angle similar to T in this image I don't really know where to start.
- Pascal's triangle in tikzby dalibor.zeleny on May 6, 2011 at 12:21 am
I would like to typeset the top part of Pascal's triangle. To get the triangle with the names of the binomial coefficients, i.e., {n \choose k}, I used the following code \begin{tikzpicture} \foreach \n in {0,...,4} { \foreach \k in {0,...,\n} { \node at (\k-\n/2,-\n) {${\n \choose \k}$}; } } \end{tikzpicture} The result is this Now I want to be equally lazy and do something like this for the values of the binomial coefficients, i.e., replace {\n \choose \k} in the node label with \CalculateBinomialCoefficient{\n}{\k} where \CalculateBinomialCoefficient is a hypothetical macro that calculates the binomial coefficient. Has anyone done something like that? The result should look like this:
- Drawing on an image with TikZby nacho4d on January 23, 2011 at 5:08 pm
Recently, I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on an image. Instead of pasting an image in Illustrator and adding some vectors to point to something in the picture, I would like to do it using TikZ. Is it possible? For example, on a picture of a computer (PNG, etc.) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc..
- Is there a way to tune ball shading in TikZ ?by Łukasz Lew on August 18, 2010 at 1:55 pm
I want to create a Go stone in TikZ. "ball color" option in node style is almost OK. Here is my result: But I don't like the stones, they are "too balish". The "reflection" should be less spot-on and more ambient. I could get such a result if I could manipulate both shading colors or shading curve. Can I do it in TikZ? Here is what I want to achieve: PS. Any ideas to render wood-like background w/o texture?