How to place a Parabola/Distribution on top of a node in Tikz?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I'm trying right now to place a distribution (preferably a Gaussian curve) on top of a node within TikzPicture. The distribution should ideally be slightly offset vertically from the node, although that is not essential. The code I am trying to extend is as follows:



begintikzpicture[shorten >=1pt,->,draw=black!50, node distance=2.5cm, scale=1.5]
tikzstyleevery pin edge=[<-,shorten <=1pt]
tikzstyleneuron=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]
tikzstyleinput neuron=[neuron, fill=green!50];
tikzstyleoutput neuron=[neuron, fill=red!50];
tikzstylehidden neuron=[neuron, fill=blue!50];
tikzstyleannot = [text width=4em, text centered]

% Draw the input layer nodes
foreach name / y in 1,...,4
% This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

% Draw the hidden layer nodes
foreach name / y in 1,...,5
path[yshift=0.5cm]
node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

% Draw the output layer node
node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

% Connect every node in the input layer with every node in the
% hidden layer.
foreach source in 1,...,4
foreach dest in 1,...,5
path (I-source) edge (H-dest);

% Connect every node in the hidden layer with the output layer
foreach source in 1,...,5
path (H-source) edge (O);

% Annotate the layers
node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
node[annot,above of=I-1, node distance=1cm] Input layer;
node[annot,above of=O] Output layer;
endtikzpicture


Resulting in



1-layer Neural Network



What I would ideally have is something similar to the following:



Desired image







