Choose Language Hide Translation Bar
Highlighted
robust1972
Level IV

how to do floor plan within JMP

What I intend to achieve is draw a rectangle fill with rectangles with difference sizes. I attached the data. Any helps or hints will be very appreciated, Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
txnelson
Super User

Re: how to do floor plan within JMP

Here is a simple script to do what you want

floor.PNG

Names Default To Here( 1 );
dt = Data Table( "floor plan map data" );

New Window( "floor plan",
	Graph Box(
		X Scale( -20000, 40000 );
		Y Scale( -20000, 40000 );
	
		For( i = 1, i <= N Rows( dt ), i++,
			Rect(
				:Name( "Center X" )[i] - :Size_X[i] / 2,
				:Name( "Center Y" )[i] + :Size_Y[i] / 2,
				:Name( "Center X" )[i] + :Size_X[i] / 2,
				:Name( "Center Y" )[i] - :Size_Y[i] / 2
			)
		);
	)
);
Jim

View solution in original post

8 REPLIES 8
Highlighted
mlo1
Level III

Re: how to do floor plan within JMP

There was a talk on this topic at a User meeting: Benutzerdefinierte Karten für nicht-geografische Daten 

 

Highlighted
txnelson
Super User

Re: how to do floor plan within JMP

Here is a simple script to do what you want

floor.PNG

Names Default To Here( 1 );
dt = Data Table( "floor plan map data" );

New Window( "floor plan",
	Graph Box(
		X Scale( -20000, 40000 );
		Y Scale( -20000, 40000 );
	
		For( i = 1, i <= N Rows( dt ), i++,
			Rect(
				:Name( "Center X" )[i] - :Size_X[i] / 2,
				:Name( "Center Y" )[i] + :Size_Y[i] / 2,
				:Name( "Center X" )[i] + :Size_X[i] / 2,
				:Name( "Center Y" )[i] - :Size_Y[i] / 2
			)
		);
	)
);
Jim

View solution in original post

Highlighted
robust1972
Level IV

Re: how to do floor plan within JMP

Thanks Jim!
I did not run properly on my PC. Did you post part of the script only?
Highlighted
txnelson
Super User

Re: how to do floor plan within JMP

I apparently posted the wrong script.....

 

I have corrected the script

Jim
Highlighted
robust1972
Level IV

Re: how to do floor plan within JMP

Hi Jim,

Do you think it is possible to label the rectangles with the text in column contains "a, b, c..."

Thanks in advance!

Highlighted
txnelson
Super User

Re: how to do floor plan within JMP

The JMP Graphic primitives are a very complete graphing environment, so of course you can add text.  Look in JMP Scripting Index in the Graphics Functions.  There you will find the Text() function

Jim
Highlighted
robust1972
Level IV

Re: how to do floor plan within JMP

thanks!
Highlighted

Re: how to do floor plan within JMP

This discussion might help, too.

Learn it once, use it forever!
Article Labels

    There are no labels assigned to this post.