<?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: Make histogram and box plot in graph builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267118#M52013</link>
    <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16275"&gt;@shasheminassab&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim provided you with what you wanted.&amp;nbsp; Below is an alternative view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not a fan of vertical histograms, but you can create the view below fairly easily. The script follows.&amp;nbsp; This is more of an FYI and to determine if the developers might know of a clever method to rotate the frame or create a layout for what you want directly with GraphBuilder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 599px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24030iE0C68E78A69C4742/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

//Gender is a numeric column
dt &amp;lt;&amp;lt; New Column( "Gender",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( If( :sex == "F", 1, 2 ) ),
		Value Labels( {1 = "F", 2 = "M"} ),
		Use Value Labels( 1 )
	);
//Counts is a constant column used a placed holder
dt &amp;lt;&amp;lt; New Column( "Counts",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		&amp;lt;&amp;lt; set Each Value(1)
);

gb = dt &amp;lt;&amp;lt;Graph Builder(
	Size( 526, 454 ),
	Show Control Panel( 0 ),
	Variables(
		X( :Counts ),
		X( :Gender ),
		Y( :height ),
		Overlay( :sex ),
		Color( :sex )
	),
	Elements( Position( 1, 1 ), Histogram( X, Y, Legend( 41 ) ) ),
	Elements( Position( 2, 1 ), Box Plot( X, Y, Legend( 40 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Gender",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 2.5 ), Inc( 1 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Rotate Text( "Right" ), Set Font Size( 12 ), Set Font Style( "Bold" )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox( 2 ),
			{DispatchSeg(
				Box Plot Seg( "Box Plot (F, 1)" ),
				{Line Width( 2 ), Fill Color( {66, 112, 221} ), Fill( 1 ),
				Transparency( 0.6 )}
			), DispatchSeg(
				Box Plot Seg( "Box Plot (M, 2)" ),
				{Line Width( 2 ), Fill Color( {212, 73, 88} ), Fill( 1 ),
				Transparency( 0.6 )}
			)}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {41, [0, 1], 40, [-1, -1, -1, -1, -3, -3]} ),
			Position( {0, 1, -1, -1, -1, -1, -3, -3} )}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 May 2020 05:12:06 GMT</pubDate>
    <dc:creator>gzmorgan0</dc:creator>
    <dc:date>2020-05-16T05:12:06Z</dc:date>
    <item>
      <title>Make histogram and box plot in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267054#M52008</link>
      <description>&lt;P&gt;In the distribution platform you can add a box plot to the histogram (attached pic 1). &lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pic 1" style="width: 363px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24014i04565CCEC9C08C6E/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pic 1.PNG" alt="Pic 1" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Pic 1&lt;/span&gt;&lt;/span&gt;&lt;BR /&gt;How can I make a similar plot in Graph Builder? The reason that I am asking is I want to overlay it with a categorical parameter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I made those plots separately and attached them manually in Photoshop (see attached pic2).&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Pic 2" style="width: 543px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24015i9EF94B99FF4143B0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Pic 2.PNG" alt="Pic 2" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Pic 2&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If such thing can be done much easier and faster in Graph Builder, which is usually done with a dummy variable, please let me know (preferably without JSL coding!!)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 22:09:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267054#M52008</guid>
      <dc:creator>shasheminassab</dc:creator>
      <dc:date>2020-05-15T22:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Make histogram and box plot in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267068#M52009</link>
      <description>&lt;P&gt;I don't know of an interactive way to do what you want in one instance of Graph Builder, but below is the "Start" of a simple script that may get you what you want.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="couple.PNG" style="width: 497px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24013iA3208E0A55A19483/image-size/large?v=v2&amp;amp;px=999" role="button" title="couple.PNG" alt="couple.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");

his = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Overlay( :sex ) ),
	Elements( Points( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
	SendToReport(
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg( Hist Seg( 1 ), Bin Span( 24, 0 ) ),
			DispatchSeg( Hist Seg( 2 ), Bin Span( 24, 0 ) )}
		)
	)
);

box = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 495, 296 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Overlay( :sex ), Color( :sex ) ),
	Elements( Box Plot( X, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{DispatchSeg(
				Box Plot Seg( "Box Plot (F)" ),
				{Line Color( "Medium Dark Blue" ), Fill Color( "Medium Dark Blue" ),
				Fill( 1 )}
			), DispatchSeg(
				Box Plot Seg( "Box Plot (M)" ),
				{Line Color( "Medium Dark Red" ), Fill Color( "Medium Light Red" ),
				Fill( 1 )}
			)}
		)
	)
);

new window("Height", lub = lineupbox(n col(1)));
lub&amp;lt;&amp;lt;append(report(box)[FrameBox(1)]);
lub&amp;lt;&amp;lt;append(report(his)[Frame box(1)]);
lub&amp;lt;&amp;lt;append(report(his)[AxisBox(1)]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 15 May 2020 21:39:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267068#M52009</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-05-15T21:39:21Z</dc:date>
    </item>
    <item>
      <title>Re: Make histogram and box plot in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267118#M52013</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/16275"&gt;@shasheminassab&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jim provided you with what you wanted.&amp;nbsp; Below is an alternative view.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not a fan of vertical histograms, but you can create the view below fairly easily. The script follows.&amp;nbsp; This is more of an FYI and to determine if the developers might know of a clever method to rotate the frame or create a layout for what you want directly with GraphBuilder.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 599px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/24030iE0C68E78A69C4742/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");

//Gender is a numeric column
dt &amp;lt;&amp;lt; New Column( "Gender",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		Formula( If( :sex == "F", 1, 2 ) ),
		Value Labels( {1 = "F", 2 = "M"} ),
		Use Value Labels( 1 )
	);
//Counts is a constant column used a placed holder
dt &amp;lt;&amp;lt; New Column( "Counts",
		Numeric,
		"Continuous",
		Format( "Best", 12 ),
		&amp;lt;&amp;lt; set Each Value(1)
);

gb = dt &amp;lt;&amp;lt;Graph Builder(
	Size( 526, 454 ),
	Show Control Panel( 0 ),
	Variables(
		X( :Counts ),
		X( :Gender ),
		Y( :height ),
		Overlay( :sex ),
		Color( :sex )
	),
	Elements( Position( 1, 1 ), Histogram( X, Y, Legend( 41 ) ) ),
	Elements( Position( 2, 1 ), Box Plot( X, Y, Legend( 40 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"Gender",
			ScaleBox,
			{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 2.5 ), Inc( 1 ),
			Minor Ticks( 0 )}
		),
		Dispatch(
			{},
			"Y title",
			TextEditBox,
			{Rotate Text( "Right" ), Set Font Size( 12 ), Set Font Style( "Bold" )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox( 2 ),
			{DispatchSeg(
				Box Plot Seg( "Box Plot (F, 1)" ),
				{Line Width( 2 ), Fill Color( {66, 112, 221} ), Fill( 1 ),
				Transparency( 0.6 )}
			), DispatchSeg(
				Box Plot Seg( "Box Plot (M, 2)" ),
				{Line Width( 2 ), Fill Color( {212, 73, 88} ), Fill( 1 ),
				Transparency( 0.6 )}
			)}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {41, [0, 1], 40, [-1, -1, -1, -1, -3, -3]} ),
			Position( {0, 1, -1, -1, -1, -1, -3, -3} )}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 May 2020 05:12:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267118#M52013</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2020-05-16T05:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: Make histogram and box plot in graph builder</title>
      <link>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267293#M52038</link>
      <description>Thanks very much!</description>
      <pubDate>Sun, 17 May 2020 05:10:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-histogram-and-box-plot-in-graph-builder/m-p/267293#M52038</guid>
      <dc:creator>shasheminassab</dc:creator>
      <dc:date>2020-05-17T05:10:57Z</dc:date>
    </item>
  </channel>
</rss>

