In this video, we show how to create bar charts and mosaic plots using Distribution, Graph Builder, and Fit Y by X. We use the Chemical Manufacturing data, which has a categorical variable, Performance, with two values, Accept and Reject. Rejected batches did not have a yield > 80%.
We use bar charts and mosaic plots to compare the performance for three vessel sizes: 500, 750, and 2000.
To start, we select Distribution from the Analyze menu.
The variable Vessel Size is grouped with other variables. To display the variables in this group, we click the gray icon next to Vessel Size etc..We select Performance and Vessel Size for Y, Columns, and click OK.
By default, JMP displays bar charts and frequency distributions. You can see that 14 of the 90 batches were rejected.
The bar charts are linked. When we click on the bar for Reject in the bar chart for Performance, you can see that many of the rejected batches had the larger vessel size.
Note that many options are available under the red triangles. For example, you can separate the bars, change the colors, add axes, and show percents or counts.
For more flexibility in creating bar charts, you can use Graph Builder under the Graph menu.
We drag Performance to the X zone. Notice that the points are colored red (rejected) and green (accepted). These colors were saved as a column property for Performance.
To change the points to a bar chart, we click the bar chart icon above the graph.
Let’s compare Performance for different vessel sizes.
As we drag Vessel Size over the graph, notice that there are many available drop zones. We drop Vessel Size in the Overlay zone. You can see that many more of the rejected batches were from the larger values of Vessel Size.
By default, JMP displays a side-by-side bar chart, but you can select many different styles. For example, you might want a stacked bar chart instead.
A special type of stacked bar chart is a mosaic plot. To create a mosaic plot, we drag Vessel Size to the Y zone and click the mosaic icon.
You can label the cells to help you interpret the plot. Here, we select Label by Percent from Cell Labeling.
Of the rejected batches, 78.6% were from a vessel size of 2000. For a different view of the same data, you can swap the variables. Here, we right-click Performance and select Swap and then Vessel Size.
Notice that this graph paints a different picture but tells the same story.
Mosaic plots are widely used when analyzing the relationship between two categorical variables. You can also generate mosaic plots, along with statistical output, in the Fit Y by X platform from the Analyze menu.
We launch the platform, and then select Performance as Y, Response, and Vessel Size as X, Factor. By default, JMP displays a mosaic plot, along with a contingency table to help you interpret the values in the plot.
Let’s look at the last row in the contingency table for Vessel Size = 2000. These values correspond to the percent of accepted and rejected batches displayed in the mosaic plot for a value of 2000 for Vessel Size.