<?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 回复： How to implement these two figures in the same diagram? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749199#M92954</link>
    <description>&lt;P&gt;you could rescale "list" by x 30 and use it on the X axis - which will&amp;nbsp; give this graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1713945002509.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63619iC0F479511B3AF677/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1713945002509.png" alt="hogi_0-1713945002509.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "list*30",
	Formula( :list * 30 )
);
dt &amp;lt;&amp;lt; Graph Builder(
	Variables(
		X( :weight ),
		X( :"list*30"n, Position( 1 ) ),
		Y( :height ),
		Y( :height ),
		Group X( :age, Show Title( 0 ) ),
		Color( :sex )
	),
	Elements(
		Position( 1, 1 ),
		Bar(
			X( 1 ),
			Y,
			Legend( 5 ),
			Response Axis( "X" ),
			Summary Statistic( "Sum" )
		)
	),
	Elements(
		Position( 1, 2 ),
		Bar( X( 2 ), Y, Color( 0 ), Legend( 6 ), Summary Statistic( "Sum" ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;</description>
    <pubDate>Wed, 24 Apr 2024 08:12:50 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-04-24T08:12:50Z</dc:date>
    <item>
      <title>How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/748972#M92951</link>
      <description>&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;Use both groups x:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-24_11-08-39.png" style="width: 824px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63600i27BDE8007534D1BF/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-24_11-08-39.png" alt="2024-04-24_11-08-39.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 03:17:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/748972#M92951</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-24T03:17:02Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/748984#M92952</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d0=Open("$SAMPLE_DATA/Big Class.jmp");
d0 &amp;lt;&amp;lt; Select Where( age &amp;lt; 16 );
dt = d0 &amp;lt;&amp;lt; Subset(
	Output Table( "test" ),
	Selected Rows( 1 ),
	selected columns( 0 )
);
Try( dt &amp;lt;&amp;lt; Delete Table Property( "Source" ) );
d2 = dt &amp;lt;&amp;lt; Summary(
	Group( age ),
	Freq( 0 ),
	Weight( 0 ),
	Link to original data table( 0 ),
	Output Table( "tem" )
);
Column( d2, 2 ) &amp;lt;&amp;lt; set name( "row" );
mi = Min( d2[0, "row"] );
ca = "ratio";
New Column( ca );
Column( ca ) &amp;lt;&amp;lt; Formula( Round( row / mi, 2 ) );
d2 &amp;lt;&amp;lt; run formulas;
Column( ca ) &amp;lt;&amp;lt; deleteFormula;
dt &amp;lt;&amp;lt; Update( With( d2 ), Match Columns( age = age ) );
Close( d2, nosave );
Current Data Table( dt );
ca = "list";
New Column( ca );
Column( ca ) &amp;lt;&amp;lt; Formula(
	If( Row() == 1 | age != Lag( age, 1 ),
		r = Row();
		1;
	,
		Floor( (Row() - r) / ratio + 1 )
	)
);
d0 &amp;lt;&amp;lt; run formulas;
Column( ca ) &amp;lt;&amp;lt; deleteFormula;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-24_11-16-39.png" style="width: 976px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63601i39736B48D83974BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-24_11-16-39.png" alt="2024-04-24_11-16-39.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;p1 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 690, 466 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Show X Axis( 0 ),
	Show Y Axis( 0 ),
	Variables(
		X( :weight ),
		Y( :height ),
		Group X( :age, Show Title( 0 ) ),
		Color( :sex )
	),
	Elements(
		Bar(
			X,
			Y,
			Legend( 5 ),
			Response Axis( "X" ),
			Summary Statistic( "Sum" )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Hide( 1 )}
		),
		Dispatch( {}, "X title", TextEditBox, {Hide( 1 )} ),
		Dispatch( {}, "Y title", TextEditBox, {Hide( 1 )} )
	)
);

p2 = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 686, 404 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Show X Axis( 0 ),
	Show Y Axis( 0 ),
	X Group Edge( "Bottom" ),
	Variables(
		X( :list ),
		Y( :height ),
		Group X( :age, Show Title( 0 ) )
	),
	Elements(
		Bar( X, Y, Legend( 5 ), Summary Statistic( "Sum" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Hide( 1 )}
		),
		Dispatch( {}, "X title", TextEditBox, {Hide( 1 )} ),
		Dispatch( {}, "Y title", TextEditBox, {Hide( 1 )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Apr 2024 03:19:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/748984#M92952</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-24T03:19:16Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749191#M92953</link>
      <description>&lt;P&gt;I would say you cannot (and should not) have them in same graphs as they are displaying different information (at least based on your graph builder scripts). You could combine then into single "report" if needed by using Combine Windows&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1713943358594.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63614iE94D2B43889E14B6/image-size/large?v=v2&amp;amp;px=999" role="button" title="jthi_0-1713943358594.png" alt="jthi_0-1713943358594.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 07:23:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749191#M92953</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-04-24T07:23:01Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749199#M92954</link>
      <description>&lt;P&gt;you could rescale "list" by x 30 and use it on the X axis - which will&amp;nbsp; give this graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1713945002509.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63619iC0F479511B3AF677/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1713945002509.png" alt="hogi_0-1713945002509.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-SPOILER&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; New Column( "list*30",
	Formula( :list * 30 )
);
dt &amp;lt;&amp;lt; Graph Builder(
	Variables(
		X( :weight ),
		X( :"list*30"n, Position( 1 ) ),
		Y( :height ),
		Y( :height ),
		Group X( :age, Show Title( 0 ) ),
		Color( :sex )
	),
	Elements(
		Position( 1, 1 ),
		Bar(
			X( 1 ),
			Y,
			Legend( 5 ),
			Response Axis( "X" ),
			Summary Statistic( "Sum" )
		)
	),
	Elements(
		Position( 1, 2 ),
		Bar( X( 2 ), Y, Color( 0 ), Legend( 6 ), Summary Statistic( "Sum" ) )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;/LI-SPOILER&gt;</description>
      <pubDate>Wed, 24 Apr 2024 08:12:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749199#M92954</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-24T08:12:50Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749204#M92955</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Is this a mistake?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2024-04-24_16-08-19.png" style="width: 658px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/63623iF612D7F8AD3BD97A/image-size/large?v=v2&amp;amp;px=999" role="button" title="2024-04-24_16-08-19.png" alt="2024-04-24_16-08-19.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 08:11:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749204#M92955</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-24T08:11:02Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749206#M92956</link>
      <description>&lt;P&gt;Thanks, I corrected it in the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;with the original column ("list") the bottom graph will be squeezed to the left.&lt;/P&gt;&lt;P&gt;with "list*30" the bars will fill the whole graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2024 08:14:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749206#M92956</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-04-24T08:14:42Z</dc:date>
    </item>
    <item>
      <title>回复： How to implement these two figures in the same diagram?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749262#M92962</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d0 = Current Data Table();
d0 &amp;lt;&amp;lt; Select Where( age &amp;lt; 16 );
dt = d0 &amp;lt;&amp;lt; Subset( Output Table( "test" ), Selected Rows( 1 ), selected columns( 0 ) );
Try( dt &amp;lt;&amp;lt; Delete Table Property( "Source" ) );
d2 = dt &amp;lt;&amp;lt; Summary( Group( age, height ), Sum( weight ), Freq( 0 ), Weight( 0 ), Link to original data table( 0 ), Output Table( "tem" ) );
ma = Max( d2[0, 4] );Close( d2, nosave );
d2 = dt &amp;lt;&amp;lt; Summary( Group( age ), Freq( 0 ), Weight( 0 ), Link to original data table( 0 ), Output Table( "tem" ) );Column( d2, 2 ) &amp;lt;&amp;lt; set name( "row" );
mi = Min( d2[0, "row"] );
ca = "ratio";New Column( ca );Column( ca ) &amp;lt;&amp;lt; Formula( Round( row / mi, 2 ) );d2 &amp;lt;&amp;lt; run formulas;Column( ca ) &amp;lt;&amp;lt; deleteFormula;
dt &amp;lt;&amp;lt; Update( With( d2 ), Match Columns( age = age ) );Close( d2, nosave );
Current Data Table( dt );ca = "list";New Column( ca );
Column( ca ) &amp;lt;&amp;lt; Formula(If( Row() == 1 | age != Lag( age, 1 ),r = Row();1,Ceiling( (Row() - r + 1) / ratio * ma / mi )	));d0 &amp;lt;&amp;lt; run formulas;Column( ca ) &amp;lt;&amp;lt; deleteFormula;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 24 Apr 2024 09:34:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-implement-these-two-figures-in-the-same-diagram/m-p/749262#M92962</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2024-04-24T09:34:57Z</dc:date>
    </item>
  </channel>
</rss>