share|improve this question


























    up vote
    2
    down vote

    favorite












    I'm trying right now to place a distribution (preferably a Gaussian curve) on top of a node within TikzPicture. The distribution should ideally be slightly offset vertically from the node, although that is not essential. The code I am trying to extend is as follows:



    begintikzpicture[shorten >=1pt,->,draw=black!50, node distance=2.5cm, scale=1.5]
    tikzstyleevery pin edge=[<-,shorten <=1pt]
    tikzstyleneuron=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]
    tikzstyleinput neuron=[neuron, fill=green!50];
    tikzstyleoutput neuron=[neuron, fill=red!50];
    tikzstylehidden neuron=[neuron, fill=blue!50];
    tikzstyleannot = [text width=4em, text centered]

    % Draw the input layer nodes
    foreach name / y in 1,...,4
    % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
    node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

    % Draw the hidden layer nodes
    foreach name / y in 1,...,5
    path[yshift=0.5cm]
    node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

    % Draw the output layer node
    node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

    % Connect every node in the input layer with every node in the
    % hidden layer.
    foreach source in 1,...,4
    foreach dest in 1,...,5
    path (I-source) edge (H-dest);

    % Connect every node in the hidden layer with the output layer
    foreach source in 1,...,5
    path (H-source) edge (O);

    % Annotate the layers
    node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
    node[annot,above of=I-1, node distance=1cm] Input layer;
    node[annot,above of=O] Output layer;
    endtikzpicture


    Resulting in



    1-layer Neural Network



    What I would ideally have is something similar to the following:



    Desired image







    share|improve this question
























      up vote
      2
      down vote

      favorite









      up vote
      2
      down vote

      favorite











      I'm trying right now to place a distribution (preferably a Gaussian curve) on top of a node within TikzPicture. The distribution should ideally be slightly offset vertically from the node, although that is not essential. The code I am trying to extend is as follows:



      begintikzpicture[shorten >=1pt,->,draw=black!50, node distance=2.5cm, scale=1.5]
      tikzstyleevery pin edge=[<-,shorten <=1pt]
      tikzstyleneuron=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]
      tikzstyleinput neuron=[neuron, fill=green!50];
      tikzstyleoutput neuron=[neuron, fill=red!50];
      tikzstylehidden neuron=[neuron, fill=blue!50];
      tikzstyleannot = [text width=4em, text centered]

      % Draw the input layer nodes
      foreach name / y in 1,...,4
      % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
      node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

      % Draw the hidden layer nodes
      foreach name / y in 1,...,5
      path[yshift=0.5cm]
      node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

      % Draw the output layer node
      node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

      % Connect every node in the input layer with every node in the
      % hidden layer.
      foreach source in 1,...,4
      foreach dest in 1,...,5
      path (I-source) edge (H-dest);

      % Connect every node in the hidden layer with the output layer
      foreach source in 1,...,5
      path (H-source) edge (O);

      % Annotate the layers
      node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
      node[annot,above of=I-1, node distance=1cm] Input layer;
      node[annot,above of=O] Output layer;
      endtikzpicture


      Resulting in



      1-layer Neural Network



      What I would ideally have is something similar to the following:



      Desired image







      share|improve this question














      I'm trying right now to place a distribution (preferably a Gaussian curve) on top of a node within TikzPicture. The distribution should ideally be slightly offset vertically from the node, although that is not essential. The code I am trying to extend is as follows:



      begintikzpicture[shorten >=1pt,->,draw=black!50, node distance=2.5cm, scale=1.5]
      tikzstyleevery pin edge=[<-,shorten <=1pt]
      tikzstyleneuron=[circle,fill=black!25,minimum size=17pt,inner sep=0pt]
      tikzstyleinput neuron=[neuron, fill=green!50];
      tikzstyleoutput neuron=[neuron, fill=red!50];
      tikzstylehidden neuron=[neuron, fill=blue!50];
      tikzstyleannot = [text width=4em, text centered]

      % Draw the input layer nodes
      foreach name / y in 1,...,4
      % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
      node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

      % Draw the hidden layer nodes
      foreach name / y in 1,...,5
      path[yshift=0.5cm]
      node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

      % Draw the output layer node
      node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

      % Connect every node in the input layer with every node in the
      % hidden layer.
      foreach source in 1,...,4
      foreach dest in 1,...,5
      path (I-source) edge (H-dest);

      % Connect every node in the hidden layer with the output layer
      foreach source in 1,...,5
      path (H-source) edge (O);

      % Annotate the layers
      node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
      node[annot,above of=I-1, node distance=1cm] Input layer;
      node[annot,above of=O] Output layer;
      endtikzpicture


      Resulting in



      1-layer Neural Network



      What I would ideally have is something similar to the following:



      Desired image









      share|improve this question













      share|improve this question




      share|improve this question








      edited Aug 21 at 11:28









      Phelype Oleinik

      16k33466




      16k33466










      asked Aug 21 at 11:25









      Tom Pinder

      133




      133




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          5
          down vote



          accepted










          You can embed it in the neuron style with the path picture key:



          neuron/.style=
          circle,fill=black!25,minimum size=17pt,inner sep=0pt,
          path picture=
          draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
          ,
          ,


          I've defined the Gaussian as



          tikzset
          declare function=
          sig = 0.1;
          mu = 0;
          g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);




          This results in:



          enter image description here



          Note that I also changed your tikzstyle commands, because it is considered deprecated.
          Complete MWE:



          documentclass[tikz,margin=2mm]standalone

          usepackagetikz

          tikzset
          declare function=
          sig = 0.1;
          mu = 0;
          g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);



          begindocument

          begintikzpicture[
          shorten >=1pt,
          ->,
          draw=black!50,
          node distance=2.5cm,
          scale=1.5,
          every pin edge/.style=<-,shorten <=1pt,
          neuron/.style=
          circle,fill=black!25,minimum size=17pt,inner sep=0pt,
          path picture=
          draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
          ,
          ,
          input neuron/.style=neuron, fill=green!50,
          output neuron/.style=neuron, fill=red!50,
          hidden neuron/.style=neuron, fill=blue!50,
          annot/.style=text width=4em, text centered,
          ]

          % Draw the input layer nodes
          foreach name / y in 1,...,4
          % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
          node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

          % Draw the hidden layer nodes
          foreach name / y in 1,...,5
          path[yshift=0.5cm]
          node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

          % Draw the output layer node
          node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

          % Connect every node in the input layer with every node in the
          % hidden layer.
          foreach source in 1,...,4
          foreach dest in 1,...,5
          path (I-source) edge (H-dest);

          % Connect every node in the hidden layer with the output layer
          foreach source in 1,...,5
          path (H-source) edge (O);

          % Annotate the layers
          node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
          node[annot,above of=I-1, node distance=1cm] Input layer;
          node[annot,above of=O] Output layer;


          endtikzpicture

          enddocument





          share|improve this answer





























            up vote
            1
            down vote













            Pretty bad code, but it works (node style – only works when using scalebox with scale factor unqeual to 0 or 1 and some othre bugs):



            documentclass[border=.5cm,tikz]standalone
            tikzset
            neuron/.style=
            append after command=
            pgfextra
            node[thick,draw=blue!70,fill=blue!20,circle,inner sep=1cm] (a) at (tikzlastnode) ;
            draw[thick,red] (a.west) parabola ([xshift=1cm,yshift=.5cm]a.west) to[bend left=50] ([xshift=-1cm,yshift=.5cm]a.east);
            draw[thick,red] (a.east) parabola ([xshift=-1cm,yshift=.5cm]a.east);




            begindocument
            begintikzpicture
            scalebox.5[.5]node[neuron] at (0,0) ;
            endtikzpicture
            enddocument


            The output:



            Screenshot






            share|improve this answer


















            • 1




              It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
              – Tom Pinder
              Aug 21 at 12:54










            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',
            convertImagesToLinks: false,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            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%2f446948%2fhow-to-place-a-parabola-distribution-on-top-of-a-node-in-tikz%23new-answer', 'question_page');

            );

            Post as a guest






























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            5
            down vote



            accepted










            You can embed it in the neuron style with the path picture key:



            neuron/.style=
            circle,fill=black!25,minimum size=17pt,inner sep=0pt,
            path picture=
            draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
            ,
            ,


            I've defined the Gaussian as



            tikzset
            declare function=
            sig = 0.1;
            mu = 0;
            g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);




            This results in:



            enter image description here



            Note that I also changed your tikzstyle commands, because it is considered deprecated.
            Complete MWE:



            documentclass[tikz,margin=2mm]standalone

            usepackagetikz

            tikzset
            declare function=
            sig = 0.1;
            mu = 0;
            g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);



            begindocument

            begintikzpicture[
            shorten >=1pt,
            ->,
            draw=black!50,
            node distance=2.5cm,
            scale=1.5,
            every pin edge/.style=<-,shorten <=1pt,
            neuron/.style=
            circle,fill=black!25,minimum size=17pt,inner sep=0pt,
            path picture=
            draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
            ,
            ,
            input neuron/.style=neuron, fill=green!50,
            output neuron/.style=neuron, fill=red!50,
            hidden neuron/.style=neuron, fill=blue!50,
            annot/.style=text width=4em, text centered,
            ]

            % Draw the input layer nodes
            foreach name / y in 1,...,4
            % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
            node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

            % Draw the hidden layer nodes
            foreach name / y in 1,...,5
            path[yshift=0.5cm]
            node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

            % Draw the output layer node
            node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

            % Connect every node in the input layer with every node in the
            % hidden layer.
            foreach source in 1,...,4
            foreach dest in 1,...,5
            path (I-source) edge (H-dest);

            % Connect every node in the hidden layer with the output layer
            foreach source in 1,...,5
            path (H-source) edge (O);

            % Annotate the layers
            node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
            node[annot,above of=I-1, node distance=1cm] Input layer;
            node[annot,above of=O] Output layer;


            endtikzpicture

            enddocument





            share|improve this answer


























              up vote
              5
              down vote



              accepted










              You can embed it in the neuron style with the path picture key:



              neuron/.style=
              circle,fill=black!25,minimum size=17pt,inner sep=0pt,
              path picture=
              draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
              ,
              ,


              I've defined the Gaussian as



              tikzset
              declare function=
              sig = 0.1;
              mu = 0;
              g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);




              This results in:



              enter image description here



              Note that I also changed your tikzstyle commands, because it is considered deprecated.
              Complete MWE:



              documentclass[tikz,margin=2mm]standalone

              usepackagetikz

              tikzset
              declare function=
              sig = 0.1;
              mu = 0;
              g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);



              begindocument

              begintikzpicture[
              shorten >=1pt,
              ->,
              draw=black!50,
              node distance=2.5cm,
              scale=1.5,
              every pin edge/.style=<-,shorten <=1pt,
              neuron/.style=
              circle,fill=black!25,minimum size=17pt,inner sep=0pt,
              path picture=
              draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
              ,
              ,
              input neuron/.style=neuron, fill=green!50,
              output neuron/.style=neuron, fill=red!50,
              hidden neuron/.style=neuron, fill=blue!50,
              annot/.style=text width=4em, text centered,
              ]

              % Draw the input layer nodes
              foreach name / y in 1,...,4
              % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
              node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

              % Draw the hidden layer nodes
              foreach name / y in 1,...,5
              path[yshift=0.5cm]
              node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

              % Draw the output layer node
              node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

              % Connect every node in the input layer with every node in the
              % hidden layer.
              foreach source in 1,...,4
              foreach dest in 1,...,5
              path (I-source) edge (H-dest);

              % Connect every node in the hidden layer with the output layer
              foreach source in 1,...,5
              path (H-source) edge (O);

              % Annotate the layers
              node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
              node[annot,above of=I-1, node distance=1cm] Input layer;
              node[annot,above of=O] Output layer;


              endtikzpicture

              enddocument





              share|improve this answer
























                up vote
                5
                down vote



                accepted







                up vote
                5
                down vote



                accepted






                You can embed it in the neuron style with the path picture key:



                neuron/.style=
                circle,fill=black!25,minimum size=17pt,inner sep=0pt,
                path picture=
                draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
                ,
                ,


                I've defined the Gaussian as



                tikzset
                declare function=
                sig = 0.1;
                mu = 0;
                g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);




                This results in:



                enter image description here



                Note that I also changed your tikzstyle commands, because it is considered deprecated.
                Complete MWE:



                documentclass[tikz,margin=2mm]standalone

                usepackagetikz

                tikzset
                declare function=
                sig = 0.1;
                mu = 0;
                g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);



                begindocument

                begintikzpicture[
                shorten >=1pt,
                ->,
                draw=black!50,
                node distance=2.5cm,
                scale=1.5,
                every pin edge/.style=<-,shorten <=1pt,
                neuron/.style=
                circle,fill=black!25,minimum size=17pt,inner sep=0pt,
                path picture=
                draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
                ,
                ,
                input neuron/.style=neuron, fill=green!50,
                output neuron/.style=neuron, fill=red!50,
                hidden neuron/.style=neuron, fill=blue!50,
                annot/.style=text width=4em, text centered,
                ]

                % Draw the input layer nodes
                foreach name / y in 1,...,4
                % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
                node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

                % Draw the hidden layer nodes
                foreach name / y in 1,...,5
                path[yshift=0.5cm]
                node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

                % Draw the output layer node
                node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

                % Connect every node in the input layer with every node in the
                % hidden layer.
                foreach source in 1,...,4
                foreach dest in 1,...,5
                path (I-source) edge (H-dest);

                % Connect every node in the hidden layer with the output layer
                foreach source in 1,...,5
                path (H-source) edge (O);

                % Annotate the layers
                node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
                node[annot,above of=I-1, node distance=1cm] Input layer;
                node[annot,above of=O] Output layer;


                endtikzpicture

                enddocument





                share|improve this answer














                You can embed it in the neuron style with the path picture key:



                neuron/.style=
                circle,fill=black!25,minimum size=17pt,inner sep=0pt,
                path picture=
                draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
                ,
                ,


                I've defined the Gaussian as



                tikzset
                declare function=
                sig = 0.1;
                mu = 0;
                g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);




                This results in:



                enter image description here



                Note that I also changed your tikzstyle commands, because it is considered deprecated.
                Complete MWE:



                documentclass[tikz,margin=2mm]standalone

                usepackagetikz

                tikzset
                declare function=
                sig = 0.1;
                mu = 0;
                g(x) = 1/(sig*sqrt(2*pi)) * exp(-1/2 * ((x-mu)/sig)^2);



                begindocument

                begintikzpicture[
                shorten >=1pt,
                ->,
                draw=black!50,
                node distance=2.5cm,
                scale=1.5,
                every pin edge/.style=<-,shorten <=1pt,
                neuron/.style=
                circle,fill=black!25,minimum size=17pt,inner sep=0pt,
                path picture=
                draw[red,thick,-] plot[domain=-0.3:0.3,samples=11,smooth] (x,0.05*g(x));
                ,
                ,
                input neuron/.style=neuron, fill=green!50,
                output neuron/.style=neuron, fill=red!50,
                hidden neuron/.style=neuron, fill=blue!50,
                annot/.style=text width=4em, text centered,
                ]

                % Draw the input layer nodes
                foreach name / y in 1,...,4
                % This is the same as writing foreach name / y in 1/1,2/2,3/3,4/4
                node[input neuron, pin=left:Input y] (I-name) at (0,-y) ;

                % Draw the hidden layer nodes
                foreach name / y in 1,...,5
                path[yshift=0.5cm]
                node[hidden neuron] (H-name) at (2.5cm,-y cm) ;

                % Draw the output layer node
                node[output neuron,pin=[pin edge=->]right:Output, right of=H-3] (O) ;

                % Connect every node in the input layer with every node in the
                % hidden layer.
                foreach source in 1,...,4
                foreach dest in 1,...,5
                path (I-source) edge (H-dest);

                % Connect every node in the hidden layer with the output layer
                foreach source in 1,...,5
                path (H-source) edge (O);

                % Annotate the layers
                node[annot,above of=H-1, node distance=1cm] (hl) Hidden layer;
                node[annot,above of=I-1, node distance=1cm] Input layer;
                node[annot,above of=O] Output layer;


                endtikzpicture

                enddocument






                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Aug 21 at 14:12

























                answered Aug 21 at 14:07









                Max

                5,89811727




                5,89811727




















                    up vote
                    1
                    down vote













                    Pretty bad code, but it works (node style – only works when using scalebox with scale factor unqeual to 0 or 1 and some othre bugs):



                    documentclass[border=.5cm,tikz]standalone
                    tikzset
                    neuron/.style=
                    append after command=
                    pgfextra
                    node[thick,draw=blue!70,fill=blue!20,circle,inner sep=1cm] (a) at (tikzlastnode) ;
                    draw[thick,red] (a.west) parabola ([xshift=1cm,yshift=.5cm]a.west) to[bend left=50] ([xshift=-1cm,yshift=.5cm]a.east);
                    draw[thick,red] (a.east) parabola ([xshift=-1cm,yshift=.5cm]a.east);




                    begindocument
                    begintikzpicture
                    scalebox.5[.5]node[neuron] at (0,0) ;
                    endtikzpicture
                    enddocument


                    The output:



                    Screenshot






                    share|improve this answer


















                    • 1




                      It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                      – Tom Pinder
                      Aug 21 at 12:54














                    up vote
                    1
                    down vote













                    Pretty bad code, but it works (node style – only works when using scalebox with scale factor unqeual to 0 or 1 and some othre bugs):



                    documentclass[border=.5cm,tikz]standalone
                    tikzset
                    neuron/.style=
                    append after command=
                    pgfextra
                    node[thick,draw=blue!70,fill=blue!20,circle,inner sep=1cm] (a) at (tikzlastnode) ;
                    draw[thick,red] (a.west) parabola ([xshift=1cm,yshift=.5cm]a.west) to[bend left=50] ([xshift=-1cm,yshift=.5cm]a.east);
                    draw[thick,red] (a.east) parabola ([xshift=-1cm,yshift=.5cm]a.east);




                    begindocument
                    begintikzpicture
                    scalebox.5[.5]node[neuron] at (0,0) ;
                    endtikzpicture
                    enddocument


                    The output:



                    Screenshot






                    share|improve this answer


















                    • 1




                      It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                      – Tom Pinder
                      Aug 21 at 12:54












                    up vote
                    1
                    down vote










                    up vote
                    1
                    down vote









                    Pretty bad code, but it works (node style – only works when using scalebox with scale factor unqeual to 0 or 1 and some othre bugs):



                    documentclass[border=.5cm,tikz]standalone
                    tikzset
                    neuron/.style=
                    append after command=
                    pgfextra
                    node[thick,draw=blue!70,fill=blue!20,circle,inner sep=1cm] (a) at (tikzlastnode) ;
                    draw[thick,red] (a.west) parabola ([xshift=1cm,yshift=.5cm]a.west) to[bend left=50] ([xshift=-1cm,yshift=.5cm]a.east);
                    draw[thick,red] (a.east) parabola ([xshift=-1cm,yshift=.5cm]a.east);




                    begindocument
                    begintikzpicture
                    scalebox.5[.5]node[neuron] at (0,0) ;
                    endtikzpicture
                    enddocument


                    The output:



                    Screenshot






                    share|improve this answer














                    Pretty bad code, but it works (node style – only works when using scalebox with scale factor unqeual to 0 or 1 and some othre bugs):



                    documentclass[border=.5cm,tikz]standalone
                    tikzset
                    neuron/.style=
                    append after command=
                    pgfextra
                    node[thick,draw=blue!70,fill=blue!20,circle,inner sep=1cm] (a) at (tikzlastnode) ;
                    draw[thick,red] (a.west) parabola ([xshift=1cm,yshift=.5cm]a.west) to[bend left=50] ([xshift=-1cm,yshift=.5cm]a.east);
                    draw[thick,red] (a.east) parabola ([xshift=-1cm,yshift=.5cm]a.east);




                    begindocument
                    begintikzpicture
                    scalebox.5[.5]node[neuron] at (0,0) ;
                    endtikzpicture
                    enddocument


                    The output:



                    Screenshot







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Aug 21 at 12:00

























                    answered Aug 21 at 11:54









                    current_user

                    2,419428




                    2,419428







                    • 1




                      It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                      – Tom Pinder
                      Aug 21 at 12:54












                    • 1




                      It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                      – Tom Pinder
                      Aug 21 at 12:54







                    1




                    1




                    It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                    – Tom Pinder
                    Aug 21 at 12:54




                    It seems that this works in isolation, however, it causes an error when integrated into the code snippet I pasted in the original question. Do you know this is?
                    – Tom Pinder
                    Aug 21 at 12:54

















                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f446948%2fhow-to-place-a-parabola-distribution-on-top-of-a-node-in-tikz%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    Comments

                    Popular posts from this blog

                    What does second last employer means? [closed]

                    List of Gilmore Girls characters

                    Confectionery