cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
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
arati_mejdal
Level XI

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.

arati_mejdal
Level XI

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/


arati_mejdal
Level XI

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 ...

arati_mejdal
Level XI

Re: Ways to draw a heart in JMP?

Very cute! Thanks, Mandy!

Read the JMP Blog: jmp.com/blog

Recommended Articles