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
cchiat
Level I

How to hide x-variables with no data when Overlay with Boxplot for Legend.

Hi all,

 

I have two levels in x-axis and i am trying to color legend my boxplot using the first level. The only way i found that can do that is using Overlay but the boxplots would be distorted because each distinct grouping will be split into n areas of level 1.

 

For better illustration, i am using Animals.jmp as example

x-axis 1st level - Species

x-axis 2nd level - subject

y-axis - miles

 

Graph below does not have legend yet. I would like my boxplots to be arranged in such order.

image.png

 

 

Graph below is when i Overlay species. Now you can see boxplots for COYOTE were shifted slightly to the left and FOX were shifted to the right. This is because each axis is seperated into two areas of COYOTE and FOX, when the group is COYOTE it will move to the COYOTE area and leave the FOX area empty and vice versa. The result is worse when you have more type of species..
image.png

 

Therefore, my question is, is there anyway to hide group with no data in overlay?

I am not sure if i am asking the question correctly since im new with JMP, sorry for that.

 

I do know i can use one level of x-axis with "subject" and overlay on "species", but the arrangement would not be what i wanted in my report. See example below..

image.png

 

Thanks in advance! :)

2 REPLIES 2
KarenC
Super User (Alumni)

Re: How to hide x-variables with no data when Overlay with Boxplot for Legend.

Hi,

 

So what is happening with the box plots when you use the overlay is that they are "overlaid" on the data. If you added data points to your plot you would see that you would have data pointswith box plots sort of next to the data points.  Color by would be a better option - if you have data points they are colored using the color zone on graph builder. However, the box plots stay black.  One work-around is to right click on the graph and select customize. There you will be able to click on each box plot and change the line color for the box plot.

 

Karen

cchiat
Level I

Re: How to hide x-variables with no data when Overlay with Boxplot for Legend.

Thanks Karen,

Seems like i have to write a script to color the box plots.. Is there anyway to add text in anywhere in graph builder using JSL? I wanted to create my own legend with colored texts, the best is at legend area.