Questions tagged [tikz-pic]

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
3answers
70 views

looking for Efficient alternative to my tikzpic code

I have a tikzpicture that has repeated elements. Right now I am defining them individually. But I would like to have a code that defines one template-triangle whose dimensions I control (like I do in ...
1
vote
1answer
123 views

Creating pattern from tikzpic

I have a tile.tex (a separate file) that I call in my main document. I want to do two things Create a pattern of 3x5 by stitching together tile.tex. This means I will be calling tile.tex 15 times. I ...
2
votes
1answer
84 views

How to draw a shadow on a pic

I have the following example and I'm wondering why this is not working: \documentclass[tikz]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{quotes} \usetikzlibrary{...
5
votes
1answer
596 views

tikz - Curved cloud shape

So here is my code that produces a circle with text inside and three clouds, also with text, around it. I would like the clouds to curve in an arc around the circle, if that is possible. There is this ...
1
vote
0answers
186 views

Border-to-border placement of a tikz-pic

The placement of a tikz-pic is related to its relative (0,0) coordinate, however I'd like to think about the overall structure of the tikz-pic instead, where the distance between a tikz-pic and a node ...
3
votes
4answers
214 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 ...
3
votes
1answer
162 views

Designing this graph with tikz

How can I design this diagram with tikz? \documentclass[a4paper]{book} \usepackage{tikz} \usepackage{tkz-berge} \usetikzlibrary{matrix,positioning,arrows,calc,patterns,automata} \begin{document} \...
-3
votes
1answer
126 views

how to draw the following picture quickly and curly brace?

I know that this picture contains only line but I want to ask how to draw it quickly with tikzpicture? Moreover, how I can draw the curly brace (}) in the figure? Many thanks for your help!
1
vote
0answers
85 views

Superimpose content to a movie in beamer [duplicate]

When using the command \movie in beamer, from the package multimedia, it appears that the movie itself appears on top of every other content, so that it seems impossible to display any content over it....
6
votes
1answer
2k views

Understanding TikZ anchors using pics

With the MWE below, I get the following figure: Could someone explain me why in the right figure, the red circle is not "inside" the square? I guess it has to do with the square being a node, and not ...
1
vote
2answers
1k views

Does captionsetup command works for subcaption?

I am trying to place three subfigures side by side using the minipage environment. The problem is that I cannot control the width of subcaption inside the minipage environment. I tried both ...
4
votes
4answers
1k views

Arrow Between Equations

Is there a better way to put arrows between equations? \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{tikzpicture} \node at (-4,0)...
3
votes
2answers
278 views

Section of sine / clipped sine

