cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
XanGregg
Staff

Ways to draw a heart in JMP?

Here's one way to do it, using parametric equations found at Math World: Heart Curve.

 

 

New Table( "heart",
	New Column( "t", Set Values( Index( 0, 2 * Pi(), 0.1 ) ) ),
	New Column( "x", Formula( 16 * Power( Sin(t), 3 ) ) ),
	New Column( "y", Formula( 13 * Cos(t) - 5 * Cos(2 * t) - 2 * Cos(3 * t) - Cos(4 * t) ) )
);

Graph Builder( Show Control Panel( 0 ), Variables( X( :x ), Y( :y ), Legend( 1 )), Elements( Formula( X, Y ) ),
	SendToReport( Dispatch( {}, "400", ScaleBox,
		{Legend Model( 1, Properties( 0, {Line Color( "Red" ), Line Width( 4 )} ) )})
	)
 );

heart1.png

 

27 REPLIES 27

Re: Ways to draw a heart in JMP?

As Valentine's Day approaches I was reminded of this fun thread. I wonder if there are any new ways to do this in the last two years? Please share them here, and your JMP valentine could be featured on our social media channels -- thanks!

Read the JMP Blog: jmp.com/blog

Re: Ways to draw a heart in JMP?

This way of drawing a heart isn't new, but making it interactive with the help of JMP Public is new. 

Press the play button and sliders at the bottom and use the menu beside 'Animated Heart' to change bubbleplot settings. See it on public.JMP.com.

Re: Ways to draw a heart in JMP?

This is great -- thanks, John!

Read the JMP Blog: jmp.com/blog
ms
Super User (Alumni) ms
Super User (Alumni)

Re: Ways to draw a heart in JMP?

Time has created many shapes on Earth's surface. Here's a hearty one. There must be more out there?

nw = New Window("Galešnjak Island", Graph Box());
nw[AxisBox(1)] << Scale("Geodesic") << Min(43.9761119) << Max(43.9806944);
nw[AxisBox(2)] << Scale("Geodesic") << Min(15.379375) << Max(15.387375);
nw[framebox(1)] << Background Map(Images("street map service"));

Heart_Island.jpg

Re: Ways to draw a heart in JMP?

The Boldt Castle is on Heart Island. http://www.boldtcastle.com/visitorinfo/


Re: Ways to draw a heart in JMP?

This is wonderful!

Read the JMP Blog: jmp.com/blog

Re: Ways to draw a heart in JMP?

dt = Open("$SAMPLE_DATA/Big Class.jmp");
dt << colorByColumn(:sex);
dt<<New Column( "Heart Column",
              Expression,
              "None",
              Formula(
                     Text Box(
                           "♡",
                           <<FontColor( If( :sex == "F", "RED", "BLUE" ) ),
                           <<setFontSize( 30 )
                     ) << getpicture
              ),
              Use for Marker
       );
dt << Graph Builder(
	Size( 845, 669 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :age ), Group X( :sex ) ),
	Elements( Points( X, Y, Legend( 16 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Set Text( "Height by Age/Gender" )}
		),
		Dispatch( {}, "X title", TextEditBox, {Set Text( "Height" )} ),
		Dispatch( {}, "Y title", TextEditBox, {Set Text( "Age" )} )
	)
);


 Picture1a.png

 

Hearts ...Hearts ...

Re: Ways to draw a heart in JMP?

Very cute! Thanks, Mandy!

Read the JMP Blog: jmp.com/blog