<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Graph Builder commulative counts of events in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280303#M54326</link>
    <description>&lt;P&gt;Sorry......to do the counts, just change the statistic to N in the Summary()&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gender.PNG" style="width: 485px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25478iC127DF01533DA4A4/image-dimensions/485x345?v=v2" width="485" height="345" role="button" title="gender.PNG" alt="gender.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");

// Summarize the data
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :age ),
	N( :sex ),
	Freq( "None" ),
	Weight( "None" )
);

// Create the cummulative sum column
dtSum &amp;lt;&amp;lt; New Column("Gender Cumulative Count", formula( Col Cumulative Sum( :Name( "N(Sex)" ) )));

// Generate the graph
dtSum &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :Gender Cumulative Count ) ),
	Elements( Bar( X, Y, Legend( 6 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jul 2020 10:02:26 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-07-20T10:02:26Z</dc:date>
    <item>
      <title>Graph Builder commulative counts of events</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280056#M54290</link>
      <description>&lt;P&gt;How to make simple line graph of commutative occurrences of events month to month? ie month2 = monthe1+month2 etc.&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:03:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280056#M54290</guid>
      <dc:creator>RonB</dc:creator>
      <dc:date>2023-06-11T11:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder commulative counts of events</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280079#M54296</link>
      <description>&lt;P&gt;Others may have an easier way, but this is how I would do it&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use Tables==&amp;gt;Summary to sum the measurement column(s)&amp;nbsp; for each of the X axis groups.&lt;/LI&gt;
&lt;LI&gt;Create a new column in the summary table which is the Col Cumulative Sum() of the summarized measurement column(s)&lt;/LI&gt;
&lt;LI&gt;Graph the data&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cum.PNG" style="width: 730px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25461i2F7D9B08DD7CA7C1/image-size/large?v=v2&amp;amp;px=999" role="button" title="cum.PNG" alt="cum.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Very easy to do interactively.&amp;nbsp; But here is the script that produced the above graph&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");

// Summarize the data
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :age ),
	Sum( :height ),
	Freq( "None" ),
	Weight( "None" )
);

// Create the cummulative sum column
dtSum &amp;lt;&amp;lt; New Column("Height Cumulative Sum", formula( Col Cumulative Sum( :Name( "Sum(height)" ) )));

// Generate the graph
dtSum &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :Height Cumulative Sum ) ),
	Elements( Bar( X, Y, Legend( 6 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 19 Jul 2020 11:59:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280079#M54296</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-19T11:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder commulative counts of events</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280291#M54324</link>
      <description>&lt;P&gt;Thanks. I knew&amp;nbsp; how to do it with continuous var. I asked about commutative counts, month1 has 2 events, month2 has 5, month3 has 1, so&amp;nbsp; I'll show 2-7-8.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 07:45:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280291#M54324</guid>
      <dc:creator>RonB</dc:creator>
      <dc:date>2020-07-20T07:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder commulative counts of events</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280303#M54326</link>
      <description>&lt;P&gt;Sorry......to do the counts, just change the statistic to N in the Summary()&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="gender.PNG" style="width: 485px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/25478iC127DF01533DA4A4/image-dimensions/485x345?v=v2" width="485" height="345" role="button" title="gender.PNG" alt="gender.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");

// Summarize the data
dtSum = dt &amp;lt;&amp;lt; Summary(
	Group( :age ),
	N( :sex ),
	Freq( "None" ),
	Weight( "None" )
);

// Create the cummulative sum column
dtSum &amp;lt;&amp;lt; New Column("Gender Cumulative Count", formula( Col Cumulative Sum( :Name( "N(Sex)" ) )));

// Generate the graph
dtSum &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :Gender Cumulative Count ) ),
	Elements( Bar( X, Y, Legend( 6 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jul 2020 10:02:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-commulative-counts-of-events/m-p/280303#M54326</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-20T10:02:26Z</dc:date>
    </item>
  </channel>
</rss>

