<?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: Bar charts with two Y-axis in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83281#M37471</link>
    <description>&lt;P&gt;There might be a better, simpler way to do this, but this worked with Big Class.jmp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After putting age on X, height on left Y and weight on right Y axis,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created two transform columns h = age - 0.2 and w = a + 0.2 and dragged them down to the X axis.&lt;/P&gt;
&lt;P&gt;Under the Variables section of the control panel, I unchecked w on the top Bar section and h on the bottom Bar section "Bar (right)".&lt;/P&gt;
&lt;P&gt;I set the Bar Style for both to Bullet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Two Y Axes, Offset Bars" style="width: 955px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/14327iFBDCA0C88C182B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="SidebySide2Yaxes.PNG" alt="Two Y Axes, Offset Bars" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Two Y Axes, Offset Bars&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you don't like the look of the X axis title, you can click on it and change it back to "age".&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you want to try to automate it, here's the JSL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 550, 682 ),
	Variables(
		X(
			Transform Column(
				"w",
				Format( "Fixed Dec", 5, 0 ),
				Formula( :age + 0.2 )
			)
		),
		X(
			Transform Column(
				"h",
				Format( "Fixed Dec", 5, 0 ),
				Formula( :age + (-0.2) )
			),
			Position( 1 )
		),
		X( :age, Position( 1 ) ),
		Y( :height, Combine( "Parallel Independent" ) ),
		Y(
			:weight,
			Position( 1 ),
			Combine( "Parallel Independent" ),
			Side( "Right" )
		)
	),
	Elements(
		Bar( X( 2 ), X( 3 ), Y( 1 ), Legend( 6 ), Bar Style( "Bullet" ) ),
		Bar( X( 1 ), X( 3 ), Y( 2 ), Legend( 8 ), Bar Style( "Bullet" ) )
	),
	SendToReport(
		Dispatch( {"Bar"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch( {"Bar (right)"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Min( -0.38265306122449 ), Max( 150 ), Inc( 25 ), Minor Ticks( 0 )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here it is on JMP Public.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IFRAME src="https://public.jmp.com/api/packages/height-and-weight-by-age/js-p/5bec2b9df379e40fd421c7af/indexPage" width="800" height="600" frameborder="0" style="margin: 0.8em 0;" class="jmp-share-iframe"&gt;&lt;/IFRAME&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not interactive because of:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Combine( "Parallel Independent" )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If I take those lines out, it still works and it's interactive on JMP Public, but the bars are thicker and overlap.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 14 Nov 2018 14:23:29 GMT</pubDate>
    <dc:creator>John_Powell_JMP</dc:creator>
    <dc:date>2018-11-14T14:23:29Z</dc:date>
    <item>
      <title>Bar charts with two Y-axis</title>
      <link>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83169#M37446</link>
      <description>&lt;P&gt;Hello everybody,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to make a bar chart with two Y-axis. This post&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.jmp.com/t5/Discussions/Graph-Builder-how-to-do-2-Y-Axis-s-left-and-right/m-p/38327#M22435&amp;nbsp;" target="_blank"&gt;https://community.jmp.com/t5/Discussions/Graph-Builder-how-to-do-2-Y-Axis-s-left-and-right/m-p/38327#M22435&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;helped me to make a secondary axis, however now the struggle is to make bars for both the sets of values. Hope someone know how to do this, as this is tricky in Exel too.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 18:12:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83169#M37446</guid>
      <dc:creator>therese</dc:creator>
      <dc:date>2018-11-13T18:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: Bar charts with two Y-axis</title>
      <link>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83170#M37447</link>
      <description>&lt;P&gt;I managed to make two bars, however now the challenge is to put them next to each other, and not at exactly the same place. I can only find where to change the width of the bars..&lt;/P&gt;</description>
      <pubDate>Tue, 13 Nov 2018 18:19:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83170#M37447</guid>
      <dc:creator>therese</dc:creator>
      <dc:date>2018-11-13T18:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: Bar charts with two Y-axis</title>
      <link>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83281#M37471</link>
      <description>&lt;P&gt;There might be a better, simpler way to do this, but this worked with Big Class.jmp:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After putting age on X, height on left Y and weight on right Y axis,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I created two transform columns h = age - 0.2 and w = a + 0.2 and dragged them down to the X axis.&lt;/P&gt;
&lt;P&gt;Under the Variables section of the control panel, I unchecked w on the top Bar section and h on the bottom Bar section "Bar (right)".&lt;/P&gt;
&lt;P&gt;I set the Bar Style for both to Bullet.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the result:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Two Y Axes, Offset Bars" style="width: 955px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/14327iFBDCA0C88C182B54/image-size/large?v=v2&amp;amp;px=999" role="button" title="SidebySide2Yaxes.PNG" alt="Two Y Axes, Offset Bars" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Two Y Axes, Offset Bars&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If you don't like the look of the X axis title, you can click on it and change it back to "age".&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;In case you want to try to automate it, here's the JSL:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 550, 682 ),
	Variables(
		X(
			Transform Column(
				"w",
				Format( "Fixed Dec", 5, 0 ),
				Formula( :age + 0.2 )
			)
		),
		X(
			Transform Column(
				"h",
				Format( "Fixed Dec", 5, 0 ),
				Formula( :age + (-0.2) )
			),
			Position( 1 )
		),
		X( :age, Position( 1 ) ),
		Y( :height, Combine( "Parallel Independent" ) ),
		Y(
			:weight,
			Position( 1 ),
			Combine( "Parallel Independent" ),
			Side( "Right" )
		)
	),
	Elements(
		Bar( X( 2 ), X( 3 ), Y( 1 ), Legend( 6 ), Bar Style( "Bullet" ) ),
		Bar( X( 1 ), X( 3 ), Y( 2 ), Legend( 8 ), Bar Style( "Bullet" ) )
	),
	SendToReport(
		Dispatch( {"Bar"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch( {"Bar (right)"}, "", OutlineBox, {Close( 0 )} ),
		Dispatch(
			{},
			"weight",
			ScaleBox,
			{Min( -0.38265306122449 ), Max( 150 ), Inc( 25 ), Minor Ticks( 0 )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Here it is on JMP Public.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IFRAME src="https://public.jmp.com/api/packages/height-and-weight-by-age/js-p/5bec2b9df379e40fd421c7af/indexPage" width="800" height="600" frameborder="0" style="margin: 0.8em 0;" class="jmp-share-iframe"&gt;&lt;/IFRAME&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's not interactive because of:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Combine( "Parallel Independent" )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If I take those lines out, it still works and it's interactive on JMP Public, but the bars are thicker and overlap.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Nov 2018 14:23:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Bar-charts-with-two-Y-axis/m-p/83281#M37471</guid>
      <dc:creator>John_Powell_JMP</dc:creator>
      <dc:date>2018-11-14T14:23:29Z</dc:date>
    </item>
  </channel>
</rss>

