histogram using edgesOrdering vertices with minimum Edge Crossing in Circular GraphsGenerating a graph object where vertices are pixel coordinates and edges represent two pixels being in the same Moore neighborhoodHow to remove all dead ends from a undirected graph?Finding nonequivalent 3-cycles and edges of a given graphFast way to get edge-list of graph in terms of vertex indices (not vertex names)Graph, ToolTip, and Labeled: How to make a swanky graphHow to generate random Directed Connected (Planar) graphs?Maximum Flow in a directed graph of a system of nonlinear ordinary differential equationsIteratively strip off simply connected edges in graph?Directed graph, immediate predecessor of a vertex

Can the sorting of a list be verified without comparing neighbors?

Would an 8% reduction in drag outweigh the weight addition from this custom CFD-tested winglet?

LocalDate.plus Incorrect Answer

Control variables and other independent variables

How to slow yourself down (for playing nice with others)

Was the Highlands Ranch shooting the 115th mass shooting in the US in 2019

Should these notes be played as a chord or one after another?

How to pronounce "r" after a "g"?

Is there enough time to Planar Bind a creature conjured by a one hour duration spell?

Can I use my laptop, which says 240V, in the USA?

Understanding basic photoresistor circuit

Drawing Quarter-Circle

What does i386 mean on macOS Mojave?

What did Rocket give Hawkeye in "Avengers: Endgame"?

The lexical root of the perfect tense forms differs from the lexical root of the infinitive form

We are two immediate neighbors who forged our own powers to form concatenated relationship. Who are we?

Why do unstable nuclei form?

On what legal basis did the UK remove the 'European Union' from its passport?

How to make a Lich look like a human without magic in 5e?

Remove everything except csv file Bash Script

What food production methods would allow a metropolis like New York to become self sufficient

How can I answer high-school writing prompts without sounding weird and fake?

As programers say: Strive to be lazy

Can you book a one-way ticket to the UK on a visa?



histogram using edges


Ordering vertices with minimum Edge Crossing in Circular GraphsGenerating a graph object where vertices are pixel coordinates and edges represent two pixels being in the same Moore neighborhoodHow to remove all dead ends from a undirected graph?Finding nonequivalent 3-cycles and edges of a given graphFast way to get edge-list of graph in terms of vertex indices (not vertex names)Graph, ToolTip, and Labeled: How to make a swanky graphHow to generate random Directed Connected (Planar) graphs?Maximum Flow in a directed graph of a system of nonlinear ordinary differential equationsIteratively strip off simply connected edges in graph?Directed graph, immediate predecessor of a vertex













1












$begingroup$


I have a list of directed edges:



list=1 [DirectedEdge] 1, 1 [DirectedEdge] 10, 2 [DirectedEdge] 2, 
3 [DirectedEdge] 3, 3 [DirectedEdge] 5, 3 [DirectedEdge] 7,
3 [DirectedEdge] 8, 3 [DirectedEdge] 9, 3 [DirectedEdge] 11,
4 [DirectedEdge] 4, 5 [DirectedEdge] 2, 5 [DirectedEdge] 5,
5 [DirectedEdge] 7, 5 [DirectedEdge] 8, 5 [DirectedEdge] 9,
5 [DirectedEdge] 11, 5 [DirectedEdge] 14, 6 [DirectedEdge] 1,
6 [DirectedEdge] 2, 6 [DirectedEdge] 4, 6 [DirectedEdge] 5,
6 [DirectedEdge] 6, 6 [DirectedEdge] 7, 6 [DirectedEdge] 8,
6 [DirectedEdge] 9, 6 [DirectedEdge] 10, 6 [DirectedEdge] 11,
6 [DirectedEdge] 12, 6 [DirectedEdge] 13, 6 [DirectedEdge] 14,
6 [DirectedEdge] 15, 6 [DirectedEdge] 16, 6 [DirectedEdge] 17,
7 [DirectedEdge] 7, 7 [DirectedEdge] 9, 8 [DirectedEdge] 8,
8 [DirectedEdge] 9, 8 [DirectedEdge] 11, 8 [DirectedEdge] 14,
8 [DirectedEdge] 16, 8 [DirectedEdge] 17, 9 [DirectedEdge] 9,
10 [DirectedEdge] 9, 10 [DirectedEdge] 10, 11 [DirectedEdge] 2,
11 [DirectedEdge] 8, 11 [DirectedEdge] 9, 11 [DirectedEdge] 11,
11 [DirectedEdge] 15, 11 [DirectedEdge] 16, 11 [DirectedEdge] 17,
12 [DirectedEdge] 9, 12 [DirectedEdge] 12, 13 [DirectedEdge] 9,
13 [DirectedEdge] 13, 13 [DirectedEdge] 16, 13 [DirectedEdge] 17,
14 [DirectedEdge] 14, 15 [DirectedEdge] 9, 15 [DirectedEdge] 15,
16 [DirectedEdge] 9, 16 [DirectedEdge] 16, 17 [DirectedEdge] 17;