I want to draw a limited sine curve. My problem is, that I know how to draw 1/4 sin but not how to get only a section of it. \setlength{\unitlength}{1mm} \begin{minipage}{\linewidth} \begin {...
5
votes
1answer
266 views

How to add fill in a \pic?

I wrote a TikZ pic for a simple database icon (first picture below). What I want is to hide the two edges that are behind overlaying boxes, similar to the second picture. I thought I could add a white ...
2
votes
1answer
142 views

Compilation error when attempting to define text in a `pic` command

The following MWE is an excerpt from the signature picture heading Part III of Tantau's TikZ & PGF Manual Version 3.0.1a, page 118. For unknown reasons, if the line pic [draw, fill=yellow]{angle= ...
2
votes
2answers
560 views

How to rotate a framed image?

How to rotate a framed image? the following code rotate the image without the frame? Thanks \documentclass[a4paper]{article} \usepackage{graphicx} \usepackage[export]{adjustbox} \usepackage{tikz} \...
0
votes
1answer
111 views

How to draw this block in tikz enviroment?

I am looking for a way to draw these two blocks. Can someone help me here. For first block I was thinking of drawing a rectangle adding a scope to it but I have no idea on how to draw this stair ...
0
votes
2answers
63 views

Position a node with a variable-length sentence always at the same distance from the right margin

I'm using tikzpicture to write some text over an image. Does anyone of you know how to position a text node so that the last letter of a possible variable-length sentence (of that text node) is ...
3
votes
2answers
301 views

How to draw an arrow between this figure?

I have used the \tikzset{pics ... environment to define a tikz image so that I can repeat and change just a few arguments. However, I would like to have an arrow that connects the two images. I am ...
0
votes
1answer
856 views

how to make vertical box plot to horizontal box plot

I have code that draws vertical box plot. I need to change it into horizontal box plot. Can you please tell me how to do it? \documentclass{article} \usepackage{pgf} \usepackage{pgfplots} \...
0
votes
2answers
65 views

How to make the following picture in the same vertical distance between $\alpha_1,\alpha_2,\alpha_3$

It seems that the vertical distance between $\alpha_1,\alpha_2$ is larger than $\alpha_2,\alpha_3$. I post my code in the following \tikzset{% mypoint/.style={circle, fill=black}, middlearrow/...
3
votes
1answer
228 views

Question about drawing semicircles around a circle on tikz

I've been looking at this question: Creating gears in TikZ What I would like to do is convert the gears into semicricles that are touching, so far i have this: \documentclass{article} \usepackage{...
1
vote
1answer
143 views

Problem with pic name

When I compile the following code \documentclass[tikz]{standalone} \usepackage{luatex85} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{quotes} \usetikzlibrary{shadows} \begin{...
4
votes
0answers
103 views

Accessing a node defined inside a pic outside its definition [duplicate]

I am trying to access a node defined inside a pic definition outside its scope. I found this example in the PGF manual v3.0.1a on page 254. The example given is as follows. \documentclass{standalone} ...
4
votes
1answer
86 views

Placing the middle of a predefined picture at a certain node

I am trying to create the following reaction network cycle. Here's my output so far. My MWE is \documentclass[11pt]{standalone} \renewcommand*{\familydefault}{\sfdefault} \usepackage{sfmath} \...
3
votes
2answers
683 views

Circle Size tikzpicture

I would like to set the size of the "plus" circle smaller. I have tried with minimum size and with radius but nothing changes. Here the minimal document: \documentclass{beamer} \usepackage{tikz} \...
3
votes
0answers
362 views

Package pgfkeys error with angles and quotes library: I do not know the key '/handlers/first char syntax

I am trying to draw a simple picture using angle and quotes libraries. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{3d,calc,quotes,angles,patterns} \begin{document} \begin{...
-5
votes
2answers
168 views

making a diagram like this picture

I want to draw a diagram like this picture in the middle of my page. how can I do that?
9
votes
2answers
1k views

How should I prevent a .pic definition inside a document environment, but outside a tikzpicture, from adding a space to the typeset output?

How can I prevent the definition of a .pic from adding an additional space to the typeset output, where the .pic is defined in a \tikzset{} within the document body, rather than either in the preamble ...
3
votes
1answer
9k views

Tikzpictures side by side [duplicate]

I have used the following code: \begin{figure}[h] \begin{tikzpicture} \draw[->] (-0.5,0) -- (4,0) node[right] {$x$}; \draw[->] (0,-0.5) -- (0,4) node[above] {$y$}; ...
3
votes
2answers
186 views

TikZ: pic code with multiple \draw commands doesn't compile as expected

For the following code, \documentclass[border=2pt]{standalone} \usepackage{tikz} \usetikzlibrary{matrix,positioning,calc} \usetikzlibrary{decorations.pathmorphing,arrows.meta,backgrounds,hobby} \...
1
vote
2answers
560 views

Plotting elements of a sequence on number line

i plotted the number line which includes (0,1) interval \begin{tikzpicture} \begin{axis}[ axis x line=middle, axis y line=none, height=50pt, width=\...
12
votes
2answers
205 views

TikZ: strange behaviour of cycle / coordinate / pic name in TikZ pics

In a TikZ pic, the combination of -- cycle, \coordinates, and the name key (or using parenthesis) only works sometimes. \documentclass{article} \usepackage{tikz} \begin{document} \tikzset{ ...
3
votes
1answer
309 views

How can I make scaling affect TikZ-pics within a tikzpicture?

I want to have "global scaling" in a TikZ picture, which also affects all pics defined within a tikzpicture environment. MWE: \documentclass[tikz, border=2mm]{standalone} \begin{document} \begin{...
2
votes
2answers
392 views

Adding symbols wherever I want in a commutative diagram

So far I have: \documentclass{article} \usepackage{tikz-cd} \usepackage{stmaryrd} \usetikzlibrary{arrows} % \begin{document} \begin{center} \begin{tikzcd}[column sep=large] {\begin{tikzpicture}\draw[...
1
vote
1answer
957 views

Package Pgf error: No shape named lds1lds1L1 is known

I want to design a hidden Markov model using LaTeX. I write the below code, but I have a problem in drawing paths correctly. I encountered the error Package Pgf error: No shape named lds1lds1L1 is ...
3
votes
1answer
396 views

TikZ pics with transform canvas not working (bug?)

I'm making a beamer template for the laboratory I work on. Since I couldn't find an SVG or PDF version of the logo I decided to draw it with tikz (I drew over the original PNG that's why the code is ...
3
votes
1answer
86 views

How to format text partially over image?

I have a tall image that I'd like to display along the right hand side of a page, but have text flow along the left side. The image is obviously rectangular in dimensions, but has a large transparent ...
4
votes
1answer
381 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/flipped/shifted. The brick pic ...
2
votes
1answer
97 views

Applying transforms to tikz pics defined with named nodes

I have a tikz pic that I wish to rotate and move around. If I define the pic with number coordinates, this works fine. If I define the pic with named coordinates (handy reference points I use for many ...
3
votes
1answer
241 views

Why relative positioning of pic change position of one pic element?

What is in design of my pic images wrong that its relative positioning change the position of (only) one internal node: MWE: \documentclass[tikz, border=3mm, many]{standalone} \usetikzlibrary{arrows....
6
votes
1answer
114 views

TikZ: Bug (?) with `.pic`: misalignement of nodes

I am using .pic to use a same picture several times. I noticed a difference of behavior between the same code inside a .pic or outside. In the example below, one can notice that within a .pic, the ...
1
vote
2answers
1k views

Tikz pic angle around circle

I am trying do draw an angle around an existing circle. For example, I can draw 10 degree angle: % Drawing circle \draw (0,0) circle [radius=1]; % Drawing 10 degree angle sides \foreach ...
6
votes
1answer
2k views

Various questions on the pic command from the Tikz angles library

I have a few questions regarding the pic command from the tikz.angles library that I am trying to experiment (the documentation in the Tikz-pgf manual remain very obscur to me). So here is one bit of ...
1
vote
2answers
245 views

To draw a graph like this, what code do I need?

\documentclass{article} \usepackage{tikz} \usetikzlibrary{calc} \usetikzlibrary{intersections} \begin{document} \begin{tikzpicture}[scale=5] \coordinate[label=above left:$A$] (A) at (95:1);...
1
vote
1answer
309 views

TikZ/PGF key filters : overriding color

I'm trying to override the color key within a pic but not within the enclosing scope (That is the path/draw/fill instruction). My objective is to be able to set the colour for a path and have this ...
4
votes
2answers
406 views

TikZ: clip with Pic?

Title explains it all really, I want to clip a picture using an exiting .pic that I have already defined, as I plan on using this clip shape many times over. \documentclass[border=5pt]{standalone} \...
0
votes
1answer
147 views

Documenting Pics

I have a few packages that provide some TikZ based pics. Originally I've written these using the dtxdoc class file but have started switching over to l3doc files. When I use the newmacro ...
1
vote
1answer
112 views

tikzpicture only shows on the first page no matter how many times repeated?

\documentclass{amsart} \usepackage{graphicx} \usepackage{lipsum} \usepackage{tikz} \begin{document} \title{Title 1} \maketitle \begin{tikzpicture}[remember picture,overlay] \node[anchor=north ...
2
votes
1answer
447 views

How to place tikz pic text inside angle?

I am wanting to position the text '0.78' within my angle rather than on the outer perimeter of it. Also, I am wanting to see the line that is covered by the yellow fill. This is my code so far, where ...