Contour Plot
Example 1
Summary: Visualizes a contour plot from the data table, displaying amplitude values with contours and boundary lines.
Code:
// Contour Plot
// Open data table
dt = Open("data_table.jmp");
// Contour Plot
Contour Plot(
X( x, y ),
Y( :Amplitude ),
Show Contours( 1 ),
Show Boundary( 1 ),
Fill Areas( 1 )
);
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Show contours.
- Show boundary.
- Fill areas.
Example 2
Summary: Visualizes a contour plot from data in a table, displaying contours and boundaries with filled areas.
Code:
// Contour Plot
// Open data table
dt = Open("data_table.jmp");
// Contour Plot
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Contours( 1 ),
Show Boundary( 1 ),
Fill Areas( 1 )
);
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Show contours.
- Show boundary.
- Fill areas.
Example 3
Summary: Creates a contour plot from a data table, specifying X and Y variables, hiding data points, disabling area filling and labeling, and defining a contour range with 7 intervals.
Code:
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) )
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area filling.
- Disable contour labeling.
- Apply no transformation.
- Define contour range.
- Specify number of contours.
Example 4
Summary: Creates a contour plot with custom specifications, including data points, contour labels, and color scheme.
Code:
dt under test = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 0 ),
Label Contours( 1 ),
Reverse Colors( 1 ),
Transform( "None" ),
Show Boundary( 0 ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Show Data Points, Show Contours, Label contours, Reverse Colors" )} ),
Dispatch( {}, "Contour Plot Graph", FrameBox, {DispatchSeg( Contour Seg( 1 ), {Fill Color( {252, 11, 11} )} )} )
)
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Show data points.
- Disable fill areas.
- Enable label contours.
- Reverse color scheme.
- Set no transformation.
- Hide boundary lines.
Example 5
Summary: Creates a contour plot from a data table, fitting it to the window and setting names default to here.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Auto" );
Names Default To Here( 1 );
Code Explanation:
- Open data table;
- Create contour plot.
- Fit contour to window.
- Set names default to here.
Example 6
Summary: Creates a contour plot object from a data table, with fit to window option enabled and global name resolution disabled.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "On" );
Names Default To Here( 1 );
Code Explanation:
- Open data table;
- Create contour plot object.
- Set fit to window option.
- Disable global name resolution.
Example 7
Summary: Creates a contour plot from a data table, setting X and Y variables while disabling fit to window.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Off" );
Names Default To Here( 1 );
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Turn off fit to window.
- Reset name default settings.
Example 8
Summary: Creates and customizes contour plots and graph builders in JMP, allowing users to visualize data with varying fit-to-window options.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Auto" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "On" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Off" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "Auto" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "On" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "Off" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "Maintain Aspect Ratio" );
Code Explanation:
- Set names default.
- Open data_table data
- Create contour plot.
- Fit plot to window automatically.
- Reset names default.
- Open data_table data
- Create contour plot.
- Fit plot to window on.
- Reset names default.
- Open data_table data
- Create contour plot.
- Fit plot to window off.
- Reset names default.
- Open data_table data
- Create graph builder.
- Set size and hide control panel.
- Define variables and elements.
- Fit plot to window automatically.
- Reset names default.
- Open data_table data
- Create graph builder.
- Set size and hide control panel.
- Define variables and elements.
- Fit plot to window on.
- Reset names default.
- Open data_table data
- Create graph builder.
- Set size and hide control panel.
- Define variables and elements.
- Fit plot to window off.
- Reset names default.
- Open data_table data
- Create graph builder.
- Set size and hide control panel.
- Define variables and elements.
- Fit plot to window maintaining aspect ratio.
Example 9
Summary: Creates and customizes contour plots in JMP, allowing for interactive exploration of data.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Auto" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "On" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Fit to Window( "Off" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "Auto" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "On" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
obj << Fit to Window( "Off" );
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Graph Builder(
Size( 522, 452 ),
Show Control Panel( 0 ),
Variables( X( :Z ), Y( :X ), Y( :Y, Position( 1 ) ) ),
Elements( Contour( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
Code Explanation:
- Open data table;
- Create contour plot.
- Fit plot to window (auto).
- Reset names default.
- Repeat steps 1-3.
- Fit plot to window (on).
- Reset names default.
- Repeat steps 1-3.
- Fit plot to window (off).
- Reset names default.
Example 10
Summary: Creates a contour plot with specific contour specifications and data point display, while saving the journal to a temporary location.
Code:
dt = Open("data_table.jmp");
cp = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 0 ),
Label Contours( 1 ),
Reverse Colors( 1 ),
Transform( "None" ),
Show Boundary( 0 ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Show Data Points, Show Contours, Label contours,
Reverse Colors" )} ),
Dispatch( {}, "Contour Plot Graph", FrameBox, {DispatchSeg( Contour Seg( 1 ), {Fill Color( {252, 11, 11} )} )} )
)
);
cp << journal();
Current Journal() << save journal( "$TEMP\temp.jrn" );
Current Journal() << close window();
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Show data points.
- Do not fill areas.
- Label contours.
- Reverse colors.
- Set contour specifications.
- Save journal to temp location.
Example 11
Summary: Creates a contour plot with custom specifications, including data points, contour labels, and color reversal.
Code:
dt under test = Open("data_table.jmp");
cp = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 0 ),
Label Contours( 1 ),
Reverse Colors( 1 ),
Transform( "None" ),
Show Boundary( 0 ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Show Data Points, Show Contours, Label contours,
Reverse Colors" )} ),
Dispatch( {}, "Contour Plot Graph", FrameBox, {DispatchSeg( Contour Seg( 1 ), {Fill Color( {252, 11, 11} )} )} )
)
);
cp << journal();
Current Journal() << save journal( "$TEMP\temp.jrn" );
Current Journal() << close window();
Open( "$TEMP\temp.jrn" );
Code Explanation:
- Open data table;
- Create contour plot.
- Set X and Y axes.
- Set Z as Y variable.
- Show data points.
- Do not fill areas.
- Label contours.
- Reverse colors.
- Save report.
- Save journal as temp.jrn.
Example 12
Summary: Creates a contour plot from data in 'data_table.jmp', specifying contour limits and area filling, while hiding data points and disabling contour labels.
Code:
Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours( Min( -5 ), Max( 10 ), N( 5 ) )
);
Code Explanation:
- Open data_table data
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Enable area filling.
- Disable contour labels.
- Apply no transformation.
- Specify contour limits.
- Define number of contours.
Example 13
Summary: Creates a contour plot from a data table, specifying contour levels and hiding data points.
Code:
Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours( Min( -5 ), Max( 10 ), N( 5 ) )
);
obj << Redo Analysis;
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables.
- Set Y variable.
- Hide data points.
- Fill contour areas.
- Disable contour labels.
- Apply no transformation.
- Specify contour levels.
- Redo analysis.
Example 14
Summary: Creates and manipulates a contour plot in JMP, specifying custom contour levels and saving/retrieving the resulting contours.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt2 = obj << Save Contours;
obj << Revert Contours;
obj << Retrieve Contours( dt2 );
Code Explanation:
- Open data table;
- Create contour plot.
- Specify contour levels.
- Save contours to dt2.
- Revert to original contours.
- Retrieve saved contours.
Example 15
Summary: Creates and customizes a contour plot from a data table, specifying contour limits and defining specific contours.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt3 = obj << Save Contours;
obj << Close Window;
Code Explanation:
- Open data table;
- Create contour plot.
- Specify contour limits.
- Define specific contours.
- Save contour data.
- Close contour window.
Example 16
Summary: Creates and manipulates contour plots in JMP, specifying custom contour levels and saving/retrieving contours to/from a data table.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt2 = obj << Save Contours;
obj << Revert Contours;
obj << Retrieve Contours( dt2 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt3 = obj << Save Contours;
obj << Close Window;
dt << Contour Plot( X( :X, :Y ), Y( :Z ), Retrieve From( dt3 ) );
Code Explanation:
- Set default names scope.
- Open data table;
- Create contour plot.
- Specify contour levels.
- Save contours to new table.
- Revert to original contours.
- Retrieve saved contours.
- Reopen "data_table.jmp".
- Create another contour plot.
- Specify contour levels again.
- Save contours to another table.
- Close the contour plot window.
- Create final contour plot with retrieved contours.
Example 17
Summary: Creates and customizes a contour plot in JMP, specifying contour limits and saving contours to a data table.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt2 = obj << Save Contours;
obj << Revert Contours;
obj << Retrieve Contours( dt2 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
dt3 = obj << Save Contours;
obj << Close Window;
Code Explanation:
- Open data table;
- Create contour plot.
- Specify contour limits.
- Save contours to dt2.
- Revert contour settings.
- Retrieve contours from dt2.
- Open data table;
- Create contour plot.
- Specify contour limits.
- Save contours to dt3 and close window.
Example 18
Summary: Creates a contour plot with specified ranges and contours from a data table in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours(
Min( -4 ),
Max( 8 ),
N( 4 ),
Contour( 1, -4, -2768895 ),
Contour( 2, 0, -7700704 ),
Contour( 3, 4, -12632256 ),
Contour( 4, 8, -14575206 ),
Contour( 5, 8, -16517899 )
);
Code Explanation:
- Open data table;
- Create contour plot.
- Specify contour range.
- Set minimum value to -4.
- Set maximum value to 8.
- Define 4 contours.
- Set first contour at -4.
- Set second contour at 0.
- Set third contour at 4.
- Set fourth contour at 8.
Example 19
Summary: Creates and customizes a contour plot from a data table, specifying contour limits and levels.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours(
Min( -4 ),
Max( 8 ),
N( 4 ),
Contour( 1, -4, -2768895 ),
Contour( 2, 0, -7700704 ),
Contour( 3, 4, -12632256 ),
Contour( 4, 8, -14575206 ),
Contour( 5, 8, -16517899 )
);
obj << Revert Contours;
Code Explanation:
- Set default names.
- Open data table.
- Create contour plot.
- Specify contour limits.
- Define contour levels.
- Revert contour settings.
Example 20
Summary: Creates a contour plot from data in 'data_table.jmp', specifying contours with custom levels and ranges.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
Code Explanation:
- Open data_table data
- Create contour plot.
- Set X variables: X, Y.
- Set Y variable: Z.
- Specify contour range.
- Set minimum contour value.
- Set maximum contour value.
- Define number of contours.
- Set first contour level.
- Set second contour level.
- Set third contour level.
Example 21
Summary: Creates a contour plot from a data table, specifying the range and number of contours.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = dt << Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
obj << Save Contours;
Code Explanation:
- Set default names.
- Open data table;
- Create contour plot.
- Specify contour range.
- Define number of contours.
- Set first contour level.
- Set second contour level.
- Set third contour level.
- Save specified contours.
Example 22
Summary: Creates a contour plot from a data table, specifying grid and contour levels, and applying range normalization.
Code:
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Grid( [25 -5, 5 0.416666666666667, 25 -5, 5 0.416666666666667] ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) )
);
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area fill.
- Disable contour labels.
- Apply range normalization.
- Define grid specifications.
- Specify contour levels.
Example 23
Summary: Creates two contour plots from a data table, specifying X and Y variables, Z variable, grid specifications, and contour range and count.
Code:
dt = Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Grid( [25 -5, 5 0.416666666666667, 25 -5, 5 0.416666666666667] ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) )
);
Contour Plot( X( :X, :Y ), Y( :Z ), Show Contours( 1 ), Show Boundary( 1 ), Fill Areas( 1 ) );
Code Explanation:
- Open data table;
- Create contour plot.
- Set X and Y variables.
- Set Z variable.
- Hide data points.
- Disable area fill.
- Disable contour labels.
- Apply range normalization transform.
- Define grid specifications.
- Specify contour range and count.
- Create second contour plot.
- Set X and Y variables.
- Set Z variable.
- Show contours.
- Show boundary.
- Enable area fill.
Example 24
Summary: Creates a contour plot from a data table, specifying grid and contour limits, and applying range normalization.
Code:
dt = Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Grid( [25 -5, 5 0.416666666666667, 25 -5, 5 0.416666666666667] ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) )
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area filling.
- Disable contour labels.
- Apply range normalization.
- Define grid specifications.
- Specify contour limits.
Example 25
Summary: Creates a contour plot from a data table, specifying X and Y variables.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Code Explanation:
- Set default names.
- Open data table.
- Create contour plot object.
- Set X variables.
- Set Y variable.
Example 26
Summary: Creates a contour plot to visualize ozone levels, specifying contour ranges and details.
Code:
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :OZONE ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours(
Min( 0.1 ),
Max( 0.3 ),
N( 5 ),
Contour( 1, 0.1, -6714080 ),
Contour( 2, 0.15, -10001867 ),
Contour( 3, 0.2, -12632256 ),
Contour( 4, 0.25, -13078929 ),
Contour( 5, 0.3, -14373972 ),
Contour( 6, 0.3, -16517899 )
)
);
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Enable fill areas.
- Disable label contours.
- Use no transformation.
- Define contour range.
- Specify contour details.
Example 27
Summary: Creates a contour plot from a data table, specifying contours and axis visibility.
Code:
Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
Dispatch( {}, "2", ScaleBox, {Label Row( Show Major Grid( 1 ) )} )
)
);
Report( obj )[AxisBox( 1 )] << Visibility( "Collapse" );
Report( obj )[AxisBox( 2 )] << Visibility( "Collapse" );
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables to :X and :Y.
- Set Y variable to :Z.
- Hide data points.
- Disable area filling.
- Disable contour labels.
- Use no transformation.
- Define specific contours.
- Collapse X and Y axes.
Example 28
Summary: Creates a contour plot from a data table, specifying contour levels and hiding data points.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
Dispatch( {}, "2", ScaleBox, {Label Row( Show Major Grid( 1 ) )} )
)
);
Report( obj )[AxisBox( 1 )] << Visibility( "Collapse" );
Report( obj )[AxisBox( 2 )] << Visibility( "Collapse" );
obj << Journal;
Code Explanation:
- Open data table.
- Create contour plot object.
- Set X and Y variables.
- Set Z variable.
- Hide data points.
- Disable area filling.
- Disable contour labels.
- Use no transformation.
- Specify contour levels.
- Display report with grid lines.
Example 29
Summary: Creates a contour plot from a data table, specifying X and Y variables, hiding data points, disabling area fill, enabling contour labels, and configuring report legend.
Code:
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 1 ),
Transform( "None" ),
Specify Contours( Min( -4 ), Max( 8 ), N( 7 ) ),
SendToReport( Dispatch( {}, "1111", ScaleBox, {Legend Model( 1, Type( 0, 524288, Item ID( "Z", 1 ) ) )} ) )
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area fill.
- Enable contour labels.
- Apply no transformation.
- Define contour range and count.
- Configure report legend.
Example 30
Summary: Creates a contour plot from a data table, applying range normalization and customizing contour levels.
Code:
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Specify Contours( Min( 0.00195660717271321 ), Max( 2.95266928192615 ), N( 7 ) ),
SendToReport(
Dispatch( {}, "1111", ScaleBox,
{Legend Model(
1,
Type( 0, 524288, Item ID( "Z", 1 ) ),
Properties( 0, {gradient( {Scale Values( [. 1] ), Scale Type( "Log" )} )}, Item ID( "Z", 1 ) )
)}
)
)
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area fill.
- Disable contour labels.
- Apply range normalization.
- Define contour levels.
- Adjust Z scale to log.
Example 31
Summary: Creates a contour plot from a data table, displaying one contour line and filling areas between contours.
Code:
dt under test = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ), Show Contours( 1 ), Show Boundary( 1 ), Fill Areas( 1 ) );
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables to X and Y.
- Set Y variable to Z.
- Display 1 contour line.
- Display boundary lines.
- Fill areas between contours.
Example 32
Summary: Creates a contour plot with fill areas from a data table, utilizing the Jet theme.
Code:
dt = Open("data_table.jmp");
obj2 = dt << Contour Plot( X( :X, :Y ), Y( :Z ), Fill Areas( 1 ) );
DesirableTheme = "Jet";
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Enable fill areas.
- Assign theme "Jet".
Example 33
Summary: Creates a contour plot with fill areas from a data table, applying a specified color theme.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj2 = dt << Contour Plot( X( :X, :Y ), Y( :Z ), Fill Areas( 1 ) );
DesirableTheme = "Jet";
obj2 << Color Theme( DesirableTheme );
Code Explanation:
- Set default names.
- Open data table.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Enable fill areas.
- Define color theme.
- Apply color theme.
Example 34
Summary: Creates a contour plot with color theme, captures the list box, and saves it as a PNG image.
Code:
dt = Open("data_table.jmp");
cp = Contour Plot( X( :weight, :height ), Y( :height ) );
With Window Handler(
cp << Color Theme(),
Function( {window},
Show( (window << xpath( "/HeadBox/ListBox" ))[1] << save picture( "$temp\JMP-18423cp.png", png ) );
window << close window();
)
);
Code Explanation:
- Open data_table data
- Create contour plot.
- Set color theme.
- Define window handler.
- Capture color theme list box.
- Save list box as PNG.
- Close contour plot window.
Example 35
Summary: Creates and customizes a contour plot from a data table, capturing a list box element and saving the plot as a PNG file.
Code:
dt = Open("data_table.jmp");
cp = Contour Plot( X( :weight, :height ), Y( :height ) );
With Window Handler(
cp << Color Theme(),
Function( {window},
Show( (window << xpath( "/HeadBox/ListBox" ))[1] << save picture( "$temp\JMP-18423cp.png", png ) );
window << close window();
)
);
Open( "$temp\JMP-18423cp.png" );
Code Explanation:
- Open data table;
- Create contour plot.
- Define window handler.
- Apply color theme.
- Capture list box element.
- Save plot as PNG.
- Close plot window.
- Open saved PNG file.
Example 36
Summary: Creates a contour plot from a data table, with customizable scales and labels.
Code:
dt = Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Custom", Formula( Char( value * 1760 ) || " (yd)" ), 12 )} ),
Dispatch( {}, "2", ScaleBox, {Format( "Custom", Formula( Char( value * 1.61 ) || " (km)" ), 10 )} )
)
);
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables: X, Y.
- Set Y variable: Z.
- Show data points.
- Fill contour areas.
- Label contours.
- Apply range normalization.
- Specify contour levels and values.
- Customize report scales.
Example 37
Summary: Creates a contour plot to visualize OZONE and CO data, grouped by response, with range normalization applied.
Code:
dt = Open("data_table.jmp");
grp = dt << Contour Plot(
X( :Longitude, :Latitude ),
Y( :OZONE, :CO ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Group Options( Return Group( 1 ) )
);
grp << Order By( Order( "Response" ), Descending( 1 ) );
Code Explanation:
- Open data table.
- Create contour plot.
- Set X variables: Longitude, Latitude.
- Set Y variables: OZONE, CO.
- Hide data points.
- Disable area filling.
- Disable contour labels.
- Apply range normalization.
- Group contours.
- Order groups by response descending.
Example 38
Summary: Creates a contour plot with specified levels and filters data to focus on X values greater than 200.
Code:
Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
)
);
obj << Automatic Recalc( 1 );
obj << Local Data Filter(
Location( {0, 0} ),
Add Filter( columns( :X ), Where( :X >= 200 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
);
dt2 = obj << Save Contours;
minX = Col Minimum( dt2:X );
test = minX >= 200;
Code Explanation:
- Open data table;
- Create contour plot.
- Set X and Y variables.
- Set Z variable.
- Show data points.
- Fill areas.
- Label contours.
- Apply range normalization.
- Specify contour levels.
- Enable automatic recalculation.
- Add local data filter.
- Set filter location.
- Filter X values greater than 200.
- Save contour data.
- Find minimum X value.
- Test if minimum X is 200 or greater.
Example 39
Summary: Creates a contour plot with specified levels and range normalization, while filtering data based on a condition.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
)
);
obj << Automatic Recalc( 0 );
dt << Select Where( :X >= 200 );
dt << Exclude();
dt2 = obj << Save Contours;
minX = Col Minimum( dt2:X );
test = minX < 200;
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X and Y axes.
- Set Z axis.
- Show data points.
- Fill contour areas.
- Label contours.
- Apply range normalization.
- Specify contour levels.
- Disable automatic recalculation.
Example 40
Summary: Creates and customizes a contour plot in JMP, applying range normalization and specifying contour levels, while also enabling automatic recalculation and adding a local data filter.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
)
);
obj << Automatic Recalc( 1 );
obj << Local Data Filter(
Location( {0, 0} ),
Add Filter( columns( :X ), Where( :X >= 200 ) ),
Mode( Select( 0 ), Show( 1 ), Include( 1 ) )
);
dt2 = obj << Save Contours;
minX = Col Minimum( dt2:X );
test = minX >= 200;
Close( dt, NoSave );
Close( dt2, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
)
);
obj << Automatic Recalc( 0 );
dt << Select Where( :X >= 200 );
dt << Exclude();
dt2 = obj << Save Contours;
minX = Col Minimum( dt2:X );
test = minX < 200;
Code Explanation:
- Open data table;
- Create contour plot.
- Set X, Y, Z variables.
- Show data points.
- Fill areas.
- Label contours.
- Apply range normalization.
- Specify contour levels.
- Enable automatic recalculation.
- Add local data filter.
- Save contour plot data.
- Find minimum X value.
- Test if minimum X is >= 200.
- Close datasets without saving.
- Reopen data_table dataset
- Create contour plot again.
- Disable automatic recalculation.
- Select rows where X >= 200.
- Exclude selected rows.
- Save contour plot data.
- Find minimum X value.
- Test if minimum X is < 200.
Example 41
Summary: Creates a contour plot with specific settings, including show data points, label contours, and reverse colors.
Code:
dt under test = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 0 ),
Label Contours( 1 ),
Reverse Colors( 1 ),
Transform( "None" ),
Show Boundary( 0 ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 )
),
SendToReport(
Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Show Data Points, Show Contours, Label contours, Reverse Colors" )} ),
Dispatch( {}, "Contour Plot Graph", FrameBox, {DispatchSeg( Contour Seg( 1 ), {Fill Color( {252, 11, 11} )} )} ),
Dispatch( {}, FrameBox, {Frame Size( 88, 219 )} )
)
);
Code Explanation:
- Open data table;
- Create Contour Plot object.
- Set X variables: X, Y.
- Set Y variable: Z.
- Show data points.
- Do not fill areas.
- Label contours.
- Reverse colors.
- Use no transformation.
- Do not show boundary.
Example 42
Summary: Creates and compares contour plots with specified levels, utilizing range normalization and data point display.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 1 ),
Fill Areas( 1 ),
Label Contours( 1 ),
Transform( "Range Normalized" ),
Specify Contours(
Min( -4 ),
Max( 8 ),
N( 7 ),
Contour( 1, -4, -5793511 ),
Contour( 2, -2, -8423637 ),
Contour( 3, 0, -10725064 ),
Contour( 4, 2, -12632256 ),
Contour( 5, 4, -12885662 ),
Contour( 6, 6, -13595764 ),
Contour( 7, 8, -14828355 ),
Contour( 8, 8, -16517899 )
)
);
rpt1 = obj << Report;
expr1 = rpt1 << Get Journal;
:X << Set Property( "Missing Value Codes", 0 );
obj2 = obj << Redo Analysis;
rpt2 = obj2 << Report;
expr2 = rpt2 << Get Journal;
ans = Equal( expr1, expr2 );
Code Explanation:
- Open data table;
- Create contour plot.
- Set X, Y, Z variables.
- Show data points.
- Fill areas.
- Label contours.
- Apply range normalization.
- Specify contour levels.
- Compare initial and redone reports.
- Check equality of expressions.
Example 43
Summary: Creates a contour plot to visualize relationships between 'height', 'weight', and 'age' variables, with interactive filtering by 'sex'.
Code:
dt = Open("data_table.jmp");
Contour Plot(
X( Transform Column( "Abs[height]", Formula( Abs( :height ) ) ), Transform Column( "Abs[weight]", Formula( Abs( :weight ) ) ) ),
Y( Transform Column( "Abs[age]", Formula( Abs( :age ) ) ) ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Specify Contours(
Min( 12.5 ),
Max( 16.5 ),
N( 9 ),
Contour( 1, 12.5, -5201643 ),
Contour( 2, 13, -7371739 ),
Contour( 3, 13.5, -9344463 ),
Contour( 4, 14, -11119814 ),
Contour( 5, 14.5, -12632256 ),
Contour( 6, 15, -12821925 ),
Contour( 7, 15.5, -13272710 ),
Contour( 8, 16, -14049890 ),
Contour( 9, 16.5, -15153465 )
),
By( Transform Column( "First[sex]", Character, Formula( Word( 1, :sex ) ) ) )
);
Code Explanation:
- Open table.
- Create contour plot.
- Transform height column.
- Transform weight column.
- Transform age column.
- Hide data points.
- Disable fill areas.
- Disable label contours.
- Set transform to none.
- Define contour specifications.
Example 44
Summary: Creates a contour plot to visualize population density across geographic locations, with adjustable alpha level and control panel.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) );
obj << Set Alpha( 0.06 );
obj << Show Control Panel( 1 );
rpt = obj << report;
Close( dt, NoSave );
cert_title = {title( "Contour Plot for ELEV_M" )};
Code Explanation:
- Open data table.
- Create contour plot.
- Set alpha level.
- Show control panel.
- Generate report.
- Close data table.
- Define certification title.
Example 45
Summary: Creates a contour plot to visualize population data, applying range normalization and labeling contours.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) );
obj << Transform( "Range Normalized" );
obj << Label Contours( 1 );
rpt = obj << report;
Close( dt, NoSave );
cert_title = {title( "Contour Plot for POP" )};
Code Explanation:
- Open data table.
- Create contour plot.
- Set X to Longitude, Latitude.
- Set Y to Pop.
- Fill contour areas.
- Apply range normalization.
- Label contours.
- Generate report object.
- Close data table without saving.
- Define contour plot title.
Example 46
Summary: Creates a contour plot to visualize population data based on longitude and latitude coordinates, with no transformation applied.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) );
obj << Transform( "None" );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables: Longitude, Latitude.
- Set Y variable: Pop.
- Fill areas in contour plot.
- Apply no transformation.
- Generate report from plot.
Example 47
Summary: Creates a contour plot to visualize population distribution based on longitude and latitude, with adjustable alpha level and control panel.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) );
obj << Set Alpha( 0.06 );
obj << Show Control Panel( 1 );
rpt = obj << report;
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables: Longitude, Latitude.
- Set Y variable: Population.
- Fill contour areas.
- Set alpha level to 0.06.
- Show control panel.
- Generate report object.
Example 48
Summary: Creates a contour plot to visualize population density based on longitude and latitude, with range normalization and labeled contours.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :Longitude, :Latitude ), Y( :Pop ), Fill Areas( 1 ) );
obj << Transform( "Range Normalized" );
obj << Label Contours( 1 );
rpt = obj << report;
Code Explanation:
- Open data table.
- Create contour plot object.
- Set X-axis variables.
- Set Y-axis variable.
- Fill contour areas.
- Apply range normalization.
- Label contour lines.
- Generate report object.
Example 49
Summary: Creates a contour plot to visualize Oxy levels by sex, with specific contours defined and data points hidden.
Code:
dt = Open("data_table.jmp");
obj = dt << Contour Plot(
SendToByGroup( {:Sex == "F"} ),
X( :Weight, :Runtime ),
Y( :Oxy ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( 40 ),
Max( 55 ),
N( 5 ),
Contour( 1, 40, -2768895 ),
Contour( 2, 43.75, -7371739 ),
Contour( 3, 47.5, -11119814 ),
Contour( 4, 51.25, -12821925 ),
Contour( 5, 55, -14049890 ),
Contour( 6, 55, -16517899 )
),
By( :Sex ),
SendToByGroup( {:Sex == "F"}, SendToReport( Dispatch( {"Contour Plot for Oxy Sex=F"}, FrameBox, {Frame Size( 113, 150 )} ) ) ),
SendToByGroup( {:Sex == "M"}, SendToReport( Dispatch( {"Contour Plot for Oxy Sex=M"}, FrameBox, {Frame Size( 113, 150 )} ) ) )
);
rpt = obj << report;
rpt << journal;
Close( dt, NoSave );
Current Journal() << close window( no save );
Code Explanation:
- Open data table;
- Create contour plot object.
- Filter data by female sex.
- Set X variables: Weight, Runtime.
- Set Y variable: Oxy.
- Hide data points.
- Enable filled areas.
- Disable contour labels.
- Define specific contours.
- Group by Sex variable.
- Resize female contour plot frame.
- Resize male contour plot frame.
- Generate report from plot.
- Add report to journal.
- Close dataset without saving.
- Close journal without saving.
Example 50
Summary: Creates a contour plot to visualize the relationship between Weight, Runtime, and Oxy in a data table, with customizable contour levels and frame resizing.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :Weight, :Runtime ),
Y( :Oxy ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( 30 ),
Max( 60 ),
N( 8 ),
Contour( 1, 30, -2768895 ),
Contour( 2, 34.2857142857143, -5793511 ),
Contour( 3, 38.5714285714286, -8423637 ),
Contour( 4, 42.8571428571429, -10725064 ),
Contour( 5, 47.1428571428571, -12632256 ),
Contour( 6, 51.4285714285714, -12885662 ),
Contour( 7, 55.7142857142857, -13595764 ),
Contour( 8, 60, -14828355 ),
Contour( 9, 60, -16517899 )
),
SendToReport( Dispatch( {}, FrameBox, {Frame Size( 113, 213 )} ) )
);
rpt = obj << report;
rpt << journal;
Close( dt, NoSave );
Current Journal() << close window( no save );
Code Explanation:
- Open data table.
- Create contour plot object.
- Set X variables: Weight, Runtime.
- Set Y variable: Oxy.
- Hide data points.
- Enable fill areas.
- Disable label contours.
- Define contour levels and values.
- Resize frame to 113x213.
- Generate report and journal.
- Close data table without saving.
- Close journal window without saving.
Example 51
Summary: Creates a contour plot from a data table, specifying contour levels and frame size, and saves the report to a journal.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( -12 ),
Max( 6 ),
N( 6 ),
Contour( 1, -12, -2768895 ),
Contour( 2, -8.4, -6714080 ),
Contour( 3, -4.8, -10001867 ),
Contour( 4, -1.2, -12632256 ),
Contour( 5, 2.4, -13078929 ),
Contour( 6, 6, -14373972 ),
Contour( 7, 6, -16517899 )
),
SendToReport( Dispatch( {}, FrameBox, {Frame Size( 117, 171 )} ) )
);
rpt = obj << report;
rpt << journal;
Close( dt, NoSave );
Current Journal() << close window( no save );
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Enable fill areas.
- Disable contour labels.
- Define contour levels.
- Set frame size.
- Save report to journal.
- Close data table.
- Close journal window.
Example 52
Summary: Creates a contour plot to visualize Oxy levels by sex, with customizable contour levels and frame sizes for each sex group.
Code:
Open("data_table.jmp");
obj = Contour Plot(
SendToByGroup( {:Sex == "F"} ),
X( :Weight, :Runtime ),
Y( :Oxy ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( 40 ),
Max( 55 ),
N( 5 ),
Contour( 1, 40, -2768895 ),
Contour( 2, 43.75, -7371739 ),
Contour( 3, 47.5, -11119814 ),
Contour( 4, 51.25, -12821925 ),
Contour( 5, 55, -14049890 ),
Contour( 6, 55, -16517899 )
),
By( :Sex ),
SendToByGroup( {:Sex == "F"}, SendToReport( Dispatch( {"Contour Plot for Oxy Sex=F"}, FrameBox, {Frame Size( 113, 150 )} ) ) ),
SendToByGroup( {:Sex == "M"}, SendToReport( Dispatch( {"Contour Plot for Oxy Sex=M"}, FrameBox, {Frame Size( 113, 150 )} ) ) )
);
rpt = obj << report;
rpt << journal;
Code Explanation:
- Open data table;
- Create contour plot object.
- Filter data by female sex.
- Set X-axis variables: Weight, Runtime.
- Set Y-axis variable: Oxy.
- Hide data points.
- Enable fill areas.
- Disable contour labels.
- Define contour levels and values.
- Group plots by sex.
- Adjust frame size for female plot.
- Adjust frame size for male plot.
- Generate report from plot.
- Save report as journal.
Example 53
Summary: Creates a contour plot from a data table, specifying X variables Weight and Runtime, Y variable Oxy, and custom contour levels.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :Weight, :Runtime ),
Y( :Oxy ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( 30 ),
Max( 60 ),
N( 8 ),
Contour( 1, 30, -2768895 ),
Contour( 2, 34.2857142857143, -5793511 ),
Contour( 3, 38.5714285714286, -8423637 ),
Contour( 4, 42.8571428571429, -10725064 ),
Contour( 5, 47.1428571428571, -12632256 ),
Contour( 6, 51.4285714285714, -12885662 ),
Contour( 7, 55.7142857142857, -13595764 ),
Contour( 8, 60, -14828355 ),
Contour( 9, 60, -16517899 )
),
SendToReport( Dispatch( {}, FrameBox, {Frame Size( 113, 213 )} ) )
);
rpt = obj << report;
rpt << journal;
Code Explanation:
- Open data table;
- Create contour plot.
- Set X variables: Weight, Runtime.
- Set Y variable: Oxy.
- Hide data points.
- Fill contour areas.
- Disable contour labels.
- Specify contour levels.
- Set frame size to 113x213.
- Generate report and open journal.
Example 54
Summary: Creates a contour plot from a data table, customizing contour levels and frame size.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( -12 ),
Max( 6 ),
N( 6 ),
Contour( 1, -12, -2768895 ),
Contour( 2, -8.4, -6714080 ),
Contour( 3, -4.8, -10001867 ),
Contour( 4, -1.2, -12632256 ),
Contour( 5, 2.4, -13078929 ),
Contour( 6, 6, -14373972 ),
Contour( 7, 6, -16517899 )
),
SendToReport( Dispatch( {}, FrameBox, {Frame Size( 117, 171 )} ) )
);
rpt = obj << report;
rpt << journal;
Code Explanation:
- Open data table.
- Create contour plot object.
- Set X variables to :X and :Y.
- Set Y variable to :Z.
- Hide data points.
- Enable fill areas.
- Disable label contours.
- Define custom contour levels.
- Set frame size to 117x171.
- Generate report and open journal.
Example 55
Summary: Creates a contour plot from a data table, setting X and Y axis variables.
Code:
Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X axis variables.
- Set Y axis variable.
Example 56
Summary: Creates a contour plot with fill areas from a data table, specifying X and Y variables and enabling fill areas.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ), Fill Areas( 1 ) );
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables: X, Y.
- Set Y variable: Z.
- Enable fill areas.
Example 57
Summary: Opens a data table and generates a contour plot to visualize the relationship between X, Y, and Z variables.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Code Explanation:
- Open table.
- Create contour plot.
Example 58
Summary: Creates and displays contour plots for X, Y, Z variables in a data table, with optional fill areas.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ), Fill Areas( 1 ) );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
Close( dt, NoSave );
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ), Fill Areas( 1 ) );
Code Explanation:
- Open data table;
- Create contour plot for X, Y, Z.
- Close file without saving.
- Reopen "data_table.jmp".
- Create contour plot with filled areas.
- Close file without saving.
- Reopen "data_table.jmp".
- Create contour plot for X, Y, Z.
- Close file without saving.
- Reopen "data_table.jmp".
- Create contour plot for X, Y, Z.
- Close file without saving.
- Reopen "data_table.jmp".
- Create contour plot for X, Y, Z.
- Close file without saving.
- Reopen "data_table.jmp".
- Create contour plot with filled areas.
Example 59
Summary: Creates a contour plot with customized color scheme, contour limits, and count, and generates a report object.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Reverse Colors( 1 );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 5 ) );
rpt = obj << report;
cert text = {labels( -6.5, 8.5 ), labels( -6.5, 8.5 ), labels( -6.5, 8.5 )};
Code Explanation:
- Open data table;
- Create contour plot.
- Reverse color scheme.
- Set contour limits and count.
- Generate report object.
- Define certification text labels.
Example 60
Summary: Creates and customizes a contour plot from a data table, specifying contour limits, reversing color scheme, saving contours to a new table, retrieving saved contours, and generating a report.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
obj << Reverse Colors( 1 );
newdt = obj << Save Contours;
obj << Revert Contours;
obj << Retrieve Contours( newdt );
rpt = obj << report;
cert text = {labels( -6, 11 ), labels( -6, 11 ), labels( -6, 11 )};
Code Explanation:
- Open data table;
- Create contour plot.
- Set contour limits.
- Reverse color scheme.
- Save contours to new table.
- Revert original contours.
- Retrieve saved contours.
- Generate report.
- Define certificate text labels.
Example 61
Summary: Creates a contour plot with specified fill areas and contour limits, utilizing the Contour Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot(
X( :X, :Y ),
Y( :Z ),
Fill Areas( 1 ),
Specify Contours(
Min( -5 ),
Max( 7.5 ),
N( 6 ),
Contour( 1, -5, 10 ),
Contour( 2, -2.5, 7 ),
Contour( 3, 0, 4 ),
Contour( 4, 2.5, 12 ),
Contour( 5, 5, 9 ),
Contour( 6, 7.5, 6 ),
Contour( 7, 7.5, 3 )
)
);
obj << Reverse Colors( 1 );
obj << RedoAnalysis;
Code Explanation:
- Open data table;
- Create contour plot object.
- Set X variables.
- Set Y variable.
- Enable fill areas.
- Define contour limits.
- Specify number of contours.
- Set individual contour values.
- Reverse color scheme.
- Redo analysis.
Example 62
Summary: Creates and manipulates a contour plot from a data table, specifying custom contour limits and saving/retrieving the resulting contours.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
newdt = obj << Save Contours;
obj << Revert Contours;
obj << Retrieve Contours( newdt );
rpt = obj << report;
cert text = {labels( -6, 11 ), labels( -6, 11 ), labels( -6, 11 )};
Code Explanation:
- Open data table;
- Create contour plot.
- Define contour limits.
- Save contours to new table.
- Revert to original contours.
- Retrieve saved contours.
- Generate report.
- Define certificate text.
Example 63
Summary: Creates a contour plot with specified levels and generates a report, utilizing the Contour Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = Contour Plot( X( :X, :Y ), Y( :Z ) );
obj << Specify Contours( Min( -4 ), Max( 6 ), N( 3 ), Contour( 1, -4, -2768895 ), Contour( 2, 1, -9344469 ), Contour( 3, 6, -13927556 ) );
rpt = obj << report;
cert text = {labels( -5.955078125, -4, 1, 6, 10 ), labels( -5.955078125, -4, 1, 6, 10 ), labels( -5.955078125, -4, 1, 6, 10 )};
Code Explanation:
- Open data table;
- Create contour plot.
- Set X and Y axes.
- Set Z axis.
- Specify contour levels.
- Generate report.
- Define certificate text.
Contour Plot using RGB Color
Example 1
Summary: Creates a contour plot with specified X and Y variables, color theme, and boundary settings.
Code:
dt = Open( "$sample_data/big class.jmp", invisible );
magenta = RGB Color( 1, 0, 1 );
cp = dt << Contour Plot(
X( :weight, :height ),
Y( :age ),
Show Boundary( 0 ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Color Theme( "White to Black" ),
Show Boundary( 0 ),
Specify Contours( Min( 12.5 ), Max( 16.5 ), N( 9 ) ),
SendToReport( Dispatch( {}, "Contour Plot Graph", FrameBox, {Frame Size( 623, 512 ), Background Color( magenta )} ) )
);
Code Explanation:
- Open table.
- Define magenta color.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide boundary lines.
- Hide data points.
- Fill contour areas.
- Label contours off.
- Apply color theme.
Example 2
Summary: Creates a contour plot to visualize relationships between 'weight', 'height', and 'age' variables, with customized color theme and graph settings.
Code:
dt = Open( "$sample_data/big class.jmp", invisible );
magenta = RGB Color( 1, 0, 1 );
cp = dt << Contour Plot(
X( :weight, :height ),
Y( :age ),
Show Boundary( 0 ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
Color Theme( "White to Black" ),
Show Boundary( 0 ),
Specify Contours( Min( 12.5 ), Max( 16.5 ), N( 9 ) ),
SendToReport( Dispatch( {}, "Contour Plot Graph", FrameBox, {Frame Size( 623, 512 ), Background Color( magenta )} ) )
);
cp << Redo Analysis;
Code Explanation:
- Open data table.
- Define magenta color.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide boundary lines.
- Hide data points.
- Fill contour areas.
- Hide contour labels.
- Apply range normalization.
- Set color theme.
- Specify contour range.
- Adjust graph size.
- Set background color.
- Redo analysis.
Contour Plot using Set Preferences
Summary: Creates a contour plot with customized specifications, using JMP's Graph Builder to visualize relationships between X, Y, and Z variables.
Code:
Set Preferences( Graph Border( 1 ), Frame Border( 1 ), Frame Color( 21 ), Graph Background Color( 73 ) );
Open("data_table.jmp");
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Specify Contours(
Min( -4 ),
Max( 6 ),
N( 6 ),
Contour( 1, -4, -5181519 ),
Contour( 2, -2, -2556671 ),
Contour( 3, 0, -42680 ),
Contour( 4, 2, -58112 ),
Contour( 5, 4, -14668544 ),
Contour( 6, 6, -15949569 ),
Contour( 7, 6, -10363169 )
)
);
Code Explanation:
- Set graph preferences.
- Open data table;
- Create contour plot.
- Set X and Y variables.
- Set Z variable.
- Hide data points.
- Fill contour areas.
- Disable contour labels.
- Define contour specifications.
- Customize contour levels and colors.
Contour Plot using New Column
Summary: Calculates and visualizes BMI (Body Mass Index) using a formula-based column in JMP, generating a contour plot with customizable grid coordinates.
Code:
dt = Open("data_table.jmp");
dt << New Column( "BMI", Numeric, "Continuous", Format( "Best", 12 ), Formula( (:weight * 703) / :height ^ 2 ) );
my grid = [11 -5, 5 1, 11 -5, 5 1];
dt << Contour Plot(
X( :height, :weight ),
Y( :BMI ),
Show Data Points( 0 ),
Fill Areas( 0 ),
Label Contours( 0 ),
Transform( "None" ),
Grid( my grid )
);
Code Explanation:
- Open data table.
- Create new column "BMI".
- Define BMI formula.
- Set grid coordinates.
- Create contour plot.
- Set X variables.
- Set Y variable.
- Hide data points.
- Disable area filling.
- Disable contour labeling.
Contour Plot using New Window
Summary: Creates contour plots for a 3D dataset, with separate plots for 'Between', 'Above', 'Below', and 'Above Below' conditions.
Code:
dt = Open("data_table.jmp");
New Window( "contour fill",
Lineup Box( N Col( 2 ),
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
SendToReport( Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Between" )} ) )
),
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
SendToReport( Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Above" )} ) )
),
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
SendToReport( Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Below" )} ) )
),
Contour Plot(
X( :X, :Y ),
Y( :Z ),
Show Data Points( 0 ),
Fill Areas( 1 ),
Label Contours( 0 ),
Transform( "Range Normalized" ),
SendToReport( Dispatch( {}, "Contour Plot for Z", OutlineBox, {Set Title( "Above Below" )} ) )
)
)
);
Code Explanation:
- Open data table.
- Create new window titled "contour fill".
- Arrange plots in two columns.
- Plot contour for Z with X and Y.
- Hide data points.
- Enable area filling.
- Disable contour labels.
- Normalize data range.
- Set title "Between".
- Repeat steps 4-9 for "Above", "Below", and "Above Below".