cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

Discussions

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

Changing bin size for Group X variable for each level in graph builder

I have created a chart in graph builder using jsl script below.

Data Table("Untitled 11967")<<Graph Builder(
		Automatic Recalc( 0 ),
		Variables( X( :var1 ), Y( :var2 ), Group X(:var3), Group Y(:var4)));

Here var3 is numeric continuous and var4 is numeric nominal. var4 just counts the number of times var3 value is occurring.

How can I change the number of levels for Group X variable in JSL? Also how can I set the binning for each level? Image below shows 3 levels which I set manually by right clicking on var3 and setting No of Level value to 3. But I want 3 levels 0-10, 10-15, 15-40 to group the counts in var4. How can I script it in JSL?

rverma_0-1581790564049.png

rverma_3-1581791328068.png

 

Any guidance will be highly appreciated.

 

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Thierry_S
Super User

Re: Changing bin size for Group X variable for each level in graph builder

Hi,
A possible work around would be to create a new ordinal character column with the specific bins you need with a formula (see below)

If(
	:Var3 <= 10, "0-10",
	10 < :Var3 <= 15, "11-15",
	15 < :Var3 <= 40, "16-40",
	"N/A"
)



Of note, you cannot have bin boundaries that overlap like suggested (i.e. 0-10 and 10-15)

Thierry R. Sornasse

View solution in original post

1 REPLY 1
Thierry_S
Super User

Re: Changing bin size for Group X variable for each level in graph builder

Hi,
A possible work around would be to create a new ordinal character column with the specific bins you need with a formula (see below)

If(
	:Var3 <= 10, "0-10",
	10 < :Var3 <= 15, "11-15",
	15 < :Var3 <= 40, "16-40",
	"N/A"
)



Of note, you cannot have bin boundaries that overlap like suggested (i.e. 0-10 and 10-15)

Thierry R. Sornasse

Recommended Articles