How to make simple line graph of commutative occurrences of events month to month? ie month2 = monthe1+month2 etc.
thanks
Sorry......to do the counts, just change the statistic to N in the Summary()
names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");
// Summarize the data
dtSum = dt << Summary(
Group( :age ),
N( :sex ),
Freq( "None" ),
Weight( "None" )
);
// Create the cummulative sum column
dtSum << New Column("Gender Cumulative Count", formula( Col Cumulative Sum( :Name( "N(Sex)" ) )));
// Generate the graph
dtSum << Graph Builder(
Size( 534, 450 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :Gender Cumulative Count ) ),
Elements( Bar( X, Y, Legend( 6 ) ) )
);
</CODE></PRE>
<P> </P></LINGO-BODY><LINGO-SUB id="lingo-sub-280291" slang="en-US" mode="NONE">Re: Graph Builder commulative counts of events</LINGO-SUB><LINGO-BODY id="lingo-body-280291" slang="en-US" mode="NONE"><P>Thanks. I knew how to do it with continuous var. I asked about commutative counts, month1 has 2 events, month2 has 5, month3 has 1, so I'll show 2-7-8.</P></LINGO-BODY><LINGO-SUB id="lingo-sub-280079" slang="en-US" mode="NONE">Re: Graph Builder commulative counts of events</LINGO-SUB><LINGO-BODY id="lingo-body-280079" slang="en-US" mode="NONE"><P>Others may have an easier way, but this is how I would do it</P>
<OL>
<LI>Use Tables==>Summary to sum the measurement column(s) for each of the X axis groups.</LI>
<LI>Create a new column in the summary table which is the Col Cumulative Sum() of the summarized measurement column(s)</LI>
<LI>Graph the data</LI>
</OL>
<P><SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="cum.PNG" style="width: 730px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="cum.PNG" style="width: 730px;"><SPAN class="lia-inline-image-display-wrapper" image-alt="cum.PNG" style="width: 730px;"><span class="lia-inline-image-display-wrapper" image-alt="cum.PNG" style="width: 730px;"><img src="https://us.v-cdn.net/6038925/uploads/images/25461i2F7D9B08DD7CA7C1/cum.PNG" role="button" title="cum.PNG" alt="cum.PNG" /></span></SPAN></SPAN></SPAN></P>
<P>Very easy to do interactively. But here is the script that produced the above graph</P>
<PRE><CODE class=" language-jsl">names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");
// Summarize the data
dtSum = dt << Summary(
Group( :age ),
Sum( :height ),
Freq( "None" ),
Weight( "None" )
);
// Create the cummulative sum column
dtSum << New Column("Height Cumulative Sum", formula( Col Cumulative Sum( :Name( "Sum(height)" ) )));
// Generate the graph
dtSum << Graph Builder(
Size( 534, 450 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :Height Cumulative Sum ) ),
Elements( Bar( X, Y, Legend( 6 ) ) )
);