As of May 31, 2023, we have updated our Code of Conduct.

Questions tagged [tikz-pic]

{tikz-pic} is about questions concerning “pics” in a Ti*k*Z context. A “pic” is a “short picture” that can be inserted anywhere in TikZ picture where you could also insert a node.

Filter by
Sorted by
Tagged with
1 vote
1 answer
79 views

Is \tikzpictextoptions not supposed to contain the text after the quotes only?

\documentclass{article} \usepackage{tikz} \usetikzlibrary{quotes} \begin{document} \tikzset{ thing/.pic={ \node {\tikzpictext}; \node at (0,1) {\tikzpictextoptions}; } } \...
0 votes
1 answer
116 views

Chemplants doc example failed

I want to use check valve pic as described on chemplants doc at page 54, but I get an error saying it's not defined. I know it could be an error of the package, but I want to be sure and see if it's ...
0 votes
1 answer
40 views

TikZ's pin option: problem with positioning ordered pair

In a separate post, @00dani provided a nifty way of labeling points with TikZ's pin option which I'm trying to mimic. options for labeling single point Specifically, in a system of 1 quadratic and 1 ...
0 votes
0 answers
20 views

\pgf plot: fatal compile error when replacing quadratic with linear function

I'm trying to slightly modify code that graphs 2 quadratic functions (h/t @TorbjørnT). The revision should graph 1 quadratic and 1 linear function. But when I replace \addplot [red] {x^2}; with \...
1 vote
1 answer
29 views

LaTeX reserving space for undrawn coordinates

I'm trying to write a function to ease the drawing of figures. I called this function \drawcurve as is shown below. It's purpose is to create a curve between 2 lines indicated by coordinates in it's ...
3 votes
2 answers
166 views

Adapting a TikZ drawing

