cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. EST on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
miguello
Level VII

How to draw a polygon with outline?

I have a piece of script that draws a polygon.

It has semi-transparent fill, but I'd rather have just line outline. How do I do that?

	framebox << Add Graphics Script(
		Transparency( 0.5 );
		Fill Color("Green");
		Polygon( {246, 37}, {246, 437}, {772, 437}, {772, 37} );
                //Command for an outline?
	);
3 REPLIES 3

Re: How to draw a polygon with outline?

What do you get with this version:

 

framebox << Add Graphics Script(
	Polygon( {246, 37}, {246, 437}, {772, 437}, {772, 37} );
);
miguello
Level VII

Re: How to draw a polygon with outline?

I'm getting dark violet polygon, no outline.
I think I'll just use Line(); instead.

Re: How to draw a polygon with outline?

Sorry, I forgot that the Polygon() graphics function renders filled shapes. Use Line() function instead.

 

Names Default to Here( 1 );

New Window( "Draw My Polygon",
	Outline Box( "Polygon",
		Graph Box(
			Line(
				{ 10, 10 },
				{ 50, 10 },
				{ 90, 50 },
				{ 50, 90 },
				{ 10, 10 }
			)
		)
	)
);

Recommended Articles