Name
Name using Chart
Example 1
Summary: Creates a bar chart to visualize two variables, 'Humid1:PM' and 'Humid4:PM', using the Open() function to access the data table.
Code:
dt under test = Open("data_table.jmp");
obj = Chart( Y( :Name( "Humid1:PM" ), :Name( "Humid4:PM" ) ), Bar Chart( 1 ) );
Code Explanation:
- Open data table;
- Create chart object.
- Set Y variables.
- Configure bar chart type.
Example 2
Summary: Creates a line chart to visualize two variables, 'Humid1:PM' and 'Humid4:PM', with date as the X-axis variable.
Code:
dt under test = Open("data_table.jmp");
obj = Chart( X( :date ), Y( :Name( "Humid1:PM" ), :Name( "Humid4:PM" ) ), Line Chart( 1 ) );
Code Explanation:
- Open table.
- Create chart object.
- Set X axis variable.
- Add Y axis variables.
- Apply line chart style.
Example 3
Summary: Creates a bar chart to visualize the percentage distribution of 'age' by 'sex', with horizontal orientation and labeled bars.
Code:
dt = Open("data_table.jmp");
bar = Chart( X( :sex ), Y( Name( "% of Total" )(:age) ), Horizontal( 1 ), Label by Percent of Total Values, Show Labels, Bar Chart( 1 ), );
rpt = bar << report;
Code Explanation:
- Open data table.
- Create a bar chart.
- Set X-axis to "sex".
- Set Y-axis to "% of Total(age)".
- Enable horizontal orientation.
- Label bars by percent of total values.
- Display labels on bars.
- Use bar chart type.
- Generate report from chart.
- Assign report to variable "rpt".
Example 4
Summary: Creates a bar chart to visualize the distribution of height by age, with the percentage of total height displayed on the y-axis.
Code:
dt = Open("data_table.jmp");
bchart = Chart( Grouping( :age ), X( :height ), Y( Name( "% of Total" )(:height) ), Bar Chart( 1 ) );
Code Explanation:
- Open data table;
- Create a chart object.
- Set grouping variable to age.
- Set X-axis to height.
- Set Y-axis to % of Total(height).
- Display as bar chart.
- End script.
Set Name
Example 1
Summary: Opens and renames a data table in JMP.
Code:
dt1 = Open("data_table.jmp");
dt1 << Set Name( "Students1" );
Code Explanation:
- Open data table.
- Rename table to Students1.
Example 2
Summary: Opens and renames a data table to 'Flower' in JMP.
Code:
dt1 = Open("data_table.jmp");
dt1 << Set Name( "Flower" );
Code Explanation:
- Open data table;
- Rename dataset to Flower.
Example 3
Summary: Opens and renames data tables in JMP, allowing for efficient management of datasets.
Code:
dt1 = Open("data_table.jmp");
dt1 << Set Name( "Flower" );
dt2 = Open("data_table.jmp");
dt2 << Set Name( "Best Class" );
Code Explanation:
- Open data table.
- Rename data table to "Flower".
- Open data table.
- Rename data table to "Best Class".
Example 1
Summary: Runs the subscription and unsubscription to column rename events in a JMP data table, utilizing the
subscribeandunsubscribefunctions.
Code:
dt = Open("data_table.jmp");
x = dt << subscribe( "abc", on column rename( renameNotify ) );
w = dt << unsubscribe( x, on column rename );
Code Explanation:
- Open data table.
- Subscribe to column rename event.
- Define rename notify function.
- Unsubscribe from column rename event.
Example 2
Summary: Opens and renames three JMP data tables, utilizing the Open() function to access datasets.
Code:
dt = Open("data_table.jmp");
dt2 = Open( "$SAMPLE_DATA/Baseball.jmp", invisible );
dt3 = Open( "$SAMPLE_DATA/Car Poll.jmp", private );
dt << set name( "Best Class" );
dt2 << set name( "Bball" );
dt3 << set name( "Poll of Cars" );
Code Explanation:
- Open data table 1;
- Open data table 2;
- Open data table 3;
- Rename data_table1 dataset.
- Rename data_table2 dataset.
- Rename data_table3 dataset.
Example 3
Summary: Opens and renames a data table in JMP, setting its name to 'data_table Dup'.
Code:
dt1 = Open("data_table.jmp");
dt1 << set name( "data_table Dup" );
Code Explanation:
- Open data table;
- Rename dataset to "data_table Dup".
Example 4
Summary: Runs the linking of two data tables, setting a link reference property and enabling auto-open for efficient data analysis.
Code:
dt1 = Open("data_table1.jmp");
dt2 = Open("data_table2.jmp");
dt2:Name( "Unique Subject Identifier" ) << Set Property(
"Link Reference",
{Reference Table( dt1 ), Options( "Use Linked Column Name"(1), "Auto Open"(1) )}
);
Code Explanation:
- Open data table 1;
- Open data table 2;
- Set link reference property.
- Use linked column name.
- Auto open linked table.
Example 5
Summary: Runs the linking of data tables in JMP, establishing a reference table and setting link references for two additional data tables.
Code:
dt1 = Open("data_table.jmp");
dt2 = Open("data_table.jmp");
dt2:Name( "Unique Subject Identifier" ) << Set Property(
"Link Reference",
{Reference Table( dt1 ), Options( "Use Linked Column Name"(1), "Auto Open"(1) )}
);
dt3 = Open("data_table.jmp");
dt3:Name( "Unique Subject Identifier" ) << Set Property( "Link Reference", {Reference Table( dt1 ), Options( "Auto Open"(1) )} );
Code Explanation:
- Open data table;
- Open data table;
- Set link reference for "dt2".
- Open data table;
- Set link reference for "dt3".
Example 6
Summary: Opens and renames a data table, followed by retrieving scripts from it.
Code:
dt2 = Open("data_table.jmp");
dt2 << set name( "utBigClass" );
ut_expected = dt2 << get script;
Code Explanation:
- Open data_table data
- Rename data table.
- Retrieve scripts from data table.
Example 7
Summary: Configures data table properties, including setting spec limits and selecting rows based on specific conditions.
Code:
dt = Open("data_table.jmp");
dt:Name( "Pred Formula Trait1" ) << Set Property( "Spec Limits", {LSL( 22.5 )} );
dt:Name( "Pred Formula Trait2" ) << Set Property( "Spec Limits", {USL( 25.5 )} );
dt:Name( "Probability( Disease Status=1 )" ) << Set Property( "Spec Limits", {USL( 0.3 )} );
dt << Clear Select << Clear Row States;
dt << Select Where( :Father == 0 & :Mother == 0 & Row() <= 100 );
dt << Invert Row Selection << Exclude;
dt << Clear Select;
Code Explanation:
- Open data table;
- Set lower spec limit.
- Set upper spec limit.
- Set upper spec limit.
- Clear row selection.
- Select rows without parents.
- Invert row selection.
- Exclude selected rows.
- Clear row selection.
Example 8
Summary: Runs data table operations by opening a file, assigning column names to a variable, deleting specified columns, and retrieving the remaining column names.
Code:
dt = Open("data_table.jmp");
xcol = {:Name( "age" ), :Name( "sex" ), :Name( "height" ), :Name( "weight" )};
dt << Delete Columns( xcol );
col_names = dt << Get Column Names();
Code Explanation:
- Open data table.
- Assign columns to variable.
- Delete specified columns.
- Retrieve column names.
Name using Run Script
Summary: Modifies font styles and sizes in a Bivariate report object, allowing for customization of the report's appearance.
Code:
dt = Open("data_table.jmp");
biv = dt << Run Script( "Bivariate" );
bivRep = Report( biv );
bivRep[Outline Box( 1 )] << Set Font Name( "Arial Black" );
bivRep[Outline Box( 2 )] << Set Font Style( "Italic" );
bivRep[Outline Box( 3 )] << Set Font Size( 20 );
bivRep[Outline Box( 4 )] << Set Font( "Arial Black", 20, "italic underline" );
bivRep[Outline Box( 1 )] << Set Title( "Test Font Change" );
biv2 = biv << Redo Analysis();
Code Explanation:
- Open data table;
- Run Bivariate analysis script.
- Retrieve Bivariate report object.
- Set first outline box font to Arial Black.
- Set second outline box style to Italic.
- Set third outline box size to 20.
- Set fourth outline box font, size, and style.
- Set first outline box title to "Test Font Change".
- Redo Bivariate analysis.
Name using Text
Summary: Creates a bar chart to visualize age percentage distribution by sex, utilizing JMP's Chart platform.
Code:
cert_text = {Text( {0.568350626118068, 0.723826714801444}, Vert Center, "55.64%" ), Text(
{0.455649373881932, 0.268953068592058},
Vert Center,
"44.36%"
)};
dt = Open("data_table.jmp");
bar = Chart( X( :sex ), Y( Name( "% of Total" )(:age) ), Horizontal( 1 ), Label by Percent of Total Values, Show Labels, Bar Chart( 1 ), );
rpt = bar << report;
Code Explanation:
- Define certificate text.
- Open data table;
- Create bar chart.
- Set X-axis to sex.
- Set Y-axis to age percentage.
- Enable horizontal orientation.
- Label by percent of total values.
- Show labels.
- Use bar chart style.
- Retrieve report object.
Name using Delete Columns
Summary: Deletes columns 'age', 'height', and 'weight' from a data table, then retrieves the remaining column names.
Code:
dt = Open("data_table.jmp");
dt << Delete Columns( {:Name( "name" ), :Name( "age" ), :Name( "sex" ), :Name( "height" ), :Name( "weight" )}[2 :: 5] );
col_names = dt << Get Column Names();
Code Explanation:
- Open data table;
- Delete columns "age" to "weight".
- Retrieve remaining column names.
Name using Window
Summary: Runs the opening, renaming, and closing of a window in JMP.
Code:
dt = Open("data_table.jmp");
dt << setname( "Ding" );
myWin = Window( "Ding" );
myWin << closewindow();
Code Explanation:
- Open data table;
- Rename dataset to "Ding".
- Create window named "Ding".
- Close the "Ding" window.