TikZ: Alligning two Tikz pictures and align parentheses to nodes












7















I tried to draw two graphs with Tikz. How can I align them vertically to each other? I want the knots to form the center, such that all six nodes align vertically. Furthermore I want to align the curly brackets using the nodes. But that does not work either. I want the parentheses to start at the beginning of the first node and end at the end of the last node. How can I do that?



This is what I get:



enter image description here



This is what I would like to have:



enter image description here



This code produces the picture above:



documentclass[a4paper]{article}
usepackage{tikz}

begin{document}

usetikzlibrary{chains, positioning, decorations.pathreplacing}

defilsize{3}
defnodesize{6mm}

tikzset{>=latex}

begin{figure}[h]
centering

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$v$};
end{tikzpicture}

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$u_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
%(Out-1) -- (Out-3) node[black,midway,xshift] {$f(x)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$mathcal{K}=U*V*W$};
end{tikzpicture}
end{figure}

end{document}









share|improve this question

























  • why you not merge both images in one tikzpicture?

    – Zarko
    Dec 14 '18 at 9:13











  • Could you perhaps add a sketch that illustrates what you want?

    – marmot
    Dec 14 '18 at 9:25











  • @Zarko I tried that, but it made things worse. I am not an expert.

    – Samuel
    Dec 14 '18 at 9:28











  • @marmot I added a sketch.

    – Samuel
    Dec 14 '18 at 9:35











  • @Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

    – Samuel
    Dec 14 '18 at 9:41
















7















I tried to draw two graphs with Tikz. How can I align them vertically to each other? I want the knots to form the center, such that all six nodes align vertically. Furthermore I want to align the curly brackets using the nodes. But that does not work either. I want the parentheses to start at the beginning of the first node and end at the end of the last node. How can I do that?



This is what I get:



enter image description here



This is what I would like to have:



enter image description here



This code produces the picture above:



documentclass[a4paper]{article}
usepackage{tikz}

begin{document}

usetikzlibrary{chains, positioning, decorations.pathreplacing}

defilsize{3}
defnodesize{6mm}

tikzset{>=latex}

begin{figure}[h]
centering

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$v$};
end{tikzpicture}

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$u_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
%(Out-1) -- (Out-3) node[black,midway,xshift] {$f(x)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$mathcal{K}=U*V*W$};
end{tikzpicture}
end{figure}

end{document}









share|improve this question

























  • why you not merge both images in one tikzpicture?

    – Zarko
    Dec 14 '18 at 9:13











  • Could you perhaps add a sketch that illustrates what you want?

    – marmot
    Dec 14 '18 at 9:25











  • @Zarko I tried that, but it made things worse. I am not an expert.

    – Samuel
    Dec 14 '18 at 9:28











  • @marmot I added a sketch.

    – Samuel
    Dec 14 '18 at 9:35











  • @Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

    – Samuel
    Dec 14 '18 at 9:41














7












7








7


1






I tried to draw two graphs with Tikz. How can I align them vertically to each other? I want the knots to form the center, such that all six nodes align vertically. Furthermore I want to align the curly brackets using the nodes. But that does not work either. I want the parentheses to start at the beginning of the first node and end at the end of the last node. How can I do that?



This is what I get:



enter image description here



This is what I would like to have:



enter image description here



This code produces the picture above:



documentclass[a4paper]{article}
usepackage{tikz}

begin{document}

usetikzlibrary{chains, positioning, decorations.pathreplacing}

defilsize{3}
defnodesize{6mm}

tikzset{>=latex}

begin{figure}[h]
centering

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$v$};
end{tikzpicture}

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$u_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
%(Out-1) -- (Out-3) node[black,midway,xshift] {$f(x)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$mathcal{K}=U*V*W$};
end{tikzpicture}
end{figure}

end{document}









share|improve this question
















I tried to draw two graphs with Tikz. How can I align them vertically to each other? I want the knots to form the center, such that all six nodes align vertically. Furthermore I want to align the curly brackets using the nodes. But that does not work either. I want the parentheses to start at the beginning of the first node and end at the end of the last node. How can I do that?



This is what I get:



enter image description here



This is what I would like to have:



enter image description here



This code produces the picture above:



documentclass[a4paper]{article}
usepackage{tikz}

begin{document}

usetikzlibrary{chains, positioning, decorations.pathreplacing}

defilsize{3}
defnodesize{6mm}

tikzset{>=latex}

begin{figure}[h]
centering

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=10mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$v$};
end{tikzpicture}

begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
tikzstyle{every pin edge}=[<-,shorten <=1pt]
tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
tikzstyle{input node}=[node, fill=black!0]

% Nodes
foreach name / y in {1,...,ilsize}
node[input node] (In-name) at (0.0cm,-y cm) {$u_{y}$};