I want to draw a histogram in the following structure. The list above consists of In- and Out-links, and I like to construct a histogram combining both In and Out link numbers with different colors in the bars of the histogram. For example, if 5 links go out of vertex 1 and 10 links come in to vertex 1, the bar associated with vertex 1 should have a height of 15. But then, I should be able to see the bars in two colors to visualize the In and Out sample.



I know that Degree, InDegree and OutDegree are the related functions for calculating the data that will be used in constructing the histogram, but I have no idea how I put them in the above structure.



The ideal (limited with my knowledge) solution is to write a Mathematica function, the argument of which is a list of directed edges.



Thank you for your time.










share|improve this question









$endgroup$
















    1












    $begingroup$


    I have a list of directed edges:



    list=1 [DirectedEdge] 1, 1 [DirectedEdge] 10, 2 [DirectedEdge] 2, 
    3 [DirectedEdge] 3, 3 [DirectedEdge] 5, 3 [DirectedEdge] 7,
    3 [DirectedEdge] 8, 3 [DirectedEdge] 9, 3 [DirectedEdge] 11,
    4 [DirectedEdge] 4, 5 [DirectedEdge] 2, 5 [DirectedEdge] 5,
    5 [DirectedEdge] 7, 5 [DirectedEdge] 8, 5 [DirectedEdge] 9,
    5 [DirectedEdge] 11, 5 [DirectedEdge] 14, 6 [DirectedEdge] 1,
    6 [DirectedEdge] 2, 6 [DirectedEdge] 4, 6 [DirectedEdge] 5,
    6 [DirectedEdge] 6, 6 [DirectedEdge] 7, 6 [DirectedEdge] 8,
    6 [DirectedEdge] 9, 6 [DirectedEdge] 10, 6 [DirectedEdge] 11,
    6 [DirectedEdge] 12, 6 [DirectedEdge] 13, 6 [DirectedEdge] 14,
    6 [DirectedEdge] 15, 6 [DirectedEdge] 16, 6 [DirectedEdge] 17,
    7 [DirectedEdge] 7, 7 [DirectedEdge] 9, 8 [DirectedEdge] 8,
    8 [DirectedEdge] 9, 8 [DirectedEdge] 11, 8 [DirectedEdge] 14,
    8 [DirectedEdge] 16, 8 [DirectedEdge] 17, 9 [DirectedEdge] 9,
    10 [DirectedEdge] 9, 10 [DirectedEdge] 10, 11 [DirectedEdge] 2,
    11 [DirectedEdge] 8, 11 [DirectedEdge] 9, 11 [DirectedEdge] 11,
    11 [DirectedEdge] 15, 11 [DirectedEdge] 16, 11 [DirectedEdge] 17,
    12 [DirectedEdge] 9, 12 [DirectedEdge] 12, 13 [DirectedEdge] 9,
    13 [DirectedEdge] 13, 13 [DirectedEdge] 16, 13 [DirectedEdge] 17,
    14 [DirectedEdge] 14, 15 [DirectedEdge] 9, 15 [DirectedEdge] 15,
    16 [DirectedEdge] 9, 16 [DirectedEdge] 16, 17 [DirectedEdge] 17;


    I want to draw a histogram in the following structure. The list above consists of In- and Out-links, and I like to construct a histogram combining both In and Out link numbers with different colors in the bars of the histogram. For example, if 5 links go out of vertex 1 and 10 links come in to vertex 1, the bar associated with vertex 1 should have a height of 15. But then, I should be able to see the bars in two colors to visualize the In and Out sample.



    I know that Degree, InDegree and OutDegree are the related functions for calculating the data that will be used in constructing the histogram, but I have no idea how I put them in the above structure.



    The ideal (limited with my knowledge) solution is to write a Mathematica function, the argument of which is a list of directed edges.



    Thank you for your time.










    share|improve this question









    $endgroup$














      1












      1








      1


      1



      $begingroup$


      I have a list of directed edges:



      list=1 [DirectedEdge] 1, 1 [DirectedEdge] 10, 2 [DirectedEdge] 2, 
      3 [DirectedEdge] 3, 3 [DirectedEdge] 5, 3 [DirectedEdge] 7,
      3 [DirectedEdge] 8, 3 [DirectedEdge] 9, 3 [DirectedEdge] 11,
      4 [DirectedEdge] 4, 5 [DirectedEdge] 2, 5 [DirectedEdge] 5,
      5 [DirectedEdge] 7, 5 [DirectedEdge] 8, 5 [DirectedEdge] 9,
      5 [DirectedEdge] 11, 5 [DirectedEdge] 14, 6 [DirectedEdge] 1,
      6 [DirectedEdge] 2, 6 [DirectedEdge] 4, 6 [DirectedEdge] 5,
      6 [DirectedEdge] 6, 6 [DirectedEdge] 7, 6 [DirectedEdge] 8,
      6 [DirectedEdge] 9, 6 [DirectedEdge] 10, 6 [DirectedEdge] 11,
      6 [DirectedEdge] 12, 6 [DirectedEdge] 13, 6 [DirectedEdge] 14,
      6 [DirectedEdge] 15, 6 [DirectedEdge] 16, 6 [DirectedEdge] 17,
      7 [DirectedEdge] 7, 7 [DirectedEdge] 9, 8 [DirectedEdge] 8,
      8 [DirectedEdge] 9, 8 [DirectedEdge] 11, 8 [DirectedEdge] 14,
      8 [DirectedEdge] 16, 8 [DirectedEdge] 17, 9 [DirectedEdge] 9,
      10 [DirectedEdge] 9, 10 [DirectedEdge] 10, 11 [DirectedEdge] 2,
      11 [DirectedEdge] 8, 11 [DirectedEdge] 9, 11 [DirectedEdge] 11,
      11 [DirectedEdge] 15, 11 [DirectedEdge] 16, 11 [DirectedEdge] 17,
      12 [DirectedEdge] 9, 12 [DirectedEdge] 12, 13 [DirectedEdge] 9,
      13 [DirectedEdge] 13, 13 [DirectedEdge] 16, 13 [DirectedEdge] 17,
      14 [DirectedEdge] 14, 15 [DirectedEdge] 9, 15 [DirectedEdge] 15,
      16 [DirectedEdge] 9, 16 [DirectedEdge] 16, 17 [DirectedEdge] 17;


      I want to draw a histogram in the following structure. The list above consists of In- and Out-links, and I like to construct a histogram combining both In and Out link numbers with different colors in the bars of the histogram. For example, if 5 links go out of vertex 1 and 10 links come in to vertex 1, the bar associated with vertex 1 should have a height of 15. But then, I should be able to see the bars in two colors to visualize the In and Out sample.



      I know that Degree, InDegree and OutDegree are the related functions for calculating the data that will be used in constructing the histogram, but I have no idea how I put them in the above structure.



      The ideal (limited with my knowledge) solution is to write a Mathematica function, the argument of which is a list of directed edges.



      Thank you for your time.










      share|improve this question









      $endgroup$




      I have a list of directed edges:



      list=1 [DirectedEdge] 1, 1 [DirectedEdge] 10, 2 [DirectedEdge] 2, 
      3 [DirectedEdge] 3, 3 [DirectedEdge] 5, 3 [DirectedEdge] 7,
      3 [DirectedEdge] 8, 3 [DirectedEdge] 9, 3 [DirectedEdge] 11,
      4 [DirectedEdge] 4, 5 [DirectedEdge] 2, 5 [DirectedEdge] 5,
      5 [DirectedEdge] 7, 5 [DirectedEdge] 8, 5 [DirectedEdge] 9,
      5 [DirectedEdge] 11, 5 [DirectedEdge] 14, 6 [DirectedEdge] 1,
      6 [DirectedEdge] 2, 6 [DirectedEdge] 4, 6 [DirectedEdge] 5,
      6 [DirectedEdge] 6, 6 [DirectedEdge] 7, 6 [DirectedEdge] 8,
      6 [DirectedEdge] 9, 6 [DirectedEdge] 10, 6 [DirectedEdge] 11,
      6 [DirectedEdge] 12, 6 [DirectedEdge] 13, 6 [DirectedEdge] 14,
      6 [DirectedEdge] 15, 6 [DirectedEdge] 16, 6 [DirectedEdge] 17,
      7 [DirectedEdge] 7, 7 [DirectedEdge] 9, 8 [DirectedEdge] 8,
      8 [DirectedEdge] 9, 8 [DirectedEdge] 11, 8 [DirectedEdge] 14,
      8 [DirectedEdge] 16, 8 [DirectedEdge] 17, 9 [DirectedEdge] 9,
      10 [DirectedEdge] 9, 10 [DirectedEdge] 10, 11 [DirectedEdge] 2,
      11 [DirectedEdge] 8, 11 [DirectedEdge] 9, 11 [DirectedEdge] 11,
      11 [DirectedEdge] 15, 11 [DirectedEdge] 16, 11 [DirectedEdge] 17,
      12 [DirectedEdge] 9, 12 [DirectedEdge] 12, 13 [DirectedEdge] 9,
      13 [DirectedEdge] 13, 13 [DirectedEdge] 16, 13 [DirectedEdge] 17,
      14 [DirectedEdge] 14, 15 [DirectedEdge] 9, 15 [DirectedEdge] 15,
      16 [DirectedEdge] 9, 16 [DirectedEdge] 16, 17 [DirectedEdge] 17;


      I want to draw a histogram in the following structure. The list above consists of In- and Out-links, and I like to construct a histogram combining both In and Out link numbers with different colors in the bars of the histogram. For example, if 5 links go out of vertex 1 and 10 links come in to vertex 1, the bar associated with vertex 1 should have a height of 15. But then, I should be able to see the bars in two colors to visualize the In and Out sample.



      I know that Degree, InDegree and OutDegree are the related functions for calculating the data that will be used in constructing the histogram, but I have no idea how I put them in the above structure.



      The ideal (limited with my knowledge) solution is to write a Mathematica function, the argument of which is a list of directed edges.



      Thank you for your time.







      graphs-and-networks






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked 1 hour ago









      Tugrul TemelTugrul Temel

      952213




      952213




















          2 Answers
          2






          active

          oldest

          votes


















          3












          $begingroup$

          You can use BarChart for this:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here



          Another possibility:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, Minus@*VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here






          share|improve this answer











          $endgroup$












          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            38 mins ago










          • $begingroup$
            The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
            $endgroup$
            – Edmund
            32 mins ago










          • $begingroup$
            @Edmund Thanks for letting me know
            $endgroup$
            – Carl Woll
            26 mins ago










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            24 mins ago


















          1












          $begingroup$

          With ordered vertices



          vl = VertexList@list;
          degree = Association @@ Thread["In", "Out" -> Through@VertexInDegree, VertexOutDegree@list];
          degree = #[[Ordering[vl]]] & /@ degree;
          vl = vl[[Ordering[vl]]];

          BarChart[Transpose@Values@degree,
          ChartLayout -> "Stacked",
          ChartLabels -> vl, None,
          ChartLegends -> SwatchLegend[Automatic, "In", "Out"]]



          Mathematica graphics




          Hope this helps.






          share|improve this answer









          $endgroup$












          • $begingroup$
            and @Carl: Would be possible to exclude SelfLoops from the histogram?
            $endgroup$
            – Tugrul Temel
            11 mins ago











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "387"
          ;
          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%2fmathematica.stackexchange.com%2fquestions%2f198137%2fhistogram-using-edges%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          3












          $begingroup$

          You can use BarChart for this:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here



          Another possibility:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, Minus@*VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here






          share|improve this answer











          $endgroup$












          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            38 mins ago










          • $begingroup$
            The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
            $endgroup$
            – Edmund
            32 mins ago










          • $begingroup$
            @Edmund Thanks for letting me know
            $endgroup$
            – Carl Woll
            26 mins ago










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            24 mins ago















          3












          $begingroup$

          You can use BarChart for this:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here



          Another possibility:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, Minus@*VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here






          share|improve this answer











          $endgroup$












          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            38 mins ago










          • $begingroup$
            The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
            $endgroup$
            – Edmund
            32 mins ago










          • $begingroup$
            @Edmund Thanks for letting me know
            $endgroup$
            – Carl Woll
            26 mins ago










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            24 mins ago













          3












          3








          3





          $begingroup$

          You can use BarChart for this:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here



          Another possibility:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, Minus@*VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here






          share|improve this answer











          $endgroup$



          You can use BarChart for this:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here



          Another possibility:



          BarChart[
          Permute[
          Transpose @ Through @ VertexInDegree, Minus@*VertexOutDegree @ list,
          Ordering @ Ordering @ VertexList[list]
          ],
          ChartLayout->"Stacked"
          ]


          enter image description here







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 26 mins ago

























          answered 45 mins ago









          Carl WollCarl Woll

          78k3102206




          78k3102206











          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            38 mins ago










          • $begingroup$
            The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
            $endgroup$
            – Edmund
            32 mins ago










          • $begingroup$
            @Edmund Thanks for letting me know
            $endgroup$
            – Carl Woll
            26 mins ago










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            24 mins ago
















          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            38 mins ago










          • $begingroup$
            The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
            $endgroup$
            – Edmund
            32 mins ago










          • $begingroup$
            @Edmund Thanks for letting me know
            $endgroup$
            – Carl Woll
            26 mins ago










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            24 mins ago















          $begingroup$
          Very nice. You even chose the colors I was imagining. Thanks.
          $endgroup$
          – Tugrul Temel
          38 mins ago




          $begingroup$
          Very nice. You even chose the colors I was imagining. Thanks.
          $endgroup$
          – Tugrul Temel
          38 mins ago












          $begingroup$
          The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
          $endgroup$
          – Edmund
          32 mins ago




          $begingroup$
          The BarChart does not appear to have the vertices in order. E.g. 3 has 1 in and 6 out but your chart shows a total of 5 for 3 instead if 7..
          $endgroup$
          – Edmund
          32 mins ago












          $begingroup$
          @Edmund Thanks for letting me know
          $endgroup$
          – Carl Woll
          26 mins ago




          $begingroup$
          @Edmund Thanks for letting me know
          $endgroup$
          – Carl Woll
          26 mins ago












          $begingroup$
          @Edmund: Yes, I was about to post the same question you raised.
          $endgroup$
          – Tugrul Temel
          24 mins ago




          $begingroup$
          @Edmund: Yes, I was about to post the same question you raised.
          $endgroup$
          – Tugrul Temel
          24 mins ago











          1












          $begingroup$

          With ordered vertices



          vl = VertexList@list;
          degree = Association @@ Thread["In", "Out" -> Through@VertexInDegree, VertexOutDegree@list];
          degree = #[[Ordering[vl]]] & /@ degree;
          vl = vl[[Ordering[vl]]];

          BarChart[Transpose@Values@degree,
          ChartLayout -> "Stacked",
          ChartLabels -> vl, None,
          ChartLegends -> SwatchLegend[Automatic, "In", "Out"]]



          Mathematica graphics




          Hope this helps.






          share|improve this answer









          $endgroup$












          • $begingroup$
            and @Carl: Would be possible to exclude SelfLoops from the histogram?
            $endgroup$
            – Tugrul Temel
            11 mins ago















          1












          $begingroup$

          With ordered vertices



          vl = VertexList@list;
          degree = Association @@ Thread["In", "Out" -> Through@VertexInDegree, VertexOutDegree@list];
          degree = #[[Ordering[vl]]] & /@ degree;
          vl = vl[[Ordering[vl]]];

          BarChart[Transpose@Values@degree,
          ChartLayout -> "Stacked",
          ChartLabels -> vl, None,
          ChartLegends -> SwatchLegend[Automatic, "In", "Out"]]



          Mathematica graphics




          Hope this helps.






          share|improve this answer









          $endgroup$












          • $begingroup$
            and @Carl: Would be possible to exclude SelfLoops from the histogram?
            $endgroup$
            – Tugrul Temel
            11 mins ago













          1












          1








          1





          $begingroup$

          With ordered vertices



          vl = VertexList@list;
          degree = Association @@ Thread["In", "Out" -> Through@VertexInDegree, VertexOutDegree@list];
          degree = #[[Ordering[vl]]] & /@ degree;
          vl = vl[[Ordering[vl]]];

          BarChart[Transpose@Values@degree,
          ChartLayout -> "Stacked",
          ChartLabels -> vl, None,
          ChartLegends -> SwatchLegend[Automatic, "In", "Out"]]



          Mathematica graphics




          Hope this helps.






          share|improve this answer









          $endgroup$



          With ordered vertices



          vl = VertexList@list;
          degree = Association @@ Thread["In", "Out" -> Through@VertexInDegree, VertexOutDegree@list];
          degree = #[[Ordering[vl]]] & /@ degree;
          vl = vl[[Ordering[vl]]];

          BarChart[Transpose@Values@degree,
          ChartLayout -> "Stacked",
          ChartLabels -> vl, None,
          ChartLegends -> SwatchLegend[Automatic, "In", "Out"]]



          Mathematica graphics




          Hope this helps.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered 28 mins ago









          EdmundEdmund

          27k330103




          27k330103











          • $begingroup$
            and @Carl: Would be possible to exclude SelfLoops from the histogram?
            $endgroup$
            – Tugrul Temel
            11 mins ago
















          • $begingroup$
            and @Carl: Would be possible to exclude SelfLoops from the histogram?
            $endgroup$
            – Tugrul Temel
            11 mins ago















          $begingroup$
          and @Carl: Would be possible to exclude SelfLoops from the histogram?
          $endgroup$
          – Tugrul Temel
          11 mins ago




          $begingroup$
          and @Carl: Would be possible to exclude SelfLoops from the histogram?
          $endgroup$
          – Tugrul Temel
          11 mins ago

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Mathematica 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.

          Use MathJax to format equations. MathJax reference.


          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%2fmathematica.stackexchange.com%2fquestions%2f198137%2fhistogram-using-edges%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

          Canceling a color specificationRandomly assigning color to Graphics3D objects?Default color for Filling in Mathematica 9Coloring specific elements of sets with a prime modified order in an array plotHow to pick a color differing significantly from the colors already in a given color list?Detection of the text colorColor numbers based on their valueCan color schemes for use with ColorData include opacity specification?My dynamic color schemes

          Invision Community Contents History See also References External links Navigation menuProprietaryinvisioncommunity.comIPS Community ForumsIPS Community Forumsthis blog entry"License Changes, IP.Board 3.4, and the Future""Interview -- Matt Mecham of Ibforums""CEO Invision Power Board, Matt Mecham Is a Liar, Thief!"IPB License Explanation 1.3, 1.3.1, 2.0, and 2.1ArchivedSecurity Fixes, Updates And Enhancements For IPB 1.3.1Archived"New Demo Accounts - Invision Power Services"the original"New Default Skin"the original"Invision Power Board 3.0.0 and Applications Released"the original"Archived copy"the original"Perpetual licenses being done away with""Release Notes - Invision Power Services""Introducing: IPS Community Suite 4!"Invision Community Release Notes

          François Viète Contents Biography Work and thought Bibliography See also Notes Further reading External links Navigation menup. 21Google Bookspp. 75–77Google BooksDe thou (from University of Saint Andrews)ArchivedGoogle BooksGoogle BooksGoogle BooksGoogle booksGoogle Bookscc-parthenay.frL'histoire universelle (fr)Universal History (en)ArchivedAdsabs.harvard.eduPagesperso-orange.frArchive.orgChikara Sasaki. Descartes' mathematical thought p.259Google BooksGoogle BooksGoogle Bookspp. 152 and onwardGoogle BooksGoogle BooksScribd.comGoogle Books1257-7979Google BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGoogle BooksGallica.bnf.frGoogle BooksGoogle Books"François Viète"Francois Viète: Father of Modern Algebraic NotationThe Lawyer and the GamblerAbout TarporleySite de Jean-Paul GuichardL'algèbre nouvelle"About the Harmonicon"cb120511976(data)1188044800000 0001 0913 5903n82164680ola2013766880073431702w6vt1sb70287374827140948071409480