cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
scottahindle
Level IV

How to add lines (specs, targets) to a histogram in graph builder while using local data filter?

I have a lot of data (> 6,000) in one column for many different products. In another column I have product name and, in total, 12 different products covering these > 6,000 data.

In graph builder I can make a basic histogram of all data and then use local data filter to see a histogram of the data only for the product selected. This works nicely but is incomplete because I want to view each histogram (for each product) in relation to target and spec values.

In attached JMP file I show an example with two products only called A and B, 50 values each.

As I move through each product using the local data filter I would like that each histogram displays vertical lines to represent the specs, target and declared values. An example is in the attached PNG file.

Can I use graph builder without JSL to create the histogram picture I want?

Or, must I go more complicated and use e.g. scripting to create new reference lines for each product as I navigate through using the local data filter? (Each product in my data has different spec values, different target values etc...)

Any ideas on how to do this in a simple way would be great and appreciated. I could script it, but if there's an easier I'd rather follow the simpler path.

Thanks.

4 REPLIES 4
txnelson
Super User

Re: How to add lines (specs, targets) to a histogram in graph builder while using local data filter?

JMP has a built in feature that will automatically display Spec Limits, LSL, Target & USL, on most charts, if the Spec Limits column property for each column is populated.  JMP also has a platform called "Manage Spec Limits" that allows one to take limits from a data table and populate the Spec Limits column property for the various columns in a data table.  The limits are of course saved with the data table when the table is saved to one's hard drive.  So you only have to populate the limits once.  The issue with your data, is that it is not in separate columns.  So to use this method, you will have to use Tables==>Split to separate each product into a separate column.  Easily done.  Then a simple Tables==>Summary grouping by Product, and adding a new column to the resulting data table you will have a limits table that using "Manage Spec Limits" platform will allow you to populate all of the columns in the data table with the limits from the limits table.  Then when you run your Graph Builder, the limits will automatically appear on every histogram.  histo.PNG

I have attached my data table, with an embedded script that produces the histograms, and also a copy of a limits table that can be used as a model for your needs.

 

Jim
scottahindle
Level IV

Re: How to add lines (specs, targets) to a histogram in graph builder while using local data filter?

Thanks, Jim, as always for your helpful comments.

Note, that in my case I want to deviate away from the usual column property of "spec limits" that allows me to work with LSL, Target and USL because I have FOUR reference lines of interest. Using the histogram I want to assess the situation vs. these four lines.

 

I am currently building on your file to script the solution so for each histogram I add four reference lines and make sure the min/max values on the axis are appropriate. This works well but I was wondering if there is a simpler way to manage this using graph builder where I could tweak the Elements e.g. Line and Histogram and use the data filter to switch between product. If so, I would have thought a JSL-free solution could have been forthcoming.

If you've any further thoughts please let me know.

Boaz
Level I

Re: How to add lines (specs, targets) to a histogram in graph builder while using local data filter?

can also pull limits from a predefined table and define them with jsl (example from "scripting help"):

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Cities.jmp" );
obj = dt << Process Capability(
    Process Variables( :OZONE, :CO, :SO2, :NO ),
    Spec Limits( Import Spec Limits( "$SAMPLE_DATA/CitySpecLimits.jmp" ) )
);
obj << Save Spec Limits as Column Properties;

Re: How to add lines (specs, targets) to a histogram in graph builder while using local data filter?

Just adding to @txnelson , he is changing the 'filtering' process from rows with a Data Filter to columns with the Column Switcher. You can add a Column Switcher from the red triangle in Graph Builder.