% Labels %
draw[-, decoration={brace,raise=0pt, amplitude=3mm}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,right=3mm] {$g(v)$};
%(Out-1) -- (Out-3) node[black,midway,xshift] {$f(x)$};
draw[-, decoration={brace, raise=0pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
(In-1) -- (In-3) node[black,midway,left=3mm] {$mathcal{K}=U*V*W$};
end{tikzpicture}
end{figure}

end{document}






tikz-pgf tikz-node






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 14 '18 at 9:34







Samuel

















asked Dec 14 '18 at 9:06









SamuelSamuel

537211




537211













  • why you not merge both images in one tikzpicture?

    – Zarko
    Dec 14 '18 at 9:13











  • Could you perhaps add a sketch that illustrates what you want?

    – marmot
    Dec 14 '18 at 9:25











  • @Zarko I tried that, but it made things worse. I am not an expert.

    – Samuel
    Dec 14 '18 at 9:28











  • @marmot I added a sketch.

    – Samuel
    Dec 14 '18 at 9:35











  • @Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

    – Samuel
    Dec 14 '18 at 9:41



















  • why you not merge both images in one tikzpicture?

    – Zarko
    Dec 14 '18 at 9:13











  • Could you perhaps add a sketch that illustrates what you want?

    – marmot
    Dec 14 '18 at 9:25











  • @Zarko I tried that, but it made things worse. I am not an expert.

    – Samuel
    Dec 14 '18 at 9:28











  • @marmot I added a sketch.

    – Samuel
    Dec 14 '18 at 9:35











  • @Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

    – Samuel
    Dec 14 '18 at 9:41

















why you not merge both images in one tikzpicture?

– Zarko
Dec 14 '18 at 9:13





why you not merge both images in one tikzpicture?

– Zarko
Dec 14 '18 at 9:13













Could you perhaps add a sketch that illustrates what you want?

– marmot
Dec 14 '18 at 9:25





Could you perhaps add a sketch that illustrates what you want?

– marmot
Dec 14 '18 at 9:25













@Zarko I tried that, but it made things worse. I am not an expert.

– Samuel
Dec 14 '18 at 9:28





@Zarko I tried that, but it made things worse. I am not an expert.

– Samuel
Dec 14 '18 at 9:28













@marmot I added a sketch.

– Samuel
Dec 14 '18 at 9:35





@marmot I added a sketch.

– Samuel
Dec 14 '18 at 9:35













@Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

– Samuel
Dec 14 '18 at 9:41





@Zarko I added a sketch to show how I want to align the curly brackets using the nodes.

– Samuel
Dec 14 '18 at 9:41










5 Answers
5






active

oldest

votes


















9














as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions:



edit:
position of braces are corrected acoording to new explanation in question



documentclass[a4paper]{article}
usepackage{tikz}
usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble

begin{document}
begin{figure}[htb]
centering
defilsize{3}
defnodesize{6mm}
begin{tikzpicture}[
B/.style = {% common "universal" style for all braces
decoration={brace, amplitude=3mm,#1},% #1 is for mirroring, when necessary
decorate},
B/.default = , % default braces are not mirrored
circ/.style = {% style name, which is not used by tikz
circle, draw, minimum size=nodesize, inner sep=0pt},
]
% Nodes
foreach name / y in {1,...,ilsize}
node[circ] (In-name) at (0,-y) {$w_{y}$};
% Labels
draw[B]
(In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
draw[B=mirror]
(In-1.north -| In-1.west) -- node[left=3mm] {$v$} (In-3.south -| In-3.west) ;

begin{scope}[yshift=-31mm]
% Nodes
foreach name / y in {1,...,ilsize}
node[circ] (In-name) at (0,-y) {$w_{y}$};
% Labels %
draw[B] % draw brace
(In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
draw[B=mirror] % draw mirrored brace
(In-1.north -| In-1.west) -- node[left=3mm] {$mathcal{K}=U*V*W$} (In-3.south -| In-3.west) ;
end{scope}
end{tikzpicture}
end{figure}
end{document}


in above mwe are:




  • used recent syntax for defining nodes and other elements style (tikzstyle is obsolete, you should use tizset or as is used in mwe as options of tikzpicture)

  • libraries should be loaded in document preamble

  • never use names as node , which is already used as one of key element of the tikz

  • it is sensible to define the common style for braces


result is:



enter image description here






share|improve this answer


























  • Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

    – Samuel
    Dec 14 '18 at 17:39











  • @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

    – Zarko
    Dec 14 '18 at 17:45



















6














You can draw this scheme with two matrix of math nodes delimited by braces and two labels for left and right text:



documentclass[tikz,border=2mm]{standalone} 
usetikzlibrary{positioning, matrix}

begin{document}
begin{tikzpicture}[%
ball/.style={circle, minimum size=6mm, inner sep=0pt, draw},
vector/.style={%
matrix of math nodes, inner sep=0pt,
row sep=2pt, nodes={ball, anchor=center},
left delimiter={, right delimiter =}}
]

matrix[vector,
label={[label distance=3mm]left:{$v$}},
label={[label distance=3mm]right:{$g(v)$}}] (v1)
{w_1\w_2\w_3\};

matrix[vector,
label={[label distance=3mm]left:{$mathcal{K}=U*V*W$}},
label={[label distance=3mm]right:{$g(v)$}}, below=3mm of v1] (v2)
{u_1\u_2\u_3\};
end{tikzpicture}
end{document}


enter image description here






share|improve this answer































    4














    Thanks for adding a sketch. I take that you want to draw the braces with TikZ methods. Other than that, what you have looks like an equation, where you can use align to aliggn stuff. I left it in a figure environment.



    documentclass[a4paper]{article}
    usepackage{tikz}
    usepackage{amsmath}
    usetikzlibrary{positioning, decorations.pathreplacing}
    tikzset{pics/.cd,
    multidot/.style n args={2}{code={
    foreach X in {1,...,#1}
    {
    node[circle,draw,minimum size=nodesize] (aux-X) at (0,{(#1/2+1/2-X)*9mm}){$#2_{X}$};}
    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-1.north east) -- (aux-#1.south
    east);
    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-#1.south west) -- (aux-1.north
    west);
    }}}
    begin{document}


    defnodesize{7mm}


    begin{figure}[h]
    begin{align*}
    v&,vcenter{hbox{tikz{pic{multidot={3}{w}}}}},g(v)\
    mathcal{K}=U*V*W&,vcenter{hbox{tikz{pic{multidot={3}{u}}}}},g(v)
    end{align*}
    end{figure}

    end{document}


    enter image description here






    share|improve this answer































      3














      Edit: Some corrections after the clarification of the OP.



      documentclass{article}
      usepackage{tikz}

      usetikzlibrary{chains, positioning, decorations.pathreplacing}
      defilsize{3}
      defnodesize{6mm}
      tikzset{>=latex}

      begin{document}
      begin{figure}[h]
      centering
      begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
      tikzstyle{every pin edge}=[<-,shorten <=1pt]
      tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
      tikzstyle{input node}=[node, fill=black!0]

      % Nodes
      foreach name / y in {1,...,ilsize}
      node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

      % Labels %
      draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
      (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};
      draw[-, decoration={brace,raise=6pt,amplitude=3mm, mirror}, decorate]
      (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$v$};

      tikzstyle{every pin edge}=[<-,shorten <=1pt]
      tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
      tikzstyle{input node}=[node, fill=black!0]

      % Nodes
      foreach name / y in {1,...,ilsize}
      pgfmathparse{y+3}
      node[input node] (In-name) at (0.0cm,-pgfmathresult cm) {$u_{y}$};

      % Labels %
      draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
      (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};

      draw[-, decoration={brace, raise=6pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
      (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$mathcal{K}=U*V*W$};
      end{tikzpicture}
      end{figure}
      end{document}


      enter image description here






      share|improve this answer


























      • Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

        – Samuel
        Dec 14 '18 at 9:37











      • @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

        – Sito
        Dec 14 '18 at 11:43



















      1














      I couldn't resist doing it in two lines of code:



      documentclass[a4paper]{article}
      usepackage{tikz,amsmath}
      begin{document}

      newcommand{wcir}[1]{tikz{node[draw,circle,minimum size=6mm,inner sep=0]{$#1$};}}

      begin{align*}
      v &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v) \
      mathcal{K} = U*V*W &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v)
      end{align*}

      end{document}



      enter image description here







      share|improve this answer

























        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "85"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464809%2ftikz-alligning-two-tikz-pictures-and-align-parentheses-to-nodes%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        9














        as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions:



        edit:
        position of braces are corrected acoording to new explanation in question



        documentclass[a4paper]{article}
        usepackage{tikz}
        usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble

        begin{document}
        begin{figure}[htb]
        centering
        defilsize{3}
        defnodesize{6mm}
        begin{tikzpicture}[
        B/.style = {% common "universal" style for all braces
        decoration={brace, amplitude=3mm,#1},% #1 is for mirroring, when necessary
        decorate},
        B/.default = , % default braces are not mirrored
        circ/.style = {% style name, which is not used by tikz
        circle, draw, minimum size=nodesize, inner sep=0pt},
        ]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels
        draw[B]
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror]
        (In-1.north -| In-1.west) -- node[left=3mm] {$v$} (In-3.south -| In-3.west) ;

        begin{scope}[yshift=-31mm]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels %
        draw[B] % draw brace
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror] % draw mirrored brace
        (In-1.north -| In-1.west) -- node[left=3mm] {$mathcal{K}=U*V*W$} (In-3.south -| In-3.west) ;
        end{scope}
        end{tikzpicture}
        end{figure}
        end{document}


        in above mwe are:




        • used recent syntax for defining nodes and other elements style (tikzstyle is obsolete, you should use tizset or as is used in mwe as options of tikzpicture)

        • libraries should be loaded in document preamble

        • never use names as node , which is already used as one of key element of the tikz

        • it is sensible to define the common style for braces


        result is:



        enter image description here






        share|improve this answer


























        • Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

          – Samuel
          Dec 14 '18 at 17:39











        • @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

          – Zarko
          Dec 14 '18 at 17:45
















        9














        as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions:



        edit:
        position of braces are corrected acoording to new explanation in question



        documentclass[a4paper]{article}
        usepackage{tikz}
        usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble

        begin{document}
        begin{figure}[htb]
        centering
        defilsize{3}
        defnodesize{6mm}
        begin{tikzpicture}[
        B/.style = {% common "universal" style for all braces
        decoration={brace, amplitude=3mm,#1},% #1 is for mirroring, when necessary
        decorate},
        B/.default = , % default braces are not mirrored
        circ/.style = {% style name, which is not used by tikz
        circle, draw, minimum size=nodesize, inner sep=0pt},
        ]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels
        draw[B]
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror]
        (In-1.north -| In-1.west) -- node[left=3mm] {$v$} (In-3.south -| In-3.west) ;

        begin{scope}[yshift=-31mm]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels %
        draw[B] % draw brace
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror] % draw mirrored brace
        (In-1.north -| In-1.west) -- node[left=3mm] {$mathcal{K}=U*V*W$} (In-3.south -| In-3.west) ;
        end{scope}
        end{tikzpicture}
        end{figure}
        end{document}


        in above mwe are:




        • used recent syntax for defining nodes and other elements style (tikzstyle is obsolete, you should use tizset or as is used in mwe as options of tikzpicture)

        • libraries should be loaded in document preamble

        • never use names as node , which is already used as one of key element of the tikz

        • it is sensible to define the common style for braces


        result is:



        enter image description here






        share|improve this answer


























        • Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

          – Samuel
          Dec 14 '18 at 17:39











        • @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

          – Zarko
          Dec 14 '18 at 17:45














        9












        9








        9







        as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions:



        edit:
        position of braces are corrected acoording to new explanation in question



        documentclass[a4paper]{article}
        usepackage{tikz}
        usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble

        begin{document}
        begin{figure}[htb]
        centering
        defilsize{3}
        defnodesize{6mm}
        begin{tikzpicture}[
        B/.style = {% common "universal" style for all braces
        decoration={brace, amplitude=3mm,#1},% #1 is for mirroring, when necessary
        decorate},
        B/.default = , % default braces are not mirrored
        circ/.style = {% style name, which is not used by tikz
        circle, draw, minimum size=nodesize, inner sep=0pt},
        ]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels
        draw[B]
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror]
        (In-1.north -| In-1.west) -- node[left=3mm] {$v$} (In-3.south -| In-3.west) ;

        begin{scope}[yshift=-31mm]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels %
        draw[B] % draw brace
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror] % draw mirrored brace
        (In-1.north -| In-1.west) -- node[left=3mm] {$mathcal{K}=U*V*W$} (In-3.south -| In-3.west) ;
        end{scope}
        end{tikzpicture}
        end{figure}
        end{document}


        in above mwe are:




        • used recent syntax for defining nodes and other elements style (tikzstyle is obsolete, you should use tizset or as is used in mwe as options of tikzpicture)

        • libraries should be loaded in document preamble

        • never use names as node , which is already used as one of key element of the tikz

        • it is sensible to define the common style for braces


        result is:



        enter image description here






        share|improve this answer















        as i mentioned, merging bot tikzpictures in one enable better controlling their elements positions:



        edit:
        position of braces are corrected acoording to new explanation in question



        documentclass[a4paper]{article}
        usepackage{tikz}
        usetikzlibrary{decorations.pathreplacing} % tikz library should be here, in preamble

        begin{document}
        begin{figure}[htb]
        centering
        defilsize{3}
        defnodesize{6mm}
        begin{tikzpicture}[
        B/.style = {% common "universal" style for all braces
        decoration={brace, amplitude=3mm,#1},% #1 is for mirroring, when necessary
        decorate},
        B/.default = , % default braces are not mirrored
        circ/.style = {% style name, which is not used by tikz
        circle, draw, minimum size=nodesize, inner sep=0pt},
        ]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels
        draw[B]
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror]
        (In-1.north -| In-1.west) -- node[left=3mm] {$v$} (In-3.south -| In-3.west) ;

        begin{scope}[yshift=-31mm]
        % Nodes
        foreach name / y in {1,...,ilsize}
        node[circ] (In-name) at (0,-y) {$w_{y}$};
        % Labels %
        draw[B] % draw brace
        (In-1.north -| In-1.east) -- node[right=3mm] {$g(v)$} (In-3.south -| In-3.east);
        draw[B=mirror] % draw mirrored brace
        (In-1.north -| In-1.west) -- node[left=3mm] {$mathcal{K}=U*V*W$} (In-3.south -| In-3.west) ;
        end{scope}
        end{tikzpicture}
        end{figure}
        end{document}


        in above mwe are:




        • used recent syntax for defining nodes and other elements style (tikzstyle is obsolete, you should use tizset or as is used in mwe as options of tikzpicture)

        • libraries should be loaded in document preamble

        • never use names as node , which is already used as one of key element of the tikz

        • it is sensible to define the common style for braces


        result is:



        enter image description here







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Dec 14 '18 at 17:48

























        answered Dec 14 '18 at 9:33









        ZarkoZarko

        126k867164




        126k867164













        • Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

          – Samuel
          Dec 14 '18 at 17:39











        • @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

          – Zarko
          Dec 14 '18 at 17:45



















        • Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

          – Samuel
          Dec 14 '18 at 17:39











        • @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

          – Zarko
          Dec 14 '18 at 17:45

















        Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

        – Samuel
        Dec 14 '18 at 17:39





        Are your four remarks already considered in your example? Since I'm not an expert, I find it hard to see that for myself.

        – Samuel
        Dec 14 '18 at 17:39













        @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

        – Zarko
        Dec 14 '18 at 17:45





        @Samuel, yes. i have considered. compare your mwe and mine. you will observe difference. anyway, i will add comments to my code, which will emphasize those remarks (asap).

        – Zarko
        Dec 14 '18 at 17:45











        6














        You can draw this scheme with two matrix of math nodes delimited by braces and two labels for left and right text:



        documentclass[tikz,border=2mm]{standalone} 
        usetikzlibrary{positioning, matrix}

        begin{document}
        begin{tikzpicture}[%
        ball/.style={circle, minimum size=6mm, inner sep=0pt, draw},
        vector/.style={%
        matrix of math nodes, inner sep=0pt,
        row sep=2pt, nodes={ball, anchor=center},
        left delimiter={, right delimiter =}}
        ]

        matrix[vector,
        label={[label distance=3mm]left:{$v$}},
        label={[label distance=3mm]right:{$g(v)$}}] (v1)
        {w_1\w_2\w_3\};

        matrix[vector,
        label={[label distance=3mm]left:{$mathcal{K}=U*V*W$}},
        label={[label distance=3mm]right:{$g(v)$}}, below=3mm of v1] (v2)
        {u_1\u_2\u_3\};
        end{tikzpicture}
        end{document}


        enter image description here






        share|improve this answer




























          6














          You can draw this scheme with two matrix of math nodes delimited by braces and two labels for left and right text:



          documentclass[tikz,border=2mm]{standalone} 
          usetikzlibrary{positioning, matrix}

          begin{document}
          begin{tikzpicture}[%
          ball/.style={circle, minimum size=6mm, inner sep=0pt, draw},
          vector/.style={%
          matrix of math nodes, inner sep=0pt,
          row sep=2pt, nodes={ball, anchor=center},
          left delimiter={, right delimiter =}}
          ]

          matrix[vector,
          label={[label distance=3mm]left:{$v$}},
          label={[label distance=3mm]right:{$g(v)$}}] (v1)
          {w_1\w_2\w_3\};

          matrix[vector,
          label={[label distance=3mm]left:{$mathcal{K}=U*V*W$}},
          label={[label distance=3mm]right:{$g(v)$}}, below=3mm of v1] (v2)
          {u_1\u_2\u_3\};
          end{tikzpicture}
          end{document}


          enter image description here






          share|improve this answer


























            6












            6








            6







            You can draw this scheme with two matrix of math nodes delimited by braces and two labels for left and right text:



            documentclass[tikz,border=2mm]{standalone} 
            usetikzlibrary{positioning, matrix}

            begin{document}
            begin{tikzpicture}[%
            ball/.style={circle, minimum size=6mm, inner sep=0pt, draw},
            vector/.style={%
            matrix of math nodes, inner sep=0pt,
            row sep=2pt, nodes={ball, anchor=center},
            left delimiter={, right delimiter =}}
            ]

            matrix[vector,
            label={[label distance=3mm]left:{$v$}},
            label={[label distance=3mm]right:{$g(v)$}}] (v1)
            {w_1\w_2\w_3\};

            matrix[vector,
            label={[label distance=3mm]left:{$mathcal{K}=U*V*W$}},
            label={[label distance=3mm]right:{$g(v)$}}, below=3mm of v1] (v2)
            {u_1\u_2\u_3\};
            end{tikzpicture}
            end{document}


            enter image description here






            share|improve this answer













            You can draw this scheme with two matrix of math nodes delimited by braces and two labels for left and right text:



            documentclass[tikz,border=2mm]{standalone} 
            usetikzlibrary{positioning, matrix}

            begin{document}
            begin{tikzpicture}[%
            ball/.style={circle, minimum size=6mm, inner sep=0pt, draw},
            vector/.style={%
            matrix of math nodes, inner sep=0pt,
            row sep=2pt, nodes={ball, anchor=center},
            left delimiter={, right delimiter =}}
            ]

            matrix[vector,
            label={[label distance=3mm]left:{$v$}},
            label={[label distance=3mm]right:{$g(v)$}}] (v1)
            {w_1\w_2\w_3\};

            matrix[vector,
            label={[label distance=3mm]left:{$mathcal{K}=U*V*W$}},
            label={[label distance=3mm]right:{$g(v)$}}, below=3mm of v1] (v2)
            {u_1\u_2\u_3\};
            end{tikzpicture}
            end{document}


            enter image description here







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Dec 14 '18 at 10:53









            IgnasiIgnasi

            93.8k4169311




            93.8k4169311























                4














                Thanks for adding a sketch. I take that you want to draw the braces with TikZ methods. Other than that, what you have looks like an equation, where you can use align to aliggn stuff. I left it in a figure environment.



                documentclass[a4paper]{article}
                usepackage{tikz}
                usepackage{amsmath}
                usetikzlibrary{positioning, decorations.pathreplacing}
                tikzset{pics/.cd,
                multidot/.style n args={2}{code={
                foreach X in {1,...,#1}
                {
                node[circle,draw,minimum size=nodesize] (aux-X) at (0,{(#1/2+1/2-X)*9mm}){$#2_{X}$};}
                draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-1.north east) -- (aux-#1.south
                east);
                draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-#1.south west) -- (aux-1.north
                west);
                }}}
                begin{document}


                defnodesize{7mm}


                begin{figure}[h]
                begin{align*}
                v&,vcenter{hbox{tikz{pic{multidot={3}{w}}}}},g(v)\
                mathcal{K}=U*V*W&,vcenter{hbox{tikz{pic{multidot={3}{u}}}}},g(v)
                end{align*}
                end{figure}

                end{document}


                enter image description here






                share|improve this answer




























                  4














                  Thanks for adding a sketch. I take that you want to draw the braces with TikZ methods. Other than that, what you have looks like an equation, where you can use align to aliggn stuff. I left it in a figure environment.



                  documentclass[a4paper]{article}
                  usepackage{tikz}
                  usepackage{amsmath}
                  usetikzlibrary{positioning, decorations.pathreplacing}
                  tikzset{pics/.cd,
                  multidot/.style n args={2}{code={
                  foreach X in {1,...,#1}
                  {
                  node[circle,draw,minimum size=nodesize] (aux-X) at (0,{(#1/2+1/2-X)*9mm}){$#2_{X}$};}
                  draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-1.north east) -- (aux-#1.south
                  east);
                  draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-#1.south west) -- (aux-1.north
                  west);
                  }}}
                  begin{document}


                  defnodesize{7mm}


                  begin{figure}[h]
                  begin{align*}
                  v&,vcenter{hbox{tikz{pic{multidot={3}{w}}}}},g(v)\
                  mathcal{K}=U*V*W&,vcenter{hbox{tikz{pic{multidot={3}{u}}}}},g(v)
                  end{align*}
                  end{figure}

                  end{document}


                  enter image description here






                  share|improve this answer


























                    4












                    4








                    4







                    Thanks for adding a sketch. I take that you want to draw the braces with TikZ methods. Other than that, what you have looks like an equation, where you can use align to aliggn stuff. I left it in a figure environment.



                    documentclass[a4paper]{article}
                    usepackage{tikz}
                    usepackage{amsmath}
                    usetikzlibrary{positioning, decorations.pathreplacing}
                    tikzset{pics/.cd,
                    multidot/.style n args={2}{code={
                    foreach X in {1,...,#1}
                    {
                    node[circle,draw,minimum size=nodesize] (aux-X) at (0,{(#1/2+1/2-X)*9mm}){$#2_{X}$};}
                    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-1.north east) -- (aux-#1.south
                    east);
                    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-#1.south west) -- (aux-1.north
                    west);
                    }}}
                    begin{document}


                    defnodesize{7mm}


                    begin{figure}[h]
                    begin{align*}
                    v&,vcenter{hbox{tikz{pic{multidot={3}{w}}}}},g(v)\
                    mathcal{K}=U*V*W&,vcenter{hbox{tikz{pic{multidot={3}{u}}}}},g(v)
                    end{align*}
                    end{figure}

                    end{document}


                    enter image description here






                    share|improve this answer













                    Thanks for adding a sketch. I take that you want to draw the braces with TikZ methods. Other than that, what you have looks like an equation, where you can use align to aliggn stuff. I left it in a figure environment.



                    documentclass[a4paper]{article}
                    usepackage{tikz}
                    usepackage{amsmath}
                    usetikzlibrary{positioning, decorations.pathreplacing}
                    tikzset{pics/.cd,
                    multidot/.style n args={2}{code={
                    foreach X in {1,...,#1}
                    {
                    node[circle,draw,minimum size=nodesize] (aux-X) at (0,{(#1/2+1/2-X)*9mm}){$#2_{X}$};}
                    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-1.north east) -- (aux-#1.south
                    east);
                    draw[thick,decorate,decoration={brace,raise=5pt,amplitude=3mm}] (aux-#1.south west) -- (aux-1.north
                    west);
                    }}}
                    begin{document}


                    defnodesize{7mm}


                    begin{figure}[h]
                    begin{align*}
                    v&,vcenter{hbox{tikz{pic{multidot={3}{w}}}}},g(v)\
                    mathcal{K}=U*V*W&,vcenter{hbox{tikz{pic{multidot={3}{u}}}}},g(v)
                    end{align*}
                    end{figure}

                    end{document}


                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Dec 14 '18 at 10:04









                    marmotmarmot

                    105k4126241




                    105k4126241























                        3














                        Edit: Some corrections after the clarification of the OP.



                        documentclass{article}
                        usepackage{tikz}

                        usetikzlibrary{chains, positioning, decorations.pathreplacing}
                        defilsize{3}
                        defnodesize{6mm}
                        tikzset{>=latex}

                        begin{document}
                        begin{figure}[h]
                        centering
                        begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm, mirror}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$v$};

                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        pgfmathparse{y+3}
                        node[input node] (In-name) at (0.0cm,-pgfmathresult cm) {$u_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};

                        draw[-, decoration={brace, raise=6pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$mathcal{K}=U*V*W$};
                        end{tikzpicture}
                        end{figure}
                        end{document}


                        enter image description here






                        share|improve this answer


























                        • Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                          – Samuel
                          Dec 14 '18 at 9:37











                        • @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                          – Sito
                          Dec 14 '18 at 11:43
















                        3














                        Edit: Some corrections after the clarification of the OP.



                        documentclass{article}
                        usepackage{tikz}

                        usetikzlibrary{chains, positioning, decorations.pathreplacing}
                        defilsize{3}
                        defnodesize{6mm}
                        tikzset{>=latex}

                        begin{document}
                        begin{figure}[h]
                        centering
                        begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm, mirror}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$v$};

                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        pgfmathparse{y+3}
                        node[input node] (In-name) at (0.0cm,-pgfmathresult cm) {$u_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};

                        draw[-, decoration={brace, raise=6pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$mathcal{K}=U*V*W$};
                        end{tikzpicture}
                        end{figure}
                        end{document}


                        enter image description here






                        share|improve this answer


























                        • Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                          – Samuel
                          Dec 14 '18 at 9:37











                        • @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                          – Sito
                          Dec 14 '18 at 11:43














                        3












                        3








                        3







                        Edit: Some corrections after the clarification of the OP.



                        documentclass{article}
                        usepackage{tikz}

                        usetikzlibrary{chains, positioning, decorations.pathreplacing}
                        defilsize{3}
                        defnodesize{6mm}
                        tikzset{>=latex}

                        begin{document}
                        begin{figure}[h]
                        centering
                        begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm, mirror}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$v$};

                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        pgfmathparse{y+3}
                        node[input node] (In-name) at (0.0cm,-pgfmathresult cm) {$u_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};

                        draw[-, decoration={brace, raise=6pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$mathcal{K}=U*V*W$};
                        end{tikzpicture}
                        end{figure}
                        end{document}


                        enter image description here






                        share|improve this answer















                        Edit: Some corrections after the clarification of the OP.



                        documentclass{article}
                        usepackage{tikz}

                        usetikzlibrary{chains, positioning, decorations.pathreplacing}
                        defilsize{3}
                        defnodesize{6mm}
                        tikzset{>=latex}

                        begin{document}
                        begin{figure}[h]
                        centering
                        begin{tikzpicture}[shorten >=0pt, ->, draw=black!100]
                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        node[input node] (In-name) at (0.0cm,-y cm) {$w_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm, mirror}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$v$};

                        tikzstyle{every pin edge}=[<-,shorten <=1pt]
                        tikzstyle{node}=[circle, draw, fill=black!100, minimum size=nodesize,inner sep=0pt]
                        tikzstyle{input node}=[node, fill=black!0]

                        % Nodes
                        foreach name / y in {1,...,ilsize}
                        pgfmathparse{y+3}
                        node[input node] (In-name) at (0.0cm,-pgfmathresult cm) {$u_{y}$};

                        % Labels %
                        draw[-, decoration={brace,raise=6pt,amplitude=3mm}, decorate]
                        (In-1.north) -- (In-3.south) node[black,midway,right=3mm, xshift=5] {$g(v)$};

                        draw[-, decoration={brace, raise=6pt, amplitude=3mm, mirror}, decorate, xshift=0mm, yshift=0mm]
                        (In-1.north) -- (In-3.south) node[black,midway,left=3mm, xshift=-5] {$mathcal{K}=U*V*W$};
                        end{tikzpicture}
                        end{figure}
                        end{document}


                        enter image description here







                        share|improve this answer














                        share|improve this answer



                        share|improve this answer








                        edited Dec 14 '18 at 11:43

























                        answered Dec 14 '18 at 9:33









                        SitoSito

                        332128




                        332128













                        • Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                          – Samuel
                          Dec 14 '18 at 9:37











                        • @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                          – Sito
                          Dec 14 '18 at 11:43



















                        • Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                          – Samuel
                          Dec 14 '18 at 9:37











                        • @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                          – Sito
                          Dec 14 '18 at 11:43

















                        Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                        – Samuel
                        Dec 14 '18 at 9:37





                        Much better! I added a sketch that shows what I meant with aligned brackets. Maybe you can add that too?

                        – Samuel
                        Dec 14 '18 at 9:37













                        @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                        – Sito
                        Dec 14 '18 at 11:43





                        @Samuel you already got better answers, but nevertheless I wanted to correct the code to suit the given task.

                        – Sito
                        Dec 14 '18 at 11:43











                        1














                        I couldn't resist doing it in two lines of code:



                        documentclass[a4paper]{article}
                        usepackage{tikz,amsmath}
                        begin{document}

                        newcommand{wcir}[1]{tikz{node[draw,circle,minimum size=6mm,inner sep=0]{$#1$};}}

                        begin{align*}
                        v &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v) \
                        mathcal{K} = U*V*W &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v)
                        end{align*}

                        end{document}



                        enter image description here







                        share|improve this answer






























                          1














                          I couldn't resist doing it in two lines of code:



                          documentclass[a4paper]{article}
                          usepackage{tikz,amsmath}
                          begin{document}

                          newcommand{wcir}[1]{tikz{node[draw,circle,minimum size=6mm,inner sep=0]{$#1$};}}

                          begin{align*}
                          v &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v) \
                          mathcal{K} = U*V*W &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v)
                          end{align*}

                          end{document}



                          enter image description here







                          share|improve this answer




























                            1












                            1








                            1







                            I couldn't resist doing it in two lines of code:



                            documentclass[a4paper]{article}
                            usepackage{tikz,amsmath}
                            begin{document}

                            newcommand{wcir}[1]{tikz{node[draw,circle,minimum size=6mm,inner sep=0]{$#1$};}}

                            begin{align*}
                            v &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v) \
                            mathcal{K} = U*V*W &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v)
                            end{align*}

                            end{document}



                            enter image description here







                            share|improve this answer















                            I couldn't resist doing it in two lines of code:



                            documentclass[a4paper]{article}
                            usepackage{tikz,amsmath}
                            begin{document}

                            newcommand{wcir}[1]{tikz{node[draw,circle,minimum size=6mm,inner sep=0]{$#1$};}}

                            begin{align*}
                            v &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v) \
                            mathcal{K} = U*V*W &begin{Bmatrix}wcir{w_1}\wcir{w_2}\wcir{w_3}end{Bmatrix} g(v)
                            end{align*}

                            end{document}



                            enter image description here








                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Dec 15 '18 at 3:00

























                            answered Dec 15 '18 at 2:48









                            AboAmmarAboAmmar

                            34.3k32884




                            34.3k32884






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f464809%2ftikz-alligning-two-tikz-pictures-and-align-parentheses-to-nodes%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Bundesstraße 106

                                Verónica Boquete

                                Ida-Boy-Ed-Garten