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
21
votes
3answers
3k views

How to give a name to \pic

I read instruction how to use \pic in PGF 3.0.0 manual, but description how to give names to \pic are not clear to me and given example generate error: "No shape named EmmaEmma-left is known." ...
26
votes
2answers
3k views

Anchoring TiKZ pics

Is it possible to anchor a TiKZ-pic on an internal anchor? I know (more or less) how to use TiKZ pics and know that they are draw arround their origin. What I would like to be sure is that it's not ...
2
votes
2answers
729 views

Nested pics in TikZ 3.0

TiKz 3.0 introduce pics and I like them, but it seems that they are not as powerfull as I wish. For example I'm not able to use nested pics like this : \tikzset{ one/.pic = {\draw[pic actions] (0,...
3
votes
2answers
579 views

Multiple object instances represented by two slightly shifted rectangles

In a software diagram, I'd like to be able to represent multiple instances of an object by two rectangles with one of them slightly shifted. I recently learned about the pic style so I'm using it with ...
7
votes
1answer
778 views

Anchoring complex tikz pic

In my illustration I need a sketch of clock. For it I use pic capability of TikZ. It works fine with quit annoying exception: positioning of clocks in picture. If I put a clock at some absolute ...
1
vote
2answers
189 views

Behavior of coordinates when using TikZ

I am trying to position node(2) in a page in coordinates related to the page (origin at upper left corner of the body of the page). My code is: \documentclass[border=10pt,a4paper]{memoir} \usepackage[...
12
votes
1answer
249 views

In tikz, why does a pic with a tree get distorted upon positioning with e.g. `right=of`

I'm trying to connect with edges tikz pics. I thought of using (sub)graphs like subgraph I_n and specifying the nodes with the V key, but I get an error: Undefined control sequence. \tikz@lib@graph@...
7
votes
1answer
185 views

How to give a name to \pic (part II)

When I was looking for the solutions of How to give a name to \pic, I discovored that it looks like that the problem is only with the code of \tikztostart in the to path and not with the \tikztotarget....
8
votes
1answer
511 views

Problems combining clip, layer and pic when multiple instances are included in the same tikzpicture

I'm having trouble figuring out how I am supposed to combine (or if I am supposed not to combine) pics, clipping and layering when more than one instance of a pic is included in a single tikzpicture ...
6
votes
1answer
10k 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$}; ...
32
votes
3answers
3k views

How to get rid of the almost invisible faint lines in the Olympic rings?

I want to draw Olympic rings and used the code from here, which is, % Olympic rings % Author: Paul Gaborit \documentclass[a4paper]{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \...
6
votes
1answer
3k 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 ...
5
votes
1answer
739 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 ...
4
votes
2answers
1k views

Generating adjacency matrices from isomorphic graphs

Here are some isomorphic graphs and their corresponding adjacency matrices. I can draw the graphs with tikz. But I'm not sure the best way to draw the matrices. Is it possible to generate one from ...
10
votes
1answer
2k views

TikZ Pics with optional/default parameters

I am trying to set up a small TikZ library or package with pics I can reuse. Thus, I create a file called "tikzlibraryBES.code.tex" with the following content: \tikzset{ % House pics/house/....
3
votes
2answers
397 views

Parametric Pics : Pic Actions at Infinity

This question tries to expand upon the another both of which aim at providing a "Best" practices for tikz-pics or atleast a couple of how to examples clarifying some of the more advanced trickery that ...
3
votes
2answers
438 views

How to make properly macro with the use of pic?

I'd like do make a picture that consists of few blocks. One of these blocks I called \elementsymbol (in MWE below) - it consists of an arrow surrounded by a circle. I have the problem with scaling of ...
1
vote
2answers
219 views

Drawing a block diagram in Latex

I am a new user to Latex. Recently I have decided to use latex for preparing my project instead of using MS word. Can any one please help me to draw this block diagram for my project. Thanks in ...
-1
votes
1answer
129 views

Drawing a mountain look figure in latex

I am not sure where I can start from and is it easy to draw a figure below using latex?
6
votes
1answer
478 views

A nice example with `name prefix ..`

TiKZ pics include a new key called name prefix ... TiKZ documentation defines it with /tikz/name prefix .. This key is available only inside the code of a pic. There, it (locally) ...
4
votes
1answer
394 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{...
3
votes
4answers
323 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
192 views

How to use a \pic in a node's text area {}?

How can I achieve that the \pic "lightning" will appear in the node's text area? I cannot use it there, so I have commented it out. I know or think it's a completely different "environment" (a text ...
3
votes
2answers
2k views

Positioning '\pic' in tikz

With the code \documentclass[tikz,convert={size=640}]{standalone} \usetikzlibrary{positioning} \usetikzlibrary{calc} \usetikzlibrary{quotes} \begin{document} \begin{tikzpicture}[ rect/.style={...
2
votes
2answers
162 views

Printing an element of a non-numeric array as the node label

I want to retrieve a member of a non-numeric array passed to a TikZ pic as an argument, to use it as a node label. \foreach easily does it while iterating over the array, but I cannot do it for the ...
2
votes
2answers
410 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[...
2
votes
1answer
171 views

Parametric Pics : Sans infinity

Previously I have asked about passing options to pics to manipulate the way in which they are drawn. With this one may create pics with optional components and user controlled dimensions. I haven't ...
2
votes
1answer
116 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 ...
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
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 ...
1
vote
1answer
109 views

Using tikz to generate some figures

Is it possible to use tikz to make the following figure: \documentclass{article} \usepackage{tikz} \begin{document} % Radius of regular polygons \newdimen\R \R=5cm \begin{tikzpicture} \draw [...
1
vote
0answers
100 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....
1
vote
3answers
72 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
2answers
738 views

How can I draw this figure about Hidden Markov Model?

How can I draw this figure about Hidden Markov Model?
0
votes
0answers
35 views

How to mirror and position the analog clock dials

I am trying the create analog clock dial with roman or standard numbers on display and at the same time create another one but the mirror image of it. I managed to do that but for some reason a third ...
0
votes
1answer
137 views

Is it possible to make such an image with Tikz? How?

I'm wondering what's the best way to render this image width the dashed line and with angles between normal lines and dashed lines. And also Is there a way to quickly rotate the tikz resulting image ...
0
votes
1answer
164 views

How can I put picture in a table!

I can put a picture in a table (cheer!), but I want to put a picture with a caption in my table and it's caption will disappear. My table includes both a picture and a tikz. how can I do it? This is ...
0
votes
2answers
153 views

Setting background color in flowchart

I've a flowchart created in the following manner \tikzstyle{steps} = [rectangle, rounded corners, minimum width=3cm, minimum height=1cm, text centered, text width=3cm, draw=black, fill=gray!50] \...