<?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: Lollipop graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309042#M56313</link>
    <description>&lt;P&gt;Jim,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wow, thanks so much. That's exactly what I wanted. I didn't even think to integrate a "needle" bar graph with a "mean" point sitting on top, but for those who want to do it all through GraphBuilder (i.e., without scripting), that's how you do it. If you additionally want to interactively size the dots in proportion to the response variable of interest, simply drag the parameter to the "size" drop zone on GraphBuilder. I am attaching my first lollipop plot as an additional example. Thanks so much and hopefully this may help others who stumbled across this post.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2020 14:16:55 GMT</pubDate>
    <dc:creator>abmayfield</dc:creator>
    <dc:date>2020-09-18T14:16:55Z</dc:date>
    <item>
      <title>Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/308925#M56306</link>
      <description>&lt;P&gt;Is it possible via GraphBuilder to make&amp;nbsp; a lollipop plot? See example I've posted. I know you can get something akin to this when looking at time series data (under the time series platform). The control chart very nearly does this, too, but it is obviously to be used for other sorts of analyses, and the lines are not drawn directly below the points. What I want is for the point plotted to have a line drawn above or below it that connects it to the mean (to emphasize deviation from the mean). I feel like all the elements for making such a plot are there!&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="Screen Shot 2020-09-18 at 06.31.14.png" style="width: 726px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26847iA156FC82C080F671/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2020-09-18 at 06.31.14.png" alt="Screen Shot 2020-09-18 at 06.31.14.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:05:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/308925#M56306</guid>
      <dc:creator>abmayfield</dc:creator>
      <dc:date>2023-06-11T11:05:51Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/308972#M56309</link>
      <description>&lt;P&gt;Here is a graph using the Big Class data table, with an added column that has positive and negative random values.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="lollipop.PNG" style="width: 609px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26846i57629F64D363A302/image-size/large?v=v2&amp;amp;px=999" role="button" title="lollipop.PNG" alt="lollipop.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And here is the script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables(
		X( :age, Order By( :Column 6, Descending, Order Statistic( "Mean" ) ) ),
		Y( :Column 6 ),
		Color( :age )
	),
	Elements(
		Points( X, Y, Legend( 5 ), Summary Statistic( "Mean" ) ),
		Bar( X, Y, Legend( 6 ), Bar Style( "Needle" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				5,
				Properties( 0, {Marker Size( 20 )}, Item ID( "12", 1 ) ),
				Properties( 1, {Marker Size( 20 )}, Item ID( "13", 1 ) ),
				Properties( 2, {Marker Size( 20 )}, Item ID( "14", 1 ) ),
				Properties( 3, {Marker Size( 20 )}, Item ID( "15", 1 ) ),
				Properties( 4, {Marker Size( 20 )}, Item ID( "16", 1 ) ),
				Properties( 5, {Marker Size( 29 )}, Item ID( "17", 1 ) ),
				Properties( -1, {Marker Size( 20 )}, Item ID( "Mean", 1 ) )
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 18 Sep 2020 12:22:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/308972#M56309</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-18T12:22:31Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309042#M56313</link>
      <description>&lt;P&gt;Jim,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Wow, thanks so much. That's exactly what I wanted. I didn't even think to integrate a "needle" bar graph with a "mean" point sitting on top, but for those who want to do it all through GraphBuilder (i.e., without scripting), that's how you do it. If you additionally want to interactively size the dots in proportion to the response variable of interest, simply drag the parameter to the "size" drop zone on GraphBuilder. I am attaching my first lollipop plot as an additional example. Thanks so much and hopefully this may help others who stumbled across this post.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 14:16:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309042#M56313</guid>
      <dc:creator>abmayfield</dc:creator>
      <dc:date>2020-09-18T14:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309151#M56321</link>
      <description>&lt;P&gt;Another approach, requiring more JSL for custom Markers.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Using an image for the marker. Use As Marker will show up in other graphs." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/26855iFA2B47EAA08B8044/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Using an image for the marker. Use As Marker will show up in other graphs." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;Using an image for the marker. Use As Marker will show up in other graphs.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;There are two Roberts in Big Class; the Needle is the average. The points are shown for both.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$sample_data/big class.jmp" );
dt &amp;lt;&amp;lt; New Column( "height-mean", formula( height - Col Mean( height ) ) );
dt &amp;lt;&amp;lt; Color by Column( :Age );

// build the floating round marker...
dt &amp;lt;&amp;lt; New Column( "marker",
	expression,
	formula(

		box = (Graph Box(
			// make a small drawing space 100x100 pixels, scaled from -1 to 1. Black background becomes transparent below
			framesize( 100, 100 ), X Scale( -1, 1 ), Y Scale( -1, 1 ), &amp;lt;&amp;lt;backgroundcolor( RGB Color( 0, 0, 0 ) ), 
			// use the row's color. it is pretty dark when filled
			Fill Color( Color Of( Row State() ) );
			Circle( {0, 0}, .75, "FILL" );
			Text Color( RGB Color( 1, 1, 1 ) );//white
			Text Size( 40 );// adjust as needed
			Text( CenterJustified, {0, -.35/*adjust as needed for v-center*/}, Char( height ) );
			
		));
		// trim the frame edges and make a transparent background
		{r, g, b} = ((box[FrameBox( 1 )]) &amp;lt;&amp;lt; getimage) &amp;lt;&amp;lt; getpixels( "rgb" );
		r = r[4 :: (N Rows( r ) - 5), 4 :: (N Cols( r ) - 5)];//trim
		g = g[4 :: (N Rows( g ) - 5), 4 :: (N Cols( g ) - 5)];//trim
		b = b[4 :: (N Rows( b ) - 5), 4 :: (N Cols( b ) - 5)];//trim
		a = r + g + b != 0;
		Show( r, g, b, a );
		New Image( "rgba", {r, g, b, a} );
	
	),
	&amp;lt;&amp;lt;useformarker // use this column for markers
);

dt &amp;lt;&amp;lt; Graph Builder(
	Size( 1200, 500 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables( X( :name ), Y( :Name( "height-mean" ) ) ),
	Elements( Bar( X, Y, Legend( 5 ), Bar Style( "Needle" ) ), Points( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"height-mean",
			ScaleBox,
			{Min( -15 ), Max( 11 ), Inc( 5 ), Minor Ticks( 1 ), Add Ref Line( 0, "Solid", "Gray", "", 1 )}
		),
		Dispatch( {}, "400", ScaleBox, {Legend Model( 5, Properties( 0, {Line Color( 82 )}, Item ID( "Mean", 1 ) ) )} ),
		Dispatch( {}, "graph title", TextEditBox, {Set Text( "difference from mean" )} ),
		Dispatch( {}, "X title", TextEditBox, {Set Text( "" )} )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 16:35:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309151#M56321</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-09-18T16:35:44Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309152#M56322</link>
      <description>&lt;P&gt;Love it!&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 16:37:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309152#M56322</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-18T16:37:15Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309323#M56326</link>
      <description>&lt;P&gt;You can actually reproduce this interactively (albeit less beautifully) by increasing the marker size, labeling by height, then reducing the marker transparency (I halved it). In this example, I just colored by gender.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The only issue I can see is that, if you want to have the icon sizes scale with something (like age in this second example) AND have the labels (for height in this example), you may need to manually drag the labels around so that they don't fall in a weird place (see second plot, in which case I manually changed the location of Clay and Danny's labels). There might be a work-around though (I tried messing around with the marker sizing options and failed).&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 18:03:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309323#M56326</guid>
      <dc:creator>abmayfield</dc:creator>
      <dc:date>2020-09-18T18:03:28Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309395#M56331</link>
      <description>&lt;P&gt;Nice! You can probably order the marker segments so the numbers draw on top of the circles. And you might be able to make the numbers be markers as well (UseForMarker attribute on a column). That would center the number in the circle. Avoiding the JSL in my example would be a good choice; it is pretty slow to make a graph and take its picture for each data point.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 20:51:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/309395#M56331</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2020-09-18T20:51:20Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310194#M56367</link>
      <description>When I run this under v13.2.1 , the lollipops markers are very small. So small the embedded number isn't visible. How can I increase the size of the markers?</description>
      <pubDate>Mon, 21 Sep 2020 18:32:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310194#M56367</guid>
      <dc:creator>jimloughlin</dc:creator>
      <dc:date>2020-09-21T18:32:42Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310196#M56368</link>
      <description>&lt;P&gt;The "&amp;lt;&amp;lt;useformarker" message is not known in JMP 13.2.1.&amp;nbsp; However, you can right click on the graph and select "Custom" and then go to the Marker entry and right click on the marker, and change the marker size.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2020 18:43:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310196#M56368</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-21T18:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Lollipop graph</title>
      <link>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310529#M56379</link>
      <description>Thanx.</description>
      <pubDate>Mon, 21 Sep 2020 21:52:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Lollipop-graph/m-p/310529#M56379</guid>
      <dc:creator>jimloughlin</dc:creator>
      <dc:date>2020-09-21T21:52:38Z</dc:date>
    </item>
  </channel>
</rss>

