# Tag Info

18

Next time, please show us what you have so far, even if that is only a beginning. It makes it much easier to help and avoids people having to start setting up things from scratch. This answer contains 2 different solutions. The second (under EDIT below) is a modified version of the first which more closely matches the image in the question. Here's a ...

13

This might give you a starting point. \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{arrows.meta,shapes.multipart} \begin{document} \begin{tikzpicture}[ thick,>={Triangle[]}, circ/.style = {draw,circle,minimum size=5ex}, rect/.style = {draw,rectangle,minimum size=5ex}, splt/.style = {draw,rectangle split,rectangle split ...

8

Here's an outline solution, I leave it to you to complete it. \documentclass{article} \usepackage{tikz} \usetikzlibrary{calc, positioning,fit} \begin{document} \newcommand{\bloc}[2]{ \begin{scope}[shift={#1}] \begin{scope}[every node/.style={circle, draw, minimum size=2em}] \node[circle, draw] (#2-c1){}; \node[below left=1em of #2-c1](#2-c2){}; ...

7

Here's an alternative which wraps the contents of each of the nodes within the matrix in the variable-width \pbox defined by the pbox package using the execute at begin cell option. You could selectively apply the \pbox to the offending material, but this approach allows the syntax of the question to be used. The \linewidth is the maximum width for the node. ...

6

There are a couple of lightly documented TikZ features that are useful here: When using coordinate calculations to project one coordinate onto the line between two others, an angle can be added to rotate the new coordinate around the coordinate which is projected. That is, ($(A)!(B)!(C)$) projects (C) onto the line between (A) and (B), and ...

6

Here's a solution using the fit library. I defined a command that automates this, but like this will only work for "back" paths in left-to-right diagrams. Depicted here are three variants: going above going below going above, but with more obstacles Code \documentclass[border=2mm]{standalone} \usepackage{circuitikz} \usetikzlibrary{fit} ...

6

Simpler than use of \pgfmathparse is: \documentclass[border=0mm,tikz]{standalone} \usetikzlibrary{%backgrounds,calc,fit, positioning, %shapes.multipart } \begin{document} \begin{tikzpicture}[node distance= 2mm] \node (poste1) {poste1}; \foreach \x [count=\xx from 2] in {1,2,...,5} { \node[right=of poste\x] ...

6

Quoting from pgfplots.pdf: \addplot3 has a way to decide whether a line visualization or a mesh visualization has to be done. One has to search a little bit to find out how pgfplots does it in the case of a table input. To specify a surface, you have to tell \addplot3 which points are next to each other. The points are assumed to be in a matrix ...

6

First, you can stack two lines of text onto a loop's label in a few ways. If you have package amsmath loaded, you can write node {$\substack{line 1\\line 2}$}, which typesets them both smaller. If you want your label to be the same size as normal text, use node {$\begin{matrix} line 1 \\ line 2 \end{matrix}$}. To get node q_5 farther to the right, you can ...

5

Your question is one among set of "do-it-for-me" ... Edit: anyway, @AboAmmar was faster few seconds with the almost the same solution. So In dilema what to do, I fors erase my answer, then activate, erase and on the end, decide doue to small dei+ferences activate it Above picture is drawn by: \documentclass[border=3mm, tikz, ...

5

If you don't like using absolute coordinates, why not go all the way? I defined \minsep as a dimen so than one could use 2\minsep etc. \documentclass[border=2mm]{standalone} \usepackage{circuitikz} \usetikzlibrary{calc} \newlength{\minsep}% minimum separation \minsep=2mm \begin{document} \begin{circuitikz} \draw node[european and port] ...

5

Space which you observe is consequence of inner separation of node contens from its border. If you add to nodes option `inner xsep=0pt, this space will disappear: \documentclass{article} \usepackage{amsmath} \usepackage{tikz} \newcommand{\MyTikzMarkNode}[2]{\tikz[remember picture,baseline]\node[anchor=base, inner xsep=0pt% by this ...

5

You can use a simple evaluate= as this: \documentclass{standalone} \usepackage{tikz} \usetikzlibrary{positioning,shapes.multipart, fit,backgrounds,calc} \begin{document} \begin{tikzpicture} \node(poste1){poste1}; \foreach \x [evaluate=\x as \y using int(\x-1)] in {2,...,6}{% \node[right=of poste\y](poste\x){poste\x}; } \end{tikzpicture} \end{document} ...

5

Updated Answer Inspired by "Z-level" in TikZ \pgfdeclarelayer{front} \pgfdeclarelayer{back} \pgfsetlayers{back,main,front} \tikzset{% http://tex.stackexchange.com/questions/20425/z-level-in-tikz on layer/.code={\pgfonlayer{#1}\tikzset{every picture}\begingroup\aftergroup\endpgfonlayer\aftergroup\endgroup}, also in front/.style 2 ...

5

The allow upside down key sets \ifpgfallowupsidedownattime which is used in the basic layer transformations so it is difficult to influence this behaviour without some fairly major hacking. So it is probably best to set the node anchor manually conditionally using the angle of the line, which is quite easy to get in this case: ...

4

This is not a completely automatic solution like the one proposed in Tikz foreach inside matrix but node contents and nodes in empty cells options can help to provide a semiautomatic solution. \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{matrix} \begin{document} \begin{tikzpicture} \matrix (m) [draw, matrix of nodes, nodes in empty cells, ...

4

I would draw it three times since the shapes are nontrivial \begin{tikzpicture} \foreach\y/\x in{0/gray,.4/white,0.5/blue}{\node[shift={(\y pt,\y pt)},text=\x] {Effect};} \end{tikzpicture}

4

The bend options can take a value that controls how bent they are. This way you can manually avoid overlapping. In this case you can make the edges pointing to (0) go below the states and to avoid clash with the loops they can be bent at a 60 degrees angle with bend left=60. \documentclass[a4paper,twoside,11pt]{article} \usepackage{tikz} ...

4

A path is not a plot and the options which apply to one do not necessarily apply to the other. You need to create nodes or coordinates and/or labels or use edge and labels or.... There are many ways. However, you can do all this as part of the path specification with \draw. I've also moved very thick to an option for the picture to avoid repeating it. For ...

3

Something like this? \documentclass[border=3mm, tikz, preview ]{standalone} \usetikzlibrary{decorations.markings,decorations.pathmorphing} \begin{document} \begin{tikzpicture} \begin{scope}[decoration={markings, mark=at position 0.25 with {\arrow[blue,very thick]{>}}, ...

3

Your picture includes two different coordinates named B in different places. If you comment out the second definition, the triangle looks OK as far as I can tell: \documentclass[border=10pt,tikz]{standalone} \usetikzlibrary{calc} \begin{document} \begin{tikzpicture} %The vertices A, B, and C for a right triangle are located. \coordinate (A) at (0,0); ...

3

I don't know how to properly use \pgfmathdeclarefunction, but for me the following works: \tikzset{declare function={bellshape(\x,\mu,\sigma)=exp(-(\x-\mu)^2/(2*\sigma^2));}} \tikzset{declare function={normal(\x,\mu,\sigma)=1/(2.5066283*\sigma)*bellshape(\x,\mu,\sigma);}} \tikzset{declare function={gamma(\z)= (2.506628274631*sqrt(1/\z) + ...

3

Next time, please show us what you've tried as it is much easier to help that way. I have no idea what you are stuck on so it is hard to be very helpful, and I have no idea what your general setup is, which might make my solution useless to you. I used loops because I don't like typing repetitive stuff. If you don't mind, you can avoid them. The commented ...

3

Although the answer of cfr is nice, short but a bit complex to understand, I wrote an answer which is probably easier to understand at the beginning, regarding your comment on the answer. \documentclass[tikz, border=2pt]{standalone} \usepackage{siunitx} \begin{document} \begin{tikzpicture} % set up coordinates for an easy use \coordinate (a) at (0,0); ...

3

For overlapping lines, I would recommend using different styles such as dotted or dashed: Note: As this is a graph you really should consider using pgfplots instead of straight tikz. Code: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[ultra thick] % Axis and coordinates \coordinate (y) at (0,5); ...

3

Edit: Well, I need three iterations of my answer to figured out, what is your problem ... Now I only reedit ma third solution and erase steps to it. Desired form is obtained with: selecting appropriate sibling and level distances in overlapping nodes I wrote content only in those of them, which are closer to beginning of picture code, the second ones I ...

3

I was surprised that no one used the "bend" option. Here is the code: \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{tikz} \begin{document} \begin{tikzpicture} \coordinate (O) at (0,0,0); \coordinate (A) at (3,0,0); \draw[] (O)--(A); \draw[color=red] (O) to [bend left=10] (A); \draw[color=red] (O) to [bend right=10] (A); ...

3

While someone provides a only-beamer-solution, you could consider to use tcolorbox and its easily customizable boxes. \documentclass{beamer} \usepackage[most]{tcolorbox} \setbeamertemplate{blocks}[rounded][shadow=true] % use rounded blocks with standard beamer shadow \begin{document} \begin{frame}{Example frame} \begin{block}{Block with shadow} I, ...

2

A possible solution is: \documentclass[border=3mm,tikz,]{standalone} \usetikzlibrary{arrows,automata, chains, positioning, } \begin{document} \begin{tikzpicture}[ > = stealth', shorten > = 1pt, node distance = 13mm and 0mm,% deleted "on grid" auto,% added ...

2

\documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \shadedraw[shading=radial, line width=3mm, color=blue, outer color=red, inner color=yellow] (0,0) circle (4); \end{tikzpicture} \end{document}

Only top voted, non community-wiki answers of a minimum length are eligible