\documentclass{scrartcl} \usepackage{amsmath} \usepackage{sfmath} \usepackage{tikz} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{shadings} \usetikzlibrary{shapes.geometric, ...
2 votes
2 answers
48 views

Centering tikzpicture of a few centimetres

Good afternoon. I have to center this scheme. It's just a matter of a few centimetres :) The code of that part is the following: \tikzstyle{startstop} = [rectangle, rounded corners, minimum width=3cm,...
1 vote
0 answers
24 views

Instances of Background Boxes keep increasing with each Chapter/function call

I'm using the following MWE to create a PDF and when I edit the created PDF it reveals that with each chapter or \chapframe call the number of instances of boxes keep increasing. This can also be made ...
1 vote
3 answers
273 views

tikzpictures underneath matrices

I'm trying to construct a diagram of how to calculate a 3x3 matrix determinant via the Rule of Sarrus, and I've managed to come this far after lots of research, but I still would like to make the ...
1 vote
1 answer
53 views

Project diagram with tikz

I want to draw the following project diagram with tikz. My attempt is below: \documentclass[border=10pt]{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture} \draw (0, 0) rectangle (...
3 votes
1 answer
49 views

Adding braces above other braces on timeline graph

I am trying to add two orange braces as shown in the picture below: I am struggling to place them (in orange) on my diagram. Below is my MWE: \documentclass{standalone} \newcommand{\ImageWidth}{11cm} ...
0 votes
1 answer
188 views

How to put series of small graphics on the graph?

I am making plots with y-axis breaks by placing one \nextgroupplot above the second one. These plots have not only curves but also some additional graphics, which are assigned to bottom coordinate ...
2 votes
1 answer
29 views

Right bracket marker in tikzpicture axis to draw closed set

I'm trying to draw a simple set interval with left/right paranthis for open sets and left/right brackets for closed sets. Here's how I'm drawing it: \begin{adjustbox}{width=\textwidth} \begin{...
4 votes
1 answer
109 views

Arrow directions in a flowchart

I am trying to create a flowchart. So far, I have all the blocks I need. I simply need to create the appropriate 'flow'. I want the arrows in the following directions: How do I do that? I've tried ...
1 vote
0 answers
66 views

Creating swimlane diagrams with flow charts

I want to create a vertical swimlane with 2 groups. In each lane I want to add a complex flow chart. How can I do that? I'm not familiar with a package that could facilitate this. I have the first ...
7 votes
2 answers
989 views

How to bend a word around the circle

I would like to bend the ``commutative rings'' around the circle. I would appreciate any help. \documentclass[a4paper, 12pt, openany]{book} \usepackage{tikz} \usetikzlibrary{calc} \colorlet{euler1}{...
1 vote
1 answer
45 views

Generalizing the body of my tikzpicture environment in the preamble

I would like to generalize this diagram and place it before the \begin{environment} command, so I can just simply/easily change the numbers as I am rotating the square. I would appreciate if I can be ...
0 votes
1 answer
101 views

Designing a nested Venn Diagram

Is there any way to make these similar diagrams look more beautiful, by adding special designs, colours, etc.? I'll really appreciate if I can be helped out. \documentclass[a4paper, 12pt, openany]{...
0 votes
2 answers
265 views

Blockchain Network using latex

I know that this is not a specific problem, but I'm looking for a library that has icons that I can directly use to draw how blockchain network works by using Latex. Is there any such library or ...
3 votes
4 answers
666 views

Triangle. Changing vertices. Draw the height of the triangle

1) I'm a drawing triangles in latex, but I want the vertices A and B to be horizontal. In the code below vertices A and C are horizontal. I have problem changing the code. 2) I want to add a ...
0 votes
0 answers
14 views

Tikzpicture path creating a lot of whitespace [duplicate]

This code \documentclas{article} \usepackage[utf8]{inputenc} \usepackage{graphicx} \usepackage{tikz} \begin{document} \begin{figure} \centering \resizebox{.5\textwidth}{!}{ \fbox{ \...
2 votes
1 answer
75 views

Drawing loops around an ellipse in Tikz

I am trying to show the loops of magnetic field flow around a circular current in tikz. I'd like to end with a central ellipse, something like \draw (0, 0) ellipse (3 and 1), that has eight 'equally' ...
4 votes
2 answers
128 views

Is there an option to simulate the drawing of a TikZ pic without really drawing it?

Currently, I draw a TikZ picture with lots of TikZ elements and subelements. To do this, I use TikZ pic. Sometimes, I need to know the size of a pic prior to its drawing for the correct positioning. ...
3 votes
3 answers
188 views

Serpentine-shaped plots on the x and y axes

I would like to know how to create serpentine curves in the 'tikzpicture' and 'axis' environments on the x and y axes. I used the 'tikzpicture' and 'axis' environments to build the uncolored part of ...
0 votes
1 answer
64 views

How to fix the line width when writing text in a node in Tikzpicture?

I am using Tikzpicture to add a figure to my document, with the caption as a textbox inside a second node. My text either extends beyond the page width, or becomes messy with uneven line widths. What ...
1 vote
1 answer
53 views

TikZ find out current rotation angle in definition of TikZ pic

Is there any way to find out what the current rotation angle is inside the definition of a TikZ pic? I need to define a pic with one component whose positioning is independent of the coordinate ...
3 votes
3 answers
180 views

Adding a Border to an Oval-Shaped Cropped Image

Consider the code \documentclass{book} \usepackage{graphicx} \usepackage[abs]{overpic} \usepackage{tikz} \definecolor{Gold}{RGB}{228,168,73} \begin{document} \thispagestyle{empty} \begin{center} ...
2 votes
1 answer
127 views

How to rotate a polar plot without rotating the grid lines

Please, how do I rotate the following polar plot without rotating its grid lines and polar axis lines? To make it clearer, I just want to rotate the petals alone without rotating any axis or grid ...
0 votes
1 answer
62 views

Drawing graph with unknown constant [closed]

Q=VC(1-e^\frac{-t}{RC}) Is it possible to plot this function, Q-t graph? V and C are unknown constants.
0 votes
1 answer
21 views

I am getting an error while plotting

\documentclass[border=5pt,tikz,12pt]{article} \usepackage[margin=0.75in,footskip=0.25in]{geometry} \usepackage{amsmath} \usepackage{tikz} \usepackage{pgfplots} \begin{document} \begin{center} \begin{...
0 votes
1 answer
69 views

Circular Gauge Plot in LaTeX [duplicate]

Is there a way to create a circular gauge plot in LaTeX using Tikz library or PgfPlots? I found a way to create a horizontal gauge plot, but can't find the circular one? Thank you.
29 votes
1 answer
5k views

TikZ 3.0---Multiple arguments for `pic`

How do I provide multiple arguments for pic? giraffe contains two arguments for colors, #1 and #2. I would like to be able to provide these as giraffe={pink, yellow} or giraffe={colorA=pink, colorB=...
0 votes
1 answer
29 views

Plots with functions like n/2

i'm using tikzpicture and pgfplots to make my plots and i'm currently facing a problem when i use a function like 2/x \begin{center} \begin{tikzpicture} \begin{axis}[ ymin=-10, ymax=10, xmin=-10, ...
7 votes
3 answers
458 views

Drawing an angle between two vectors?

I want to draw an angle between two vectors: \documentclass{article} \usepackage{tikz} \usetikzlibrary{angles,quotes,babel,plotmarks} \usetikzlibrary{decorations.pathreplacing} \usetikzlibrary{calc} \...
0 votes
1 answer
39 views

adding node to tikz figure

I want to add text where I put the dots, for example w_1, w_2, ... w_n. This is the code: \documentclass[tikz,border=3.14mm]{standalone} \usetikzlibrary{positioning} \begin{document} \tikzset{% ...
0 votes
1 answer
48 views

How to place a tikz node at a lower level

Using the solution provided by @Zarko at Markov Chain Arrows and Labels stacked together, I want to know a way insert a node that is on a lower level than the others as shown in the picture below: I ...
0 votes
1 answer
45 views

Tikz Code No Longer Running

This question follows from Markov Chain Arrows and Labels stacked together where I got 2 different solutions to my problem, the one provided by @Zarko which I accepted as my answer and also the one ...
0 votes
2 answers
132 views

Markov Chain Arrows and Labels stacked together

I am having challenges with the following: My bottom chain arrows and labels (1-\theta) are stacked together/overlapping which is something I dont like, and I want to add an extra broken line that ...
2 votes
1 answer
71 views

How to Produce a Bclogo Similar to a Given Tikzpicture and Then Align It Directly Above

Consider the code: \documentclass{book} \hoffset 10pt \voffset -55pt \oddsidemargin 17pt \evensidemargin 18pt \topmargin 35pt \headheight 25pt \textheight 8.25in \textwidth 5.75in \headsep 40pt \...
0 votes
1 answer
56 views

How to have alternate coloring of histogram bars

I am kindly requesting for assistance on how to have the color of my histogram bars alternate between blue and orange. Currently the bars all have the same color which is something I do not like. ...
2 votes
1 answer
145 views

Drawing Capital Market Line and Efficient Frontier

I am struggling to produce the diagram shown in the picture below: How do I reproduce it? So far my trial yielded an awful result. Below is my MWE: \documentclass[12pt,a4paper]{book} \usepackage{...
1 vote
1 answer
42 views

Logarithmic plot using tikz ung pgfplots

I want to draw a logarithmic plot of wavelength and frequency. The x and y axes show an exponential plot. I want the representation to be a simple number. How do I change the labels on the axes? Since ...
0 votes
0 answers
52 views

TikZ get value of passed option/key inside pic

Is it possible to access the options that are passed to a pic inside the definition of a pic? And if yes, how? I know I can do this with self-defined custom keys. But is it possible to also get the ...
1 vote
1 answer
78 views

Producing a Glowing Star with the Transparent Package and Pdflatex

Consider the code: \documentclass{book} \textheight 8.5in \textwidth 5.75in \usepackage{xcolor} %\usepackage{transparent} \definecolor{darkpurple}{RGB}{48, 25, 52} \usepackage{tikz} \usetikzlibrary{...
9 votes
1 answer
652 views

Nested tikz pics?

I have a basic pic ("brick") that I rotate/flip/shift within other pics (e.g. "wall"). These pics ("wall") then get drawn in my tikzpicture, possibly themselves rotated/...
0 votes
1 answer
206 views

Background Setup for My Title Page

I am having trouble setting up the background for my title page using tikz. I adopted this background style from Benmiloud Mohammed at https://latexdraw.com/. I also adopted the contents of the title ...
5 votes
1 answer
267 views

How to use xcolor color names in tikzpicture style?

I want to use color names like MidnightBlue in a style for a tikzpicture to e.g. fill it with a specific color, is this possible? Or am I limited to the other style (red!30 etc.)? This MWE fails with ...
1 vote
0 answers
56 views

Extending a John Kormylo Answer for Color Shading a Portion of a Paragraph to Produce Bold Text as Well

This post is an extension of the question posed in How to Contiguously Shade a Portion of a Paragraph with Color Consider the code \documentclass{book} \usepackage{xcolor} \colorlet{soulred}{red!25} \...
0 votes
1 answer
105 views

Define a pic and use it as node

My purpose is draw an horizontal cylinder. I defined the left and the right base with /.pic . Now I would link these bases with \draw, using the bases anchor point .north and .south. Something goes ...
0 votes
1 answer
120 views

tabularray how to wrap column content inside commands

Tabularray: I want to create a column that prepends and appends some code to save space and avoid repetition, but I don't achieve that behavior. At first, I tried (and failed) to create a new column ...

1
2 3 4 5 6