# Tag Info

## Hot answers tagged nodes

7

Since the locations are well-defined, you can get away with path picture of a node. \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}[corner stone/.style={draw, path picture={ \foreach \x/\xi in {north/-1,south/1}{ \foreach \y/\yi in {west/45,east/135}{ \fill (path picture bounding box.\x\space\y) rectangle ...

6

Something like this? If I'm not wrong, it's difficult to insert nodes over a path defined with plot option which is what you used to draw the final lines. The solution consists in drawing the line with plot and use another command to place the label over it. In following code there are some other changes respect your original code. The first one is ...

4

One possibility \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes.geometric, arrows} \begin{document} \tikzstyle{process} = [rectangle, text centered, draw=black, fill=orange!30] \tikzstyle{arrow} = [thick,->,>=stealth] \begin{tikzpicture}[node distance=1cm] \node (A) [process] {A}; \node (B) ...

3

I don't know why you refuse to post compilable code, but whatever. Anyway, for something like that, I'd use fit to draw the boundaries around 2+ nodes. And I'd use a chain or the TikZ graphs stuff for the graph itself. For example, with a simple chain (no real need for a graph here): \documentclass[tikz,border=10pt,multi]{standalone} ...

3

Here's a version which uses append after command in the definition of blackcorner to draw the 4 corners. The size can be configured using size=<dimension> in an optional argument to blackcorner which may also include other options for the corner nodes, if desired. Despite the name, one of the examples below shows how to create blue blackcorners. To ...

3

You can add a \pscustom command: \documentclass[x11names]{standalone} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{ebgaramond} \usepackage{array} \usepackage{pstricks-add} \usepackage{auto-pst-pdf} \psset{unit = 2,dotsize = 2.5pt} \begin{document} \begin{pspicture}(-1,-1)(2,2) \psmatrix[rowsep=3cm,colsep=3cm,mnode=circle] [name=A]A ...

2

To draw the coloured square behind the plot, simply place the \fill before the \addplot. Usually stuff is drawn in the order they're added to the code, so by adding the \fill first it ends up on the bottom. To add the box with the text you can use something like this: \draw[->,shorten >=1mm,shorten <=1mm] (rel axis cs:0.5,0.5) ...

2

Like this? \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{patterns,shapes.symbols,positioning} \usepackage{listings} \tikzset{data/.style={draw, tape, tape bend top=none}} \begin{document} \begin{tikzpicture}[scale=0.3, every node/.style={scale=0.78}] \node[data, scale=0.7] (bb3r) { \begin{lstlisting}[basicstyle=\ttfamily\scriptsize] Foo: ...

2

You can still follow the relative positioning. I cleaned up the irrelevant parts a bit. \documentclass[tikz]{standalone} \tikzset{block large/.style={rectangle, draw, text width=8cm, inner xsep=0.25cm, rounded corners, text height=0.4cm, text depth=1.25cm, node contents=\mycontent{#1},name=#1 }, block medium/.style = {block ...

2

It is important to note that you are not only using TikZ, but also PGFPlots. As described in section 4.17.1 (Accessing Axis Coordinates in Graphical Elements) in the manual, there are different coordinate systems in PGFPlots: axis cs: the axis coordinate system rel axis cs: a relative coordinate system, where the complete axis vectors are normalized to 1 ...

2

Something like this? \documentclass{article} \usepackage{tikz} \usetikzlibrary{positioning, fit} \tikzset{ object1/.pic={ \node[circle,draw] (-A) {A}; \node[circle,draw, right=of -A] (-B) {B}; \node[circle,draw, above right=5mm and 1cm of -A] (-C) {C}; \draw[->] (-A)--(-C); \draw[->] (-C)--(-B); ...

2

The problem comes from text height and text depth defined in tikzpicture options. In this way, they apply to all nodes, and right hand text is a node, so its vertical size is defined by these values. If you doesn't use text height and text depth, all other nodes won't be aligned, so it's not convenient to suppress them. As I don't know how to forget ...

2

The rework of cfr's graphs solution with scope to place the two graphs side-by-side, originating from our discussion with Alan. \begin{tikzpicture} \graph [grow right, nodes={draw, circle}, /tikz/every label/.append style={label distance=5pt}] { a/"1" -> 1[label=above:$S_1$] <-> 2[label=below:(b) $x_1+x_1x_2+x_2x_3$] -> ...

1

It is a lot easier to show than explain. \documentclass[]{scrartcl} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage{tikz} \usetikzlibrary{positioning,arrows,arrows.meta,calc} \newsavebox{\tempbox} \begin{document} \tikzset{% pics/lightning/.style 2 args={code={% \draw[ arrows={-Stealth[scale=2]}] (#1) -- (\$(#1)!.4!(#2) + ...

1

\documentclass{article} \usepackage{pst-node} \begin{document} \begin{pspicture}(-1,-2)(4,3) \pnodes(0,0){A}(3,0){B} \psset{arcangle=30} \pscustom[fillstyle=solid,fillcolor=black!20,linestyle=none]{ \ncarc{A}{B}\ncarc{B}{A} } \pcarc(A)(B)\naput{4} \pcarc(B)(A)\naput{5} \cnodeput[fillstyle=solid,fillcolor=white](A){A}{A} ...

1

I would draw the arc-fill first (using \pscustom), and then overlay the two end circles, each having a white fill to remove the end-points of the arc-fill: \documentclass{article} \usepackage{pst-node} \begin{document} \begin{pspicture} \pnode(0,0){A}% Identify node A \pnode(3cm,0){B}% Identify node B \ncarc[arcangle=30]{A}{B}\naput{4}% Place arc ...

1

Actually since you're defining the text width of your box, you need to take care, that the inner sep adds to the size of the box. Therefore by defining the inner xsep and tweaking the size of your boxes results in: code: \documentclass[border=5mm]{standalone} \usepackage[latin1]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes, arrows, arrows.meta} ...

1

A PSTricks solution: \documentclass{article} \usepackage{multido} \usepackage{pstricks} \usepackage{expl3} \ExplSyntaxOn \cs_new_eq:NN \calc \fp_eval:n \ExplSyntaxOff % parameters \def\width{4} \def\height{3} \def\radius{0.3} \def\distance{1} % \distance > 2*\radius \begin{document} ...

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