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

Was there ever any real use for a 6800-based Apple I?

Why does "decimal.TryParse()" always return 0 for the input string "-1" in the below code?

Is a vertical stabiliser needed for straight line flight in a glider?

Cropping a message using array splits

LocalDate.plus Incorrect Answer

Does a member have to be initialized to take its address?

find not returning expected files

Noob at soldering, can anyone explain why my circuit won't work?

What is the best way for a skeleton to impersonate human without using magic?

What are the ramifications of setting ARITHABORT ON for all connections in SQL Server?

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

Are there variations of the regular runtimes of the Big-O-Notation?

How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?

Early arrival in Australia, early hotel check in not available

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

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

Is there a faster way to calculate Abs[z]^2 numerically?

Why can't RGB or bicolour LEDs produce a decent yellow?

Is the homebrew weapon attack cantrip 'Arcane Strike' balanced?

Ubuntu won't let me edit or delete .vimrc file

Does the 500 feet falling cap apply per fall, or per turn?

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

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

How to make the table in the figure in LaTeX?



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
            42 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
            36 mins ago










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










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            28 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
            15 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
            42 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
            36 mins ago










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










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            28 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
            42 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
            36 mins ago










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










          • $begingroup$
            @Edmund: Yes, I was about to post the same question you raised.
            $endgroup$
            – Tugrul Temel
            28 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 31 mins ago

























          answered 49 mins ago









          Carl WollCarl Woll

          78k3102206




          78k3102206











          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            42 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
            36 mins ago










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










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
















          • $begingroup$
            Very nice. You even chose the colors I was imagining. Thanks.
            $endgroup$
            – Tugrul Temel
            42 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
            36 mins ago










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










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















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




          $begingroup$
          Very nice. You even chose the colors I was imagining. Thanks.
          $endgroup$
          – Tugrul Temel
          42 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
          36 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
          36 mins ago












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




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












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




          $begingroup$
          @Edmund: Yes, I was about to post the same question you raised.
          $endgroup$
          – Tugrul Temel
          28 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
            15 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
            15 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 32 mins ago









          EdmundEdmund

          27k330103




          27k330103











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
















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















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




          $begingroup$
          and @Carl: Would be possible to exclude SelfLoops from the histogram?
          $endgroup$
          – Tugrul Temel
          15 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

          Log på Navigationsmenu

          Wonderful Copenhagen (sang) Eksterne henvisninger | NavigationsmenurSide på frankloesser.comWonderful Copenhagen

          Detroit Tigers Spis treści Historia | Skład zespołu | Sukcesy | Członkowie Baseball Hall of Fame | Zastrzeżone numery | Przypisy | Menu nawigacyjneEncyclopedia of Detroit - Detroit TigersTigers Stadium, Detroit, MITigers Timeline 1900sDetroit Tigers Team History & EncyclopediaTigers Timeline 1910s1935 World Series1945 World Series1945 World Series1984 World SeriesComerica Park, Detroit, MI2006 World Series2012 World SeriesDetroit Tigers 40-Man RosterDetroit Tigers Coaching StaffTigers Hall of FamersTigers Retired Numberse