Parallel Plot
Example 1
Summary: Visualizes a parallel plot of fatty acid composition in a specific region, utilizing local data filtering to focus on the 'South' region.
Code:
// Parallel Plot
// Open data table
dt = Open("data_table.jmp");
// Parallel Plot
Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y(
:palmitic, :palmitoleic, :stearic,
:oleic, :linoleic, :linolenic,
:arachidic, :eicosenoic
),
Local Data Filter(
Location( {126, 115} ),
Add Filter(
columns(
:Subregion, :Region
),
Where( :Region == "South" ),
Display(
:Subregion,
Size( 210, 172 ),
List Display
)
),
Mode(
Select( 0 ),
Show( 1 ),
Include( 1 )
)
),
SendToReport(
Dispatch( {}, "Parallel Coord",
FrameBox,
{Frame Size( 719, 250 )}
)
)
);
Code Explanation:
- Open data table.
- Create parallel plot.
- Set uniform scaling.
- Disable center at zero.
- Define Y variables.
- Add local data filter.
- Set filter location.
- Add filter for Subregion and Region.
- Filter where Region is South.
- Display Subregion in list format.
Example 2
Summary: Visualizes a parallel plot to compare math and verbal scores across multiple years, using the Open data table function and the Parallel Plot platform.
Code:
// Parallel Plot
// Open data table
dt = Open("data_table.jmp");
// Parallel Plot
Parallel Plot(
Y(
:"2004 Verbal"n, :"2004 Math"n,
:"2003 Verbal"n, :"2003 Math"n,
:"2002 Verbal"n, :"2002 Math"n,
:"2001 Verbal"n, :"2001 Math"n,
:"1999 Verbal"n, :"1999 Math"n,
:"1994 Verbal"n, :"1994 Math"n,
:"1997 Verbal"n, :"1997 Math"n,
:"1992 Verbal"n, :"1992 Math"n
)
);
Code Explanation:
- Open table.
- Create parallel plot.
- Set Y variables.
Example 3
Summary: Opens a data table and generates a parallel plot with multiple Y variables, adjusting report settings and frame size, while rotating tick labels.
Code:
// Parallel Plot
// Open data table
dt = Open("data_table.jmp");
// Parallel Plot
Parallel Plot(
Y(
:Lot Acceptance, :Disso,
:API Particle Size, :Mill Time,
:Screen Size,
:Mag. Stearate Supplier,
:Lactose Supplier,
:Sugar Supplier, :Talc Supplier,
:Blend Time, :Blend Speed,
:Compressor, :Force,
:Coating Supplier,
:Coating Viscosity, :Inlet Temp,
:Exhaust Temp, :Spray Rate,
:Atomizer Pressure
),
SendToReport(
Dispatch( {}, "Parallel Coord",
FrameBox,
Frame Size( 1082, 462 )
),
Dispatch( {}, "", NomAxisBox,
Rotated Tick Labels( 1 )
)
)
);
Code Explanation:
- Open data table.
- Create parallel plot.
- Set Y variables.
- Adjust report settings.
- Set frame size.
- Rotate tick labels.
Example 4
Summary: Creates a parallel plot with customized report settings, utilizing uniform scaling and binomial probability calculations.
Code:
dt = Open("data_table.jmp");
Parallel Plot(
Scale Uniformly( 1 ),
Center at zero( 0 ),
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
SendToReport( Dispatch( {}, "2", ScaleBox, {Format( "Custom", Formula( Round( Binomial Probability( 0.5, 10, value ), 2 ) ), 12 )} ) )
);
Code Explanation:
- Open data table;
- Create Parallel Plot.
- Set uniform scaling.
- Disable center at zero.
- Define Y variables.
- Customize report settings.
- Format scale box.
- Apply custom formula.
- Use binomial probability.
- Round values to 2 decimal places.
Example 5
Summary: Creates a parallel plot with uniform scaling and centering at zero, featuring four variables: hist0, hist1, hist3, and hist5.
Code:
Open("data_table.jmp");
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :hist0, :hist1, :hist3, :hist5 ) );
Code Explanation:
- Open data table;
- Create parallel plot.
- Scale uniformly set to 0.
- Center at zero set to 0.
- Include hist0 variable.
- Include hist1 variable.
- Include hist3 variable.
- Include hist5 variable.
Example 6
Summary: Creates a parallel plot with uniform scale, selecting Y variables and enabling reversing checkboxes.
Code:
Open("data_table.jmp");
Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y( :hist0, :hist1, :hist3, :hist5 ),
Show Reversing Checkboxes( 1 ),
Reversed( hist0, hist1, hist3, hist5 )
);
Code Explanation:
- Open data table;
- Create parallel plot.
- Set scale uniformly.
- Do not center at zero.
- Select Y variables.
- Enable reversing checkboxes.
- Reverse selected variables.
Example 7
Summary: Creates a parallel plot object with uniform scaling and centering at zero, featuring Sepal length, Sepal width, Petal length, and Petal width variables.
Code:
Open("data_table.jmp");
obj = Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) );
Code Explanation:
- Open data table;
- Create parallel plot object.
- Set scale uniformly to 0.
- Set center at zero to 0.
- Define Y variables: Sepal length, Sepal width, Petal length, Petal width.
Example 8
Summary: Creates a parallel plot object with uniform scaling, centered at zero, and customized Y variables, while sending report settings and adjusting frame size.
Code:
dt under test = Open("data_table.jmp");
obj = Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y( :palmitic, :palmitoleic, :stearic, :oleic, :linoleic, :linolenic, :arachidic, :eicosenoic ),
SendToReport( Dispatch( {}, "Parallel Coord", FrameBox, {Frame Size( 719, 250 )} ) )
);
Code Explanation:
- Open data table;
- Create parallel plot object.
- Scale axes uniformly.
- Center axes at zero.
- Set Y variables.
- Send report settings.
- Adjust frame size.
Example 9
Summary: Creates a parallel plot with uniform scaling and centering at zero, including hist0, hist1, hist3, and hist5 on the Y-axis.
Code:
dt under test = Open("data_table.jmp");
obj = Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :hist0, :hist1, :hist3, :hist5 ) );
Code Explanation:
- Open data table.
- Create Parallel Plot object.
- Set uniform scaling off.
- Set centering at zero off.
- Include hist0 in Y-axis.
- Include hist1 in Y-axis.
- Include hist3 in Y-axis.
- Include hist5 in Y-axis.
Example 10
Summary: Creates a parallel plot with filtered data, selecting rows where Species is 'setosa' and excluding them from analysis.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
Local Data Filter(
Add Filter( columns( :Sepal length ), Where( :Sepal length >= 5.0 & :Sepal length <= 6.5 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
),
);
dt << Select Where( :Species == "setosa" );
dt << Exclude();
rpt = Report( obj );
Code Explanation:
- Open data table;
- Create Parallel Plot object.
- Set uniform scaling.
- Set center at zero.
- Define Y variables.
- Add local data filter.
- Set filter conditions.
- Configure filter mode.
- Select rows where Species is setosa.
- Exclude selected rows from analysis.
Example 11
Summary: Creates a parallel plot with uniformly scaled and centered data, using transformed columns and grouping by concatenated values.
Code:
dt = Open("data_table.jmp");
Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y(
Transform Column( "-hist0", Formula( -:hist0 ) ),
Transform Column( "-hist1", Formula( -:hist1 ) ),
Transform Column( "-hist3", Formula( -:hist3 ) ),
Transform Column( "-hist5", Formula( -:hist5 ) )
),
X( Transform Column( "Last[drug]", Character, Formula( Word( -1, :drug ) ) ) ),
By( Transform Column( "Concatenate[dep1]", Character, Formula( Concat( :dep1 ) ) ) )
);
Code Explanation:
- Open data table.
- Create Parallel Plot.
- Scale uniformly set to 0.
- Center at zero set to 0.
- Add transformed column "-hist0".
- Add transformed column "-hist1".
- Add transformed column "-hist3".
- Add transformed column "-hist5".
- Set X-axis to last word of "drug".
- Group by concatenated "dep1".
Example 12
Summary: Creates a parallel plot report, grouping data by 'dep1' and scaling uniformly.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot( Y( :hist0, :hist1, :hist3, :hist5 ), X( :drug ), Scale Uniformly, Center at zero, By( :dep1 ) );
rpt = obj << report;
rpt = rpt << parent;
Code Explanation:
- Open data table.
- Create parallel plot object.
- Set Y variables.
- Set X variable.
- Scale uniformly.
- Center at zero.
- Group by variable.
- Generate report.
- Get parent frame.
- Store report reference.
Example 13
Summary: Creates a parallel plot object with Sepal length, width, Petal length, and width variables.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) );
Code Explanation:
- Open data table;
- Create Parallel Plot object.
- Set Y variables: Sepal length, width.
- Add Petal length, width to Y.
Example 14
Summary: Creates a parallel plot object with uniform scaling, featuring Sepal length, Sepal width, Petal length, and Petal width from a data table.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) );
Code Explanation:
- Open data table;
- Create parallel plot object.
- Set scale uniformly.
- Do not center at zero.
- Add Sepal length to Y.
- Add Sepal width to Y.
- Add Petal length to Y.
- Add Petal width to Y.
Example 15
Summary: Creates a parallel plot object in JMP, setting Y variables for Sepal length, width, Petal length, and width, and X variable for Species.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot( Y( :Sepal length, :Sepal width, :Petal length, :Petal width ), X( :Species ) );
Code Explanation:
- Open data table;
- Create parallel plot object.
- Set Y variables: Sepal length, width, Petal length, width.
- Set X variable: Species.
Example 16
Summary: Creates a parallel plot to visualize height and weight by age, grouped by sex, from a data table.
Code:
dt = Open("data_table.jmp");
obj = Parallel Plot( Scale Uniformly( 1 ), Y( :height, :weight ), X( :age ), By( :sex ) );
Code Explanation:
- Open data table.
- Create parallel plot object.
- Set scale uniformly.
- Add height and weight to Y axis.
- Add age to X axis.
- Group by sex.
Parallel Plot using Select Rows
Summary: Creates a parallel plot from a specific subset of rows in a data table, with uniform scaling and customized frame size.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( {30, 62, 140} );
Parallel Plot(
Scale Uniformly( 0 ),
Center at zero( 0 ),
Y( :Sepal length, :Sepal width, :Petal length, :Petal width ),
SendToReport( Dispatch( {}, "Parallel Coord", FrameBox, {Frame Size( 463, 249 )} ) )
);
Code Explanation:
- Open data table;
- Select specific rows.
- Create parallel plot.
- Set uniform scaling.
- Disable center at zero.
- Define Y variables.
- Adjust frame size.
Parallel Plot using New Window
Example 1
Summary: Creates a parallel plot with uniform scaling for three variables: Weight, Thickness, and Purity.
Code:
Open("data_table.jmp");
New Window( "Parallel Plot",
Parallel Plot( Scale Uniformly( 1 ), Y( :Weight, :Thickness, :Purity ) ),
Parallel Plot( Scale Uniformly( 0 ), Y( :Weight, :Thickness, :Purity ) ),
);
Code Explanation:
- Open data table;
- Create new window.
- Add first parallel plot.
- Set uniform scaling.
- Select variables for plot.
- Add second parallel plot.
- Disable uniform scaling.
- Select same variables for plot.
Example 2
Summary: Creates multiple parallel plots in JMP, showcasing relationships between age, height, sex, and weight variables.
Code:
Open("data_table.jmp");
New Window( "Parallel Plot",
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :age, :height, :sex, :weight ) ),
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :age, :sex, :height, :weight ) ),
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :height, :weight, :age, :sex ) ),
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :age, :sex, :height, :weight, :age, :sex, :height, :weight ) ),
Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :age, :height, :sex, :weight ) ),
Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :age, :sex, :height, :weight ) ),
Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :height, :weight, :age, :sex ) ),
Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :age, :sex, :height, :weight, :age, :sex, :height, :weight ) ),
);
Code Explanation:
- Open data table.
- Create new window.
- Add first parallel plot.
- Add second parallel plot.
- Add third parallel plot.
- Add fourth parallel plot.
- Add fifth parallel plot.
- Add sixth parallel plot.
- Add seventh parallel plot.
- Add eighth parallel plot.
Parallel Plot using Close data grid
Summary: Runs data visualization by creating a parallel plot with uniform scaling and centering, highlighting columns tagged as 'attributes'.
Code:
dt = Open("data_table.jmp");
dt << Close data grid( 1 );
dt:Coating Supplier << Set Property( "Tags", {"attributes"} );
dt:Lot Acceptance << Set Property( "Tags", {"attributes"} );
Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( Column Tag( "attributes" ) ) );
Code Explanation:
- Open data table.
- Close data grid.
- Set tags for Coating Supplier.
- Set tags for Lot Acceptance.
- Create parallel plot.
- Uniform scale on axes.
- Center plot at zero.
- Display columns with "attributes" tag.
Parallel Plot using Color or Mark by Column
Summary: Creates a parallel plot report by coloring rows based on the 'drug' column, and combining it with the data table in a JMP application.
Code:
dt = Open("data_table.jmp");
dt << Color or Mark by Column( :drug );
pp = dt << Parallel Plot( Scale Uniformly( 0 ), Center at zero( 0 ), Y( :hist0, :hist1, :hist3, :hist5 ), X( :dep1 ) );
If( Host is( "Windows" ),
Main Menu( "File:New:Application" );
windows = Get Window List();
closeMe = windows[N Items( windows )];
closeMe << Close Window;
);
app = JMP App();
app << Set Name( "Parallel Plot App" );
app << Combine Windows( {pp << Report, dt} );
(app << Get Modules)[1] << Set Window Title( "My Parallel Plot Report" );
app << Run;
Code Explanation:
- Open data table;
- Color rows by "drug" column.
- Create parallel plot.
- Check if host is Windows.
- Open new application.
- Get window list.
- Close last opened window.
- Create new JMP app.
- Set app name to "Parallel Plot App".
- Combine plot and data table in app.
Parallel Plot using Set Values
Summary: Creates and analyzes a parallel plot from a data table, setting missing value codes and redoing the analysis.
Code:
dt = Open("data_table.jmp");
:Sepal length << Set Values( {1, 1, 1, 1, 1} );
obj = Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) );
rpt1 = obj << Report;
expr1 = rpt1 << Get Journal;
p = "values(1,3.5,1.4,0.2,1,";
ans1 = Pat Match( expr1, p );
:Sepal length << Set Property( "Missing Value Codes", 1 );
obj2 = obj << Redo Analysis;
rpt2 = obj2 << Report;
expr2 = rpt2 << Get Journal;
p = "values(.,3.5,1.4,0.2,.,";
ans2 = Pat Match( expr2, p );
Code Explanation:
- Open data table;
- Set Sepal length values.
- Create Parallel Plot.
- Generate first report.
- Extract first journal.
- Define pattern for match.
- Match pattern in first journal.
- Set missing value code for Sepal length.
- Redo analysis with missing values.
- Generate second report.
Parallel Plot using Set Property
Summary: Creates a parallel plot object with uniform scaling and centering at zero, using Y variables Sepal length, Sepal width, Petal length, and Petal width, from the data table.
Code:
dt = Open("data_table.jmp");
:Species << Set Property( "Missing Value Codes", "setosa" );
obj = Parallel Plot( Scale Uniformly( 1 ), Center at zero( 0 ), Y( :Sepal length, :Sepal width, :Petal length, :Petal width ) );
rpt = obj << report;
Code Explanation:
- Open data table;
- Set missing value code for Species.
- Create parallel plot object.
- Scale plot uniformly.
- Center plot at zero.
- Specify Y variables.
- Generate report object.