Bubble Plot
Example 1
Summary: Generates a bubble plot with a map, visualizing the relationship between longitude, latitude, and time for different airlines, while customizing the map and axes.
Code:
// Bubble Plot with Map
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot with Map
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Time( :Time ),
Coloring( :Airline ),
ID( :Tail Number ),
Speed( 85.7075471698113 ),
Trail Lines( "None" ),
Show Time Annotation( 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Scale( "Geodesic" ),
Min( -156.538045829491 ),
Max( -63.2277528312555 ),
Inc( 20 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "2", ScaleBox,
{Scale( "Geodesic" ),
Min( 15.7179336335078 ),
Max( 77.1916732325061 ),
Inc( 10 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{
Background Map(
Images(
"Simple Earth",
Transparency( 0.7 )
),
Boundaries( "World" )
), Grid Line Order( 3 ),
Reference Line Order( 4 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis to Longitude.
- Set Y-axis to Latitude.
- Set time variable to Time.
- Color bubbles by Airline.
- Identify bubbles by Tail Number.
- Set speed for bubble movement.
- Disable trail lines.
- Customize map and axes.
Example 2
Summary: Creates a bubble plot to visualize the relationship between Birth and Death over time, with Country as an identifier, using data from a specified JMP data table.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :Birth ),
Y( :Death ),
Time( :Year ),
ID( :Country ),
Circle Size( 0.339622641509434 ),
Time Index( 4.1 )
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Birth.
- Set Y axis to Death.
- Set time variable to Year.
- Use Country for ID.
- Define circle size.
- Set time index.
Example 3
Summary: Creates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, utilizing an overlay plot to visualize the data.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :"Price/Price2000"n ),
Y( :Series ),
Time( :date ),
ID( :Series ),
SendToReport(
Dispatch( {}, "2", ScaleBox,
{Scale( "Linear" ),
Format( "Best" ), Min( -0.5 ),
Max( 16.5 ), Inc( 1 ),
Minor Ticks( 0 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Set time variable.
- Set ID variable.
- Send report settings.
- Configure scale box.
- Set scale type.
- Set format.
Example 4
Summary: Generates a bubble plot to visualize the relationship between time and heart rate, with coloring based on drink type and ID variables for testers. The plot includes trail bubbles and lines.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :"Time (Numeric)"n ),
Y( :Heart Rate ),
Time( :"Time (Numeric)"n ),
Coloring( :Drink ),
ID( :Drink, :Testers ),
Time Index( 4.6 ),
Trail Bubbles( 1 ),
Trail Lines( 1 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( 4.86973947895792 ),
Max( 36.3958779282011 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define time variable.
- Set coloring variable.
- Define ID variables.
- Set time index.
- Enable trail bubbles.
- Enable trail lines.
Example 5
Summary: Generates a bubble plot with needle plots to visualize the high, close, and low stock prices of DJI over time, using data from XYZ Stock Averages (plots).jmp.
Code:
// Bubble Plot 2
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot 2
Bubble Plot(
X( :"Time (Numeric)"n ),
Y( :Heart Rate ),
Time( :"Time (Numeric)"n ),
Coloring( :Type ),
ID( :Brand, :Type ),
Trail Lines( 1 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( 4.54909819639279 ),
Max( 35.4064039903454 )}
),
Dispatch( {}, "2", ScaleBox,
{Min( 62.5 ), Max( 94.3 ),
Inc( 5 ), Minor Ticks( 1 )}
)
)
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Use time variable.
- Apply coloring based on Type.
- Identify using Brand and Type.
- Enable trail lines.
- Disable all labels.
- Customize X scale.
- Customize Y scale.
Example 6
Summary: Visualizes a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, using an overlay plot to display these values.
Code:
// Bubble Plot 3
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot 3
Bubble Plot(
X( :"Time (Numeric)"n ),
Y( :"Rate/Baseline"n ),
Time( :"Time (Numeric)"n ),
Coloring( :Gender ),
ID( :Gender ),
Trail Bubbles( 1 ),
Trail Lines( 1 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( 8.35671342685371 ),
Max( 31.3445729133618 )}
),
Dispatch( {}, "2", ScaleBox,
{Min( 0.959042666666667 ),
Max( 1.2742 ), Inc( 0.05 ),
Minor Ticks( 1 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Use time for animation.
- Color bubbles by gender.
- Identify bubbles by gender.
- Enable trail bubbles.
- Enable trail lines.
- Disable all labels.
Example 7
Summary: Generates a bubble plot to visualize the relationship between domestic gross, theaters opening weekend, and profitability of movies, with color coding based on Rotten Tomatoes scores.
Code:
// Bubble Plot: Theaters Open Week by Domestic Gross
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot: Theaters Open Week by Domestic Gross
Bubble Plot(
X( :Domestic Gross ),
Y( :Theaters Opening Wknd ),
Sizes( :Profitability ),
Coloring( :Rotten Tomatoes Score ),
Trail Lines( "None" ),
Color Levels(
[4 27.25 50.5 73.75 97]
),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( -24.5501285347044 ),
Max( 425.449871465296 ),
Inc( 50 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "2", ScaleBox,
{Min( -259.328101335536 ),
Max( 4740.67189866446 ),
Inc( 1000 ), Minor Ticks( 1 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 389, 269 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Apply color coding.
- Remove trail lines.
- Specify color levels.
- Set title position.
- Customize axis scales and labels.
Example 8
Summary: Visualizes a bubble plot to compare lead studios by budget, utilizing the Bubble Plot platform in JMP and customizing scale settings for X and Y axes.
Code:
// Bubble Plot: Lead Studio by Budget
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot: Lead Studio by Budget
Bubble Plot(
X( :Production Budget ),
Y( :Lead Studio Name ),
Coloring( :Genre ),
Trail Lines( "None" ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( -25 ), Max( 275 ),
Inc( 50 ), Minor Ticks( 1 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "2", ScaleBox,
{Min( -0.5 ), Max( 32.5 ),
Inc( 1 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 529, 625 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Production Budget.
- Set Y axis to Lead Studio Name.
- Color bubbles by Genre.
- Remove trail lines.
- Set title position.
- Adjust X scale settings.
- Adjust Y scale settings.
- Set frame size.
Example 9
Summary: Visualizes wind speeds and landfall locations in the United States using a bubble plot, with customization options for scale settings and labeling.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :"Wind (Knots)"n ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 220 ),
Size as Sum( 0 ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Max( 10 ), Minor Ticks( 0 )}
),
Dispatch( {}, "2", ScaleBox,
{Min( 0 ), Minor Ticks( 0 )}
)
)
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis to Longitude.
- Set Y-axis to Latitude.
- Define sizes by Wind (Knots).
- Use Date for time.
- Color by Landfall in USA.
- Use Name and ID for labels.
- Set speed to 220.
- Configure scale settings.
Example 10
Summary: Generates a bubble plot with a map, visualizing wind speeds (in knots) across the globe over time, colored by landfall in the USA. The plot includes trail bubbles and size adjustments.
Code:
// Bubble Plot with Map
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot with Map
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :"Wind (Knots)"n ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Size as Sum( 0 ),
Speed( 60.44 ),
Trail Bubbles( 1 ),
Color Levels( [0 0.25 0.5 0.75 1] ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( -110 ), Max( 10 ),
Inc( 20 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "2", ScaleBox,
{Min( 0 ), Max( 70 ),
Inc( 10 ), Minor Ticks( 0 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 465, 348 ),
Background Map(
Images( "Simple Earth" )
), Grid Line Order( 3 ),
Reference Line Order( 2 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Use Wind (Knots) for sizes.
- Set time to Date.
- Color by Landfall in USA.
- Use Name and ID for IDs.
- Configure size as sum.
- Adjust speed and trail bubbles.
Example 11
Summary: Visualizes geographic data by creating a bubble plot with wind speed, latitude, and longitude, colored by statistical values, and customized with trail bubbles, labels, and send-to-report features.
Code:
// Bubble Plot Example
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot Example
Current Data Table() << select all rows;
bp =
Bubble Plot(
X( :LON ),
Y( :LAT ),
Sizes( :WIND ),
Time( :Date ),
Coloring( :STAT ),
Speed( 82.28 ),
Bubble Size( 94.85 ),
Time Index( 29.892 ),
Trail Bubbles( 1 ),
Trail Lines( 1 ),
All Labels( 0 ),
No Labels( 0 ),
Selectable Across Gaps( 1 ),
Title Position( -82.409, 32.329 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( -92.6584615384615 ),
Max( -74 ), Inc( 2 ),
Minor Ticks( 0 )}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 531, 545 ),
Background Map(
Images(
"Detailed Earth"
)
), Grid Line Order( 2 ),
Reference Line Order( 3 )}
)
)
);
bp << go;
Code Explanation:
- Open table.
- Select all rows.
- Create bubble plot.
- Set X-axis to LON.
- Set Y-axis to LAT.
- Set bubble sizes to WIND.
- Set time axis to Date.
- Color bubbles by STAT.
- Configure bubble plot settings.
- Display bubble plot.
Example 12
Summary: Visualizes a bubble plot street map using Longitude and Latitude coordinates, with bubble sizes defined by POP values, and applies a color theme.
Code:
// Bubble Plot Street Map
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot Street Map
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :POP ),
ID( :Lead ),
Bubble Size( 18.1 ),
Label( "None" ),
Trail Lines( "None" ),
Color Theme(
"Green to Black to Red"
),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( -125.667129872271 ),
Max( -69.8506306784654 ),
Inc( 10 ), Minor Ticks( 1 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "2", ScaleBox,
{Min( 21.9791666666667 ),
Max( 53.1081814236111 ),
Inc( 5 ), Minor Ticks( 1 ),
Rotated Labels(
"Horizontal"
)}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 598, 343 ),
Background Map(
Images(
"Street Map Service"
)
), Grid Line Order( 3 ),
Reference Line Order( 4 )}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Define bubble sizes by POP.
- Use Lead for bubble IDs.
- Set bubble size to 18.1.
- Disable labels.
- Disable trail lines.
- Apply color theme.
Example 13
Summary: Generates a dynamic bubble plot from an open data table, visualizing the relationship between 'Portion 0-19', 'Portion60+', and 'Pop' over time for each country.
Code:
// Bubble Plot Dynamic
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot Dynamic
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Time( :Year ),
ID( :Country )
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define sizes variable.
- Specify time variable.
- Identify country variable.
Example 14
Summary: Visualizes the relationship between 'Portion 0-19' and 'Portion60+' using a bubble plot, with the size of each bubble representing the 'Pop' value.
Code:
// Bubble Plot Static
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot Static
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop )
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
Example 15
Summary: Generates a bubble plot with sizes representing population and colors indicating region and country, using data from the 'data_table.jmp' file.
Code:
// Bubble Plot Region
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot Region
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country )
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define sizes variable.
- Set time variable.
- Assign ID variables.
Example 16
Summary: Visualizes a bubble plot to compare country performance by year, with coloring based on the portion 0-19 and adjustable frame size.
Code:
// Bubble Country by Year
// Open data table
dt = Open("data_table.jmp");
// Bubble Country by Year
Bubble Plot(
X( :Year ),
Y( :Country ),
Coloring( :"Portion 0-19"n ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 475, 326 )
)
)
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis to Year.
- Set Y-axis to Country.
- Color by Portion 0-19.
- Disable all labels.
- Adjust frame size.
- Report sent to output.
Example 17
Summary: Generates a bubble plot with country-specific data, featuring X-axis variable 'Portion 0-19', Y-axis variable 'Portion60+', and sizes defined by the 'Pop' column. The plot is customized with specific circle size, animation speed, and all labels.
Code:
// Bubble By Country
// Open data table
dt = Open("data_table.jmp");
// Bubble By Country
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Time( :Year ),
ID( :Country ),
Speed( 69.1792452830189 ),
Circle Size( 0.00742924528301887 ),
All Labels( 1 ),
SendToReport(
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 495, 338 )
)
)
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Identify countries.
- Set animation speed.
- Adjust circle size.
- Show all labels.
Example 18
Summary: Visualizes the relationship between portion sizes and population by region, using a bubble plot to display data from a table.
Code:
// Bubble by Region
// Open data table
dt = Open("data_table.jmp");
// Bubble by Region
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country )
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time dimension.
- Identify regions and countries.
Example 19
Summary: Visualizes SAT Math and Verbal scores by state using a bubble plot, with size proportional to the percentage of students taking the test in 2004.
Code:
// Bubble Plot by State
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot by State
Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :"% Taking (2004)"n ),
Time( :Year ),
ID( :State ),
All Labels( 1 ),
SendToReport(
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 539, 329 )
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to SAT Math.
- Set Y axis to SAT Verbal.
- Define bubble sizes.
- Use Year for time dimension.
- Identify bubbles by State.
- Enable all labels.
- Adjust report size.
- Display bubble plot.
Example 20
Summary: Generates a bubble plot by region, visualizing SAT Math and Verbal scores over time, with the size of each bubble representing the percentage of students taking the test in 2004.
Code:
// Bubble Plot by Region
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot by Region
Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :"% Taking (2004)"n ),
Time( :Year ),
ID( :Region, :State ),
All Labels( 1 ),
SendToReport(
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 550, 336 )
)
)
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Set time variable.
- Identify regions and states.
- Display all labels.
- Adjust frame size.
- Finalize report.
Example 21
Summary: Generates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption, with population as the size variable and year as the time variable.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X(
:
CO2 emissions from liquid fuel consumption
),
Y(
:
CO2 emissions from solid fuel consumption
),
Sizes( :Population ),
Time( :Year ),
ID( :Nation )
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define size variable.
- Set time variable.
- Set ID variable.
Example 22
Summary: Generates a bubble plot to visualize the mean values of X and Y, with electors as the size of each bubble, colored by winner, and labeled by state. The plot is customized with specific title position, scale boxes for longitude and latitude, and frame box settings.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :"Mean(X)"n ),
Y( :"Mean(Y)"n ),
Sizes( :Electors ),
Coloring( :Winner ),
ID( :State ),
All Labels( 0 ),
No Labels( 0 ),
Title Position(
-82.1216666666667,
21.0925925925926
),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Scale( "Geodesic US" ),
Format(
"Longitude DDD"("PUNDIR"),
16,
0
), Min( -121.322753863196 ),
Max( -75.9486913631956 ),
Inc( 10 ), Minor Ticks( 0 )}
),
Dispatch( {}, "2", ScaleBox,
{Scale( "Geodesic US" ),
Format(
"Latitude DDD"("PUNDIR"),
16,
0
), Min( 21.0925925925926 ),
Max( 52.5592592592593 ),
Inc( 5 ), Minor Ticks( 0 )}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
{Frame Size( 623, 432 ),
Background Map(
Boundaries( "US States" )
), Grid Line Order( 2 ),
Reference Line Order( 3 ),
DispatchSeg(
Shape Seg( 1 ),
{
Line Color(
{204, 204, 204}
), Fill Color( "None" ),
Missing shape fill(
2147483647
),
Missing value fill(
-14540253
)}
)}
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis.
- Set Y axis.
- Define bubble sizes.
- Set bubble colors.
- Identify data points.
- Disable all labels.
- Disable no labels.
- Configure title position.
Example 23
Summary: Generates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, utilizing an overlay plot to visualize the data.
Code:
// Bubble Plot
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot
Bubble Plot(
X( :part ),
Y( :cycle ),
Sizes( :wolfer ),
Coloring( :wolfer ),
Circle Size( 5.9433962264151 ),
SendToReport(
Dispatch( {}, "2", ScaleBox,
{Scale( "Linear" ),
Format( "Best" ), Min( 1740 ),
Max( 1920 ), Inc( 10 )}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 482, 353 )
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Color bubbles based on variable.
- Set circle size.
- Adjust X scale settings.
- Set X axis range.
- Configure frame size.
Example 24
Summary: Generates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, utilizing the Open data table function and Bubble Plot syntax.
Code:
// Bubble Plot 2
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot 2
Bubble Plot(
X( :part ),
Y( :wolfer ),
Sizes( :wolfer ),
Time( :cycle ),
ID( :part ),
Coloring( :wolfer ),
Time Index( 7.89999999999999 )
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Assign ID variable.
- Apply coloring.
- Set time index.
- Display plot.
Example 25
Summary: Generates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, using data from XYZ Stock Averages (plots).jmp.
Code:
// Bubble Plot 3
// Open data table
dt = Open("data_table.jmp");
// Bubble Plot 3
Bubble Plot(
X( :year ),
Y( :wolfer ),
Sizes( :wolfer ),
Time( :year ),
Coloring( :wolfer ),
Speed( 180.745283018868 ),
Time Index( 49.3493632075472 ),
Trails( 1 ),
All Labels( 1 ),
Drop Zones( 1 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Scale( "Linear" ),
Format( "Best" ), Min( 1740 ),
Max( 1940 ), Inc( 11 ),
Show Major Grid( 1 )}
),
Dispatch( {}, "Bubble Plot",
FrameBox,
Frame Size( 679, 185 )
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to year.
- Set Y axis to wolfer.
- Set sizes to wolfer.
- Set time to year.
- Set coloring to wolfer.
- Configure speed and time index.
- Enable trails and labels.
- Adjust report settings.
Example 26
Summary: Generates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, utilizing the SendToReport function to customize scales and frame sizes.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country ),
Title Position( 0.7305, 0.088 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Best", 10 ), Min( 0.62 ), Max( 0.75 ), Inc( 0.02 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox,
{Scale( "Log" ), Format( "Best", 10 ), Min( 0.0291496571111285 ), Max( 0.0988440936582523 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 510, 360 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Assign ID variables.
- Position title.
- Customize X-axis scale.
- Customize Y-axis scale.
Example 27
Summary: Generates a bubble plot to visualize SAT Math scores across states, utilizing the Population as X-axis and applying logarithmic scale to Y-axis. Additionally, creates a scatterplot matrix with lower triangular format.
Code:
Open("data_table.jmp");
bp = Bubble Plot( X( :Population ), Y( :SAT Math ), Time( :Year ), ID( :State ), All Labels( 0 ) );
Report( bp )[AxisBox( 2 )] << Scale( Log );
sm = Scatterplot Matrix( Y( :SAT Math ), X( :Population ), Matrix Format( "Lower Triangular" ), Ellipse Color( 3 ), Fit Line( 0 ) );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Population.
- Set Y axis to SAT Math.
- Set time axis to Year.
- Use State for identification.
- Hide all labels.
- Apply logarithmic scale to Y axis.
- Create scatterplot matrix.
- Set Y variables to SAT Math.
- Set X variables to Population.
- Use lower triangular format.
- Color ellipses.
- Disable fit lines.
Example 28
Summary: Generates a bubble plot and scatterplot matrix to visualize the relationship between population and SAT Math scores across states, with log-scaled X-axes.
Code:
Open("data_table.jmp");
bp = Bubble Plot( X( :Population ), Y( :SAT Math ), Time( :Year ), ID( :State ), All Labels( 0 ) );
Report( bp )[AxisBox( 2 )] << Scale( Log );
sm = Scatterplot Matrix( Y( :SAT Math ), X( :Population ), Matrix Format( "Lower Triangular" ), Ellipse Color( 3 ), Fit Line( 0 ) );
Report( sm )[AxisBox( 2 )] << Scale( Log );
Code Explanation:
- Open data table;
- Create bubble plot.
- Set bubble plot X-axis to log scale.
- Create scatterplot matrix.
- Set scatterplot matrix X-axis to log scale.
Example 29
Summary: Generates a bubble plot with needle plots for the high, close, and low stock prices of DJI over time, using data from XYZ Stock Averages (plots).
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Name( "Wind (Knots)" ) ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 60.44 ),
Trail Bubbles( "Selected" ),
Color Levels( [0 0.25 0.5 0.75 1] ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Scale( "Geodesic" ), Min( -110 ), Max( 10 ), Inc( 20 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox,
{Scale( "Geodesic" ), Min( -9.90322580645161 ), Max( 79.9032258064516 ), Inc( 10 ), Minor Ticks( 0 ),
Add Ref Line( {25, 50}, "Solid", "Orange", "Continental US", 1, 0.25 )}
),
Dispatch( {}, "Bubble Plot", FrameBox,
{Frame Size( 465, 348 ), Background Map( Images( "Simple Earth" ) ), Grid Line Order( 3 ), Reference Line Order( 2 )}
)
)
);
Code Explanation:
- Open data_table data
- Create bubble plot.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Use Wind (Knots) for sizes.
- Use Date for time.
- Color by Landfall in USA.
- Use Name and ID for IDs.
- Set speed to 60.44.
- Display selected trail bubbles.
Example 30
Summary: Creates a bubble plot with ozone concentration on the y-axis, date on the x-axis, and sizes based on ozone concentration, while formatting the x-axis for month/year display.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :date ),
Y( :Ozone Concentration ),
Sizes( :Ozone Concentration ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Format( "m/y", 7 ), Min( 1609459200 ), Max( 2209075200 ), Interval( "Year" ), Inc( 5 ), Minor Ticks( 3 ),
Label Row Nesting( 2 ), Label Row( 1, Show Minor Labels( 1 ) ), Label Row( 2, Show Minor Labels( 1 ) )}
),
Dispatch( {}, "2", ScaleBox, {Format( "Best", 9 ), Min( 1 ), Max( 9 ), Inc( 1 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 492, 360 )} )
)
);
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to date.
- Set Y-axis to ozone concentration.
- Use ozone concentration for sizes.
- Position title at origin.
- Format X-axis with month/year.
- Set X-axis min and max dates.
- Set X-axis interval to years.
- Configure X-axis labels and minor ticks.
Example 31
Summary: Creates two bubble plots with customized scales and trail lines, using data from a specified JMP data table.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
Bubble Plot(
X( :name ),
Y( :height ),
Trail Lines( "None" ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -0.5 ), Max( 38.5 ), Inc( 1 ), Minor Ticks( 0 ), Rotated Labels( "Vertical" )} ),
Dispatch( {}, "2", ScaleBox, {Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 ), Rotated Labels( "Horizontal" )} )
)
);
Bubble Plot(
X( :height ),
Y( :name ),
Trail Lines( "None" ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 ), Rotated Labels( "Horizontal" )} ),
Dispatch( {}, "2", ScaleBox, {Min( -0.5 ), Max( 38.5 ), Inc( 1 ), Minor Ticks( 0 ), Rotated Labels( "Horizontal" )} )
)
);
Code Explanation:
- Set default names scope.
- Open data table;
- Create first bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Disable trail lines.
- Set title position.
- Configure X-axis scale.
- Configure Y-axis scale.
- Create second bubble plot.
Example 32
Summary: Creates a bubble plot with adjustable scales and frame size, using sex as an ID variable.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :height ),
Y( :weight ),
ID( :sex ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 1050 ), Max( 1450 ), Inc( 50 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 100 ), Max( 109 ), Inc( 1 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 270, 212 )} )
)
);
dt << Add Rows( 10 );
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Use sex for IDs.
- Adjust X-axis scale.
- Adjust Y-axis scale.
- Set frame size.
- Add 10 rows to dataset.
Example 33
Summary: Creates a bubble plot with adjustable X-axis and Y-axis scales, using sex as IDs, and sets frame size for visualizing height and weight data.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :height ),
Y( :weight ),
ID( :sex ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 1050 ), Max( 1450 ), Inc( 50 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 100 ), Max( 109 ), Inc( 1 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 270, 212 )} )
)
);
dt << Add Rows( 10 );
bp << X as Sum( 1 );
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Use sex for IDs.
- Adjust X-axis scale.
- Adjust Y-axis scale.
- Set frame size.
- Add 10 rows to data table.
- Update X-axis to sum.
Example 34
Summary: Creates a bubble plot with customized scales and frame size, using the Open() function to load data from a JMP data table.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :month ),
Y( :Ozone Concentration ),
Time( :month ),
ID( :Winter Months Intervention ),
Speed( 36.04 ),
Time Index( 3.9 ),
Show Roles( 1 ),
Title Position( 6.6188, 2.08159015873016 ),
SendToReport(
Dispatch( {}, "month", ScaleBox, {Format( "Best", 9 ), Min( -1.2 ), Max( 14.2 ), Inc( 5 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Ozone Concentration", ScaleBox, {Format( "Best", 9 ), Min( -0.3 ), Max( 10.2 ), Inc( 2 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 756, 360 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis to month.
- Set Y-axis to Ozone Concentration.
- Define time variable as month.
- Use Winter Months Intervention for ID.
- Set animation speed.
- Adjust time index.
- Show roles in plot.
- Customize title position and axis scales.
Example 35
Summary: Creates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption, with population sizes and year as variables, and customizes report scale.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Circle Size( 20047.1698113208 ),
Time Index( 2 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( "Log" ), Format( "Best" ), Min( 0.0001 ), Max( 238471 ), Inc( 1 ), Minor Ticks( 8 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Set time variable.
- Identify data points.
- Set circle size.
- Select time index.
- Configure report scale.
Example 36
Summary: Creates a bubble plot to visualize stock prices over time, with needle plots for high, close, and low prices.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
Time( :Year ),
Coloring( :Region ),
ID( :Country ),
Set Shape( "Triangle" ),
Title Position( 0.71525, 0.136 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 0.575 ), Max( 0.85 ), Inc( 0.05 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 0 ), Max( 0.16 ), Inc( 0.02 ), Minor Ticks( 0 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time dimension.
- Apply color coding.
- Identify countries.
- Set bubble shape.
- Adjust title position.
Example 37
Summary: Creates a bubble plot to visualize weight and height data for males, with customized X-axis and Y-axis scales.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :weight ),
Y( :height ),
ID( :age ),
Draw( "Filled and Outlined" ),
Title Position( 0, 0 ),
Where( :sex == "M" ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 90 ), Max( 155 ), Inc( 10 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 57 ), Max( 69 ), Inc( 2 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Frame Size( 339, 207 ), Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 1 ),
Index Row( 1 ),
UniqueID( 1160031521 ),
FoundPt( {79, 719} ),
Origin( {94.3333333333333, 61.2} )
)}
)
)
);
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X axis to weight.
- Set Y axis to height.
- Use age for ID.
- Draw filled and outlined bubbles.
- Set title position.
- Filter data for males.
- Customize X axis scale.
- Customize Y axis scale.
Example 38
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time.
Code:
Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Coloring( :Pop ), ID( :Country ) );
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define coloring variable.
- Assign ID variable.
Example 39
Summary: Creates a bubble plot with coloring based on population, using data from a specified table.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Coloring( :Pop ), ID( :Country ) );
bp << Color as Sum( 1 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Assign color variable.
- Use country for identification.
- Apply color as sum option.
Example 40
Summary: Creates a bubble plot with coloring based on population, using data from an open JMP data table.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Coloring( :Pop ), ID( :Country ) );
bp << Color as Sum( 0 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Set coloring variable.
- Set ID variable.
- Apply color as sum option.
Example 41
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, using the Open function to load data from a JMP data table.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Date ),
Y( :Flu Cases ),
Sizes( :Name( "Population (July 2009)" ) ),
Time( :Date ),
Coloring( :Region ),
ID( :State ),
Speed( 54.09 ),
Time Index( 32.7005249999998 ),
Trail Lines( 1 ),
All Labels( 0 ),
Show Roles( 1 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Min( 3125000000 ), Max( 3350000000 ), Interval( "Month" ), Inc( 19.0128526884174 ), Minor Ticks( 1 )}
),
Dispatch( {}, "2", ScaleBox, {Max( 20000 ), Inc( 5000 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 480, 317 ) )
)
);
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to Date.
- Set Y axis to Flu Cases.
- Define bubble sizes by Population.
- Use Date for time animation.
- Color bubbles by Region.
- Identify bubbles by State.
- Set animation speed.
- Configure report settings.
Example 42
Summary: Creates a bubble plot with log-scaled axes and local data filtering for European regions, utilizing JMP's Bubble Plot platform.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Title Position( 0, 0 ),
Lock Scales( 0 ),
Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "Europe" ), Display( :Region, N Items( 11 ) ) ) )
);
(bp << Report)[AxisBox( 2 )] << Scale( "Log" ) << Min( 0.575 ) << Max( 0.75 ) << Inc( 1 );
(bp << Report)[AxisBox( 1 )] << Scale( "Log" ) << Min( 0.035 ) << Max( 0.175 ) << Inc( 1 );
bp << Redo Analysis;
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Set title position.
- Unlock axis scales.
- Add local data filter.
- Set X-axis to log scale.
- Set Y-axis to log scale.
Example 43
Summary: Creates a bubble plot with local data filtering and customized axis scales, visualizing Portion 0-19 on the X-axis, Portion60+ on the Y-axis, and Pop as bubble sizes.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Title Position( 0, 0 ),
Lock Scales( 0 ),
Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "Europe" ), Display( :Region, N Items( 11 ) ) ) )
);
(bp << Report)[AxisBox( 2 )] << Scale( "Log" ) << Min( 0.575 ) << Max( 0.75 ) << Inc( 1 );
(bp << Report)[AxisBox( 1 )] << Scale( "Log" ) << Min( 0.035 ) << Max( 0.175 ) << Inc( 1 );
bp << Redo Analysis;
bp << Close Window;
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Set bubble sizes.
- Position title.
- Unlock scales.
- Add local data filter.
- Set X axis scale.
- Set Y axis scale.
Example 44
Summary: Creates a bubble plot with specified X, Y, and size variables from an open data table.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Date.
- Set Y axis to # defects.
- Use Unit size for bubble sizes.
- Set circle size to 4.5.
- Disable bubble fill.
- Enable all labels.
Example 45
Summary: Creates a bubble plot with sizes defined by Unit size, circle size set to 4.5, and all labels enabled.
Code:
Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis to Date.
- Set Y-axis to # defects.
- Define sizes by Unit size.
- Set circle size to 4.5.
- Disable filled circles.
- Enable all labels.
Example 46
Summary: Creates a bubble plot with specified X-axis, Y-axis, and size settings to visualize data from an open JMP data table.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Date.
- Set Y-axis to # defects.
- Set sizes by Unit size.
- Set circle size to 4.5.
- Disable fill color.
- Enable all labels.
- Enable fill color.
- Disable all labels.
Example 47
Summary: Creates a bubble plot with specified X-axis, Y-axis, and size attributes to visualize data from a JMP data table.
Code:
Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis to Date.
- Set Y-axis to # defects.
- Use Unit size for sizes.
- Set circle size to 4.5.
- Disable filling.
- Enable all labels.
- Enable filling.
- Disable all labels.
Example 48
Summary: Creates a bubble plot with specified X-axis, Y-axis, and size variables from a data table, while enabling/disabling fill and labels.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
dt << Select Rows( 21 );
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis.
- Set Y-axis.
- Define sizes.
- Set circle size.
- Disable fill.
- Enable labels.
- Enable fill.
- Disable labels.
- Select specific rows.
Example 49
Summary: Creates a bubble plot with specified X-axis, Y-axis, and size variables, while disabling fill and enabling all labels.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
dt << Select Rows( 21 );
myBP << Filled( 0 );
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to "Date".
- Set Y-axis to "# defects".
- Set sizes to "Unit size".
- Set circle size to 4.5.
- Disable fill.
- Enable all labels.
- Select row 21.
- Disable fill again.
Example 50
Summary: Creates a bubble plot with customized frame box and dispatch segment for visualization, utilizing JMP's Bubble Plot platform.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :Date ),
Y( :Name( "# defects" ) ),
Sizes( :Unit size ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
DispatchSeg( CustomStreamSeg( 1 ), {Fill Color( {128, 128, 0} ), Text Color( {253, 250, 204} ), Font( {"", 16, 3} )} )
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to Date.
- Set Y axis to # defects.
- Set sizes to Unit size.
- Send report to display.
- Customize frame box.
- Dispatch segment for customization.
- Set fill color to yellow.
- Set text color to light yellow.
Example 51
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :OZONE ),
Y( :city ),
Sizes( :POP ),
Coloring( :Region ),
ID( :State ),
Circle Size( 2.2 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 360, 774 ) ) )
);
Code Explanation:
- Open table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define sizes variable.
- Set coloring variable.
- Assign ID variable.
- Adjust circle size.
- Enable all labels.
- Resize frame.
Example 52
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time.
Code:
Open("data_table.jmp");
myBP = Bubble Plot(
X( :OZONE ),
Y( :city ),
Sizes( :POP ),
Coloring( :Region ),
ID( :State ),
Circle Size( 2.2 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 360, 774 ) ) )
);
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis to OZONE.
- Set Y-axis to city.
- Use POP for bubble sizes.
- Color bubbles by Region.
- Identify bubbles by State.
- Set circle size to 2.2.
- Display all labels.
- Adjust frame size.
Example 53
Summary: Creates a bubble plot with specified attributes, including X-axis ozone levels, Y-axis city names, and circle sizes based on population data.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :OZONE ),
Y( :city ),
Sizes( :POP ),
Coloring( :Region ),
ID( :State ),
Circle Size( 2.2 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 360, 774 ) ) )
);
myBP << Filled( 0 );
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to OZONE.
- Set Y axis to city.
- Set bubble sizes by POP.
- Color bubbles by Region.
- Identify bubbles by State.
- Set circle size to 2.2.
- Enable all labels.
- Adjust frame size to 360x774.
- Disable filled option.
Example 54
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :Region ),
Y( :NO ),
ID( :city ),
Circle Size( 0.001 ),
Filled( 0 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 585, 550 ) ) )
);
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis to Region.
- Set Y-axis to NO.
- Use city for labels.
- Set circle size.
- Disable filled circles.
- Enable all labels.
- Adjust frame size.
- Display report.
Example 55
Summary: Creates a bubble plot with X-axis as DAY, Y-axis as DIAMETER, and coloring by Phase using JMP's Bubble Plot function.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Coloring( :Phase ) );
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X-axis to DAY.
- Set Y-axis to DIAMETER.
- Color bubbles by Phase.
Example 56
Summary: Creates a bubble plot with sizes based on Phase, using data from an open JMP data table.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Sizes( :Phase ) );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to DAY.
- Set Y-axis to DIAMETER.
- Use Phase for sizes.
Example 57
Summary: Creates a bubble plot with circle size defined, using JMP's Bubble Plot platform.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Circle Size( 0.0375 ) );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define circle size.
Example 58
Summary: Creates a bubble plot with sizes based on :Max deg. F Jan, colored by :Region, and labeled with :State and :City.
Code:
dt4 = Open("data_table.jmp");
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Max deg. F Jan ),
Coloring( :Region ),
ID( :State, :City ),
All Labels( 0 ),
Size as Sum( 0 )
);
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to :X.
- Set Y axis to :Y.
- Set sizes to :Max deg. F Jan.
- Color by :Region.
- Use :State, :City for ID.
- Disable all labels.
- Disable size as sum.
Example 59
Summary: Creates a bubble plot with sizes based on :Max deg. F Jan and coloring by :Region, using data from the 'data_table.jmp' file.
Code:
Open("data_table.jmp");
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Max deg. F Jan ),
Coloring( :Region ),
ID( :State, :city ),
All Labels( 0 ),
Size as Sum( 0 )
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis to :X column.
- Set Y axis to :Y column.
- Use :Max deg. F Jan for sizes.
- Color bubbles by :Region.
- Identify bubbles by :State and :city.
- Disable all labels.
- Do not sum bubble sizes.
- Display Bubble Plot.
Example 60
Summary: Creates a bubble plot with sizes defined by 'Max deg. F Jan' and colored by 'Region', featuring IDs for 'State' and 'city', without summing sizes, and splitting all bubbles.
Code:
dt4 = Open("data_table.jmp");
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Max deg. F Jan ),
Coloring( :Region ),
ID( :State, :city ),
All Labels( 0 ),
Size as Sum( 0 )
);
myBP << Split All;
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X-axis to "X".
- Set Y-axis to "Y".
- Define bubble sizes by "Max deg. F Jan".
- Color bubbles by "Region".
- Use "State" and "city" for IDs.
- Disable all labels.
- Do not sum sizes.
- Split all bubbles.
Example 61
Summary: Creates a bubble plot with combined bubbles for California, adding annotations to highlight specific information.
Code:
dt4 = Open("data_table.jmp");
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Max deg. F Jan ),
Coloring( :Region ),
ID( :State, :city ),
All Labels( 0 ),
Size as Sum( 0 )
);
dt4 << select where( :State == "CA" );
myBP << Combine;
myBP << SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
{Add Text Annotation( Text( "CA bubbles should be combined" ), Text Box( {10, 204, 159, 227} ) ),
Add Line Annotation( Line( {75, 41}, {30, 129} ), Color( "Yellow" ) )}
)
);
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to :X.
- Set Y axis to :Y.
- Set bubble sizes to :Max deg. F Jan.
- Set coloring to :Region.
- Set ID to :State and :city.
- Disable all labels.
- Disable size as sum.
- Select rows where State is "CA".
- Combine selected bubbles.
- Add text annotation.
- Add yellow line annotation.
Example 62
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing Open() to load data from a JMP data table.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Salary ),
Y( :Age in Years ),
Sizes( :Years in Current Position ),
Coloring( :Gender ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 20000 ), Max( 210000 ), Inc( 20000 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 22.5 ), Max( 75 ), Inc( 5 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 36 ),
Index Row( 36 ),
UniqueID( 596041396 ),
FoundPt( {389, 157} ),
Origin( {149833.333333333, 57.7916666666667} )
)
)
)
);
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign coloring variable.
- Position title.
- Configure X-axis scale.
- Configure Y-axis scale.
- Add pin annotation.
Example 63
Summary: Creates a bubble plot to visualize female records based on height and weight, using sex as an ID variable.
Code:
dt = Open("data_table.jmp");
dt << select where( :sex == "F" );
bp_id = Bubble Plot( X( :height ), Y( :weight ), ID( :sex ), Filled( 0 ), );
Code Explanation:
- Open data table;
- Select female records.
- Create bubble plot.
- Set X axis to height.
- Set Y axis to weight.
- Use sex for IDs.
- Disable filled bubbles.
Example 64
Summary: Creates a bubble plot with X-axis set to height and Y-axis set to weight, filtering female records from the data table.
Code:
dt = Open("data_table.jmp");
dt << select where( :sex == "F" );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Filled( 0 ), );
Code Explanation:
- Open data table;
- Select female records.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Disable filled bubbles.
Example 65
Summary: Generates a bubble plot to visualize the relationship between production budget and lead studio name, with coloring by genre, and interactive filtering by lead studio name values.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Production Budget ),
Y( :Lead Studio Name ),
Coloring( :Genre ),
Title Position( 0, 0 ),
Local Data Filter(
Add Filter(
columns( :Lead Studio Name ),
Where(
:Lead Studio Name == {"CBS Films", "Columbia", "Disney", "DreamWorks", "DreamWorks Animation", "DreamWorks Pictures",
"Happy Madison", "Happy Madison Productions", "Independent"}
),
Display( :Lead Studio Name, Size( 160, 225 ), List Display )
)
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Best", 10 ), Min( -25 ), Max( 275 ), Inc( 50 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( -0.5 ), Max( 32.5 ), Inc( 1 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 529, 625 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis to Production Budget.
- Set Y-axis to Lead Studio Name.
- Color bubbles by Genre.
- Set title position.
- Add local data filter.
- Filter Lead Studio Name values.
- Configure filter display.
- Adjust axis scales and frame size.
Example 66
Summary: Creates a bubble plot with interactive features, including X-axis Longitude, Y-axis Latitude, and coloring by Landfall status in the USA.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Name( "Wind (Knots)" ) ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 220 ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Longitude DDD", "PUNDIR", 20, 0 ), Min( -110 ), Max( 10 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox,
{Format( "Latitude DDD", "PUNDIR", 20, 0 ), Min( -9.99999999999999 ), Max( 80 ), Inc( 10 ), Minor Ticks( 0 )}
),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Images( "NASA server" ) ), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
);
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to Longitude.
- Set Y-axis to Latitude.
- Define sizes by Wind speed.
- Add time series by Date.
- Color bubbles by Landfall status.
- Use Name and ID for identification.
- Set animation speed to 220.
- Configure title position and background map.
Example 67
Summary: Generates a bubble plot to visualize the relationship between weight and height, colored by age and identified by name, grouped by sex.
Code:
Open("data_table.jmp");
Bubble Plot( X( :weight ), Y( :height ), Coloring( :age ), ID( :name ), Title Position( 0, 0 ), By( :sex ) );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis to weight.
- Set Y-axis to height.
- Color bubbles by age.
- Identify bubbles by name.
- Set title position.
- Group plots by sex.
Example 68
Summary: Creates a bubble plot to visualize relationships between weight, height, and age, while also performing an one-way analysis of height by sex with means displayed.
Code:
Open("data_table.jmp");
Bubble Plot( X( :weight ), Y( :height ), Coloring( :age ), ID( :name ), Title Position( 0, 0 ), By( :sex ) );
Oneway( Y( :height ), X( :sex ), By( :age ), Means( 1 ), Mean Diamonds( 1 ) );
Code Explanation:
- Open data_table data
- Create bubble plot.
- Set X to weight.
- Set Y to height.
- Color by age.
- Use name for ID.
- Position title at origin.
- Group by sex.
- Perform one-way analysis.
- Analyze height by sex.
- Group by age.
- Show means.
- Display mean diamonds.
Example 69
Summary: Creates a bubble plot with sizes variable 'Pop' and coloring by 'Region', using data from an open JMP data table.
Code:
dt = Open("data_table.jmp");
obj = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
Time( :Year ),
Coloring( :Region )
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define sizes variable.
- Assign ID variable.
- Specify time variable.
- Apply coloring variable.
- Display bubble plot.
Example 70
Summary: Creates a bubble plot with interactive roles, displaying portion distribution across countries over time.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
obj = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
Time( :Year ),
Coloring( :Region )
);
obj << Show Roles( 1 );
Code Explanation:
- Set default names.
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Set size variable.
- Set ID variable.
- Set time variable.
- Set coloring variable.
- Show roles in plot.
Example 71
Summary: Creates three bubble plots with varying time annotation settings, using 'weight' as the X-axis, 'height' as the Y-axis, and 'weight' for bubble sizes. The plots also include customized scales for 'weight' and 'height'.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :weight ),
Y( :height ),
Sizes( :weight ),
Time( :age ),
ID( :sex, :name ),
Title Position( 149.5, 58.38 ),
SendToReport(
Dispatch( {}, "weight", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 90 ), Max( 160 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "height", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 56 ), Max( 70 ), Inc( 2 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 564, 360 )} )
)
);
Bubble Plot(
X( :weight ),
Y( :height ),
Sizes( :weight ),
Time( :age ),
ID( :sex, :name ),
Show Time Annotation( 0 ),
Title Position( 149.5, 58.38 ),
SendToReport(
Dispatch( {}, "weight", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 90 ), Max( 160 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "height", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 56 ), Max( 70 ), Inc( 2 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 564, 360 )} )
)
);
Bubble Plot(
X( :weight ),
Y( :height ),
Sizes( :weight ),
Time( :age ),
ID( :sex, :name ),
Show Time Annotation( 1 ),
Title Position( 149.5, 58.38 ),
SendToReport(
Dispatch( {}, "weight", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 90 ), Max( 160 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "height", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 56 ), Max( 70 ), Inc( 2 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 564, 360 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to weight.
- Set Y axis to height.
- Set bubble sizes to weight.
- Add time variable age.
- Use sex and name for ID.
- Position title.
- Format weight scale.
- Format height scale.
- Set frame size.
- Repeat steps 2-11.
- Disable time annotation.
- Repeat steps 2-11.
- Enable time annotation.
Example 72
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the Bubble Plot platform in JMP.
Code:
Open("data_table.jmp");
bp = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Circle Size( 20047.1698113208 ),
Time Index( 2 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( "Log" ), Format( "Best" ), Min( 0.0001 ), Max( 238471 ), Inc( 1 ), Minor Ticks( 8 )} )
)
);
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Assign nation IDs.
- Set circle size constant.
- Select time index.
- Disable all labels.
- Adjust X scale to log.
- Set X axis format.
- Define X axis min value.
- Define X axis max value.
- Set X axis increment.
- Set X axis minor ticks.
Example 73
Summary: Creates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption by nation over time, with custom circle size and scale settings.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Circle Size( 20047.1698113208 ),
Time Index( 2 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( "Log" ), Format( "Best" ), Min( 0.0001 ), Max( 238471 ), Inc( 1 ), Minor Ticks( 8 )} )
)
);
bp << Title Position( 50000, 10 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Identify nations.
- Set initial circle size.
- Set time index.
- Disable all labels.
Example 74
Summary: Creates a bubble plot to visualize SAT Math and Verbal scores by Region and State, with filtering applied to only include Northeast regions.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :SAT Math ), Y( :SAT Verbal ), ID( :Region, :State ), All Labels( 0 ) );
dt << Select Where( :Region == "Northeast" );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Use Region and State for IDs.
- Disable all labels.
- Select rows where Region is Northeast.
Example 75
Summary: Creates a bubble plot to visualize SAT Math and Verbal scores by Region, with interactive filtering capabilities.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :SAT Math ), Y( :SAT Verbal ), ID( :Region, :State ), All Labels( 0 ) );
dt << Select Where( :Region == "Northeast" );
bp << Split;
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define ID variables.
- Hide all labels.
- Select Northeast region.
- Split bubble plot.
Example 76
Summary: Creates a bubble plot with coloring based on region, using data from 'data_table.jmp'.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Coloring( :Region ), ID( :Region, :Country ), );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Apply coloring variable.
- Assign ID variables.
Example 77
Summary: Creates a bubble plot to visualize SAT Math and Verbal scores by region and state, with sizes defined by percentage taking in 2004.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :Name( "% Taking (2004)" ) ),
Time( :Year ),
ID( :Region, :State ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 550, 336 ) ) )
);
bp << Split( "Midwest" );
bp << Split( "South" );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis to SAT Math.
- Set Y axis to SAT Verbal.
- Define sizes by % Taking (2004).
- Use Year for time series.
- Identify by Region and State.
- Enable all labels.
- Adjust frame size.
- Split plot by Midwest.
- Split plot by South.
Example 78
Summary: Creates a bubble plot with sizes based on a specific condition, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :Name( "% Taking (2004)" ) ),
Time( :Year ),
ID( :Region, :State ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 550, 336 ) ) )
);
bp << Split( "Midwest" );
bp << Split( "South" );
bp << Combine( "Midwest" );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Assign ID variables.
- Display all labels.
- Adjust report size.
- Split plot by "Midwest".
- Split plot by "South".
- Combine plot for "Midwest".
Example 79
Summary: Creates a bubble plot with geographic coordinates, population sizes, and household income coloring, utilizing the SendToReport feature to customize the plot's appearance.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Population ),
Coloring( :Household Income ),
ID( :Region, :State ),
Color Levels( [34343 42445.25 50547.5 58649.75 66752] ),
Title Position( 0, 0 ),
Split( "S" ),
Split( "W" ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -123.898831018519 ), Max( -76.2327199074075 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox,
{Scale( "Geodesic US" ), Min( 20.1752083333333 ), Max( 55.9247916666667 ), Inc( 10 ), Minor Ticks( 0 )}
),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Boundaries( "US States" ) ), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
);
Code Explanation:
- Open data_table data
- Create Bubble Plot object.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Use Population for bubble sizes.
- Color bubbles by Household Income.
- Identify bubbles by Region and State.
- Define color levels for income.
- Set title position.
- Split plot by "S" and "W".
Example 80
Summary: Creates a bubble plot with geographic mapping, using Longitude and Latitude as axes, Population for bubble sizes, and NO variable for coloring, while identifying by Region and State.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :POP ),
Coloring( :NO ),
ID( :Region, :State ),
Color Levels( [0.012 0.02425 0.0365 0.04875 0.061] ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Scale( "Geodesic US" ), Min( -125 ), Max( -70 ), Inc( 10 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Scale( "Geodesic US" ), Min( 14.875 ), Max( 56.125 ), Inc( 2 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Images( "Detailed Earth" ), Boundaries( "US States" ) ), Grid Line Order( 3 ), Reference Line Order( 4 )}
)
)
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set Longitude as X-axis.
- Set Latitude as Y-axis.
- Use Population for bubble sizes.
- Color by NO variable.
- Identify by Region and State.
- Define color levels.
- Set title position.
- Configure report settings.
Example 81
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the Bubble Plot object in JMP.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Birth ),
Y( :Death ),
Time( :Year ),
ID( :Country ),
Bubble Size( 13.5849056603774 ),
Time Index( 4.1 ),
Show Roles( 1 ),
Title Position( 26.625, 11.8 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 7.5 ), Max( 30 ), Inc( 5 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 5 ), Max( 13 ), Inc( 1 ), Minor Ticks( 0 )} )
)
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis to Birth.
- Set Y axis to Death.
- Set Time axis to Year.
- Set ID to Country.
- Set Bubble Size.
- Set Time Index.
- Show Roles.
- Set Title Position.
- Customize X axis scale.
- Customize Y axis scale.
Example 82
Summary: Creates a bubble plot with X-axis set to weight, Y-axis set to height, time variable set to age, and identification using name.
Code:
Open("data_table.jmp");
Bubble Plot( X( :weight ), Y( :height ), Time( :age ), ID( :name ) );
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to weight.
- Set Y-axis to height.
- Set time variable to age.
- Use name for identification.
Example 83
Summary: Creates a bubble plot with sizes defined by a specific condition, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :Name( "% Taking (2004)" ) ),
Time( :Year ),
ID( :State ),
All Labels( 1 ),
No Labels( 0 ),
Title Position( 540, 500 ),
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Use state as ID.
- Show all labels.
- Disable no labels.
- Set title position.
Example 84
Summary: Creates a bubble plot with trail lines and bubbles to visualize population against SAT Math scores, identifying states by color.
Code:
Open("data_table.jmp");
bp = Bubble Plot( X( :Population ), Y( :SAT Math ), ID( :State ), All Labels( 0 ) );
bp << Trail Lines( 1 );
bp << Trail Bubbles( 1 );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Identify by state.
- Hide all labels.
- Enable trail lines.
- Enable trail bubbles.
Example 85
Summary: Creates a bubble plot with trail lines and bubbles, selecting specific rows from a data table.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Population ), Y( :SAT Math ), ID( :State ), All Labels( 0 ) );
bp << Trail Lines( 1 );
bp << Trail Bubbles( 1 );
dt << Select Rows( 33 :: 40 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Identify data points.
- Disable all labels.
- Add trail lines.
- Add trail bubbles.
- Select specific rows.
Example 86
Summary: Creates a bubble plot with trail lines, using the 'Portion 0-19' variable as the X-axis and 'Portion60+' as the Y-axis, while also displaying sizes based on 'Pop', time index at 30, and ID variables 'Region' and 'Country'.
Code:
Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
bp << time index( 30 );
bp << Trail Lines( "All" );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Assign ID variables.
- Set time index.
- Enable trail lines.
- Display all trail lines.
Example 87
Summary: Creates a bubble plot with trail lines and bubbles to visualize data from 'data_table.jmp', using X-axis variable 'Portion 0-19', Y-axis variable 'Portion60+', and bubble sizes based on 'Pop'.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
bp << time index( 30 );
bp << Trail Lines( "All" );
bp << Trail Bubbles( "All" );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Assign ID variables.
- Set time index.
- Enable trail lines.
- Enable trail bubbles.
Example 88
Summary: Creates a bubble plot with interactive steps, allowing users to explore relationships between age, height, and sex.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :age ), Y( :height ), Time( :age ), Coloring( :sex ), ID( :sex ), );
dt << Add Rows( 10 );
bp << Step;
bp << Step;
bp << Step;
bp << Step;
bp << Step;
dt << Select Rows( 41 :: 50 );
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to age.
- Set Y axis to height.
- Use age for time.
- Color by sex.
- Identify by sex.
- Add 10 rows to dataset.
- Step forward in plot.
- Select rows 41 to 50.
Example 89
Summary: Generates a bubble plot with interactive steps to visualize age, height, and sex data, adding new rows and deleting selected ones.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :age ), Y( :height ), Time( :age ), Coloring( :sex ), ID( :sex ), );
dt << Add Rows( 10 );
bp << Step;
bp << Step;
bp << Step;
bp << Step;
bp << Step;
dt << Select Rows( 41 :: 50 );
dt << Delete Rows;
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to age.
- Set Y-axis to height.
- Set time variable to age.
- Color bubbles by sex.
- Identify bubbles by sex.
- Add 10 new rows.
- Advance plot animation step.
- Advance plot animation step.
- Advance plot animation step.
- Advance plot animation step.
- Advance plot animation step.
- Select last 10 rows.
- Delete selected rows.
Example 90
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, using the Open() function to load data from a JMP data table.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Date ),
Y( :Close ),
Sizes( :Moving Average ),
Time( :Date ),
Time Index( 22.3 ),
Trail Lines( "All" ),
Title Position( 3401483328, 24.595 )
);
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis to Date.
- Set Y-axis to Close.
- Define bubble sizes.
- Set time axis to Date.
- Set time index value.
- Enable trail lines for all points.
- Set title position.
Example 91
Summary: Creates a bubble plot with coloring based on transformed height data, utilizing the Bubble Plot platform in JMP.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :weight ),
Y( :height ),
Coloring( Transform Column( "Log[height]", Formula( Log( :height ) ) ) ),
Color Levels( [3.93182563272433 4.01099303505558 4.09016043738684 4.1693278397181 4.24849524204936] )
);
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X axis to weight.
- Set Y axis to height.
- Define coloring using transformed column.
- Transform column name is "Log[height]".
- Apply log transformation formula.
- Set color levels manually.
- Specify four color levels.
- Add fifth color level.
Example 92
Summary: Creates a bubble plot with log-transformed height coloring and customized scales for weight and height, utilizing JMP's Bubble Plot platform.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :weight ),
Y( :height ),
Coloring( Transform Column( "Log[height]", Formula( Log( :height ) ) ) ),
Color Levels( [3.93182563272433 4.01099303505558 4.09016043738684 4.1693278397181 4.24849524204936] ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 60 ), Max( 180 ), Inc( 20 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Format( "Fixed Dec", 12, 0 ), Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 )} )
)
);
Code Explanation:
- Open data table;
- Create Bubble Plot.
- Set X axis to weight.
- Set Y axis to height.
- Add log-transformed height for coloring.
- Define color levels.
- Set title position.
- Format X scale.
- Format Y scale.
- Adjust minor ticks on Y axis.
Example 93
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing SendToReport dispatches to customize axis scales and frame sizes.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Coloring( :Region ),
ID( :Region ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "Portion 0-19", ScaleBox,
{Format( "Best", 10 ), Min( 0.647773805855306 ), Max( 0.78 ), Inc( 0.02 ), Minor Ticks( 0 )}
),
Dispatch( {}, "Portion60+", ScaleBox, {Format( "Best", 9 ), Min( 0.02 ), Max( 0.086056070820709 ), Inc( 0.01 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 7 ),
Index Row( -1 ),
UniqueID( 7 ),
FoundPt( {263, 196} ),
Origin( {0.695705801232757, 0.0585327079787469} ),
Offset( {21, -82} ),
RightOfCenter( 0 ),
Tag Line( 1 ),
Text Color( "Black" ),
Background Color( {230, 230, 230} )
)
)
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Apply coloring by region.
- Use region for ID.
- Position title.
- Format X axis scale.
- Format Y axis scale.
- Add pin annotation.
Example 94
Summary: Creates two bubble plots with customized scales and pin annotations to visualize height and weight data, while also setting ID variables for age and name.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :height ),
Y( :weight ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 50 ), Max( 72.5 ), Inc( 5 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 60 ), Max( 180 ), Inc( 20 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 22 ),
Index Row( 22 ),
UniqueID( 584397510 ),
FoundPt( {385, 222} ),
Origin( {64.859375, 118.333333333333} ),
Offset( {32, 78} )
)
)
)
);
Bubble Plot(
X( :height ),
Y( :weight ),
ID( :age, :name ),
Title Position( 0, 0 ),
Split( 14 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 58 ), Max( 69 ), Inc( 2 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 80 ), Max( 150 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 127 ),
Index Row( 127 ),
UniqueID( 751832335 ),
FoundPt( {324, 335} ),
Origin( {63.8666666666667, 92.0555555555556} )
)
)
)
);
Code Explanation:
- Open data table;
- Create first bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Position title at origin.
- Customize X-axis scale.
- Customize Y-axis scale.
- Add pin annotation to plot.
- Create second bubble plot.
- Set ID variables to age and name.
Example 95
Summary: Creates a bubble plot with selection for specific regions, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) );
dt << Select Where( :Region == "Europe" | :Region == "North America" );
obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) );
Code Explanation:
- Open data table.
- Create initial bubble plot.
- Select specific regions.
- Update bubble plot with selection.
Example 96
Summary: Creates a bubble plot with filtered data, using JMP's Bubble Plot platform to visualize population distribution across regions and countries over time.
Code:
dt = Open("data_table.jmp");
obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) );
dt << Select Where( :Region == "Europe" | :Region == "North America" );
obj = dt << Bubble Plot( X( :"Portion 0-19"n ), Y( :"Portion60+"n ), Sizes( :Pop ), ID( :Region, :Country ), Time( :Year ) );
obj << Label Offset( {4, -75, -43}, {7, 80, -34} );
Code Explanation:
- Open data table;
- Create bubble plot with specified variables.
- Select rows where Region is Europe or North America.
- Create bubble plot again with filtered data.
- Set label offset for the plot.
Example 97
Summary: Creates a bubble plot with log-scaled axes, sizes based on 'Pop', and a local data filter for 'Region' equal to 'Europe'.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :"Portion 0-19"n ),
Y( :"Portion60+"n ),
Sizes( :Pop ),
Title Position( 0, 0 ),
Lock Scales( 0 ),
Local Data Filter( Add Filter( columns( :Region ), Where( :Region == "Europe" ), Display( :Region, N Items( 11 ) ) ) )
);
(bp << Report)[AxisBox( 2 )] << Scale( "Log" ) << Min( 0.575 ) << Max( 0.75 ) << Inc( 1 );
(bp << Report)[AxisBox( 1 )] << Scale( "Log" ) << Min( 0.035 ) << Max( 0.175 ) << Inc( 1 );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Position title.
- Unlock scales.
- Add local data filter.
- Set Y axis scale to log.
- Set X axis scale to log.
Example 98
Summary: Creates a bubble plot with interactive roles display, utilizing X-axis variable 'Rotten Tomatoes Score', Y-axis variable 'Movie Name', sizes variable 'Audience Score', time variable 'Genre', and coloring variable 'BOA Opening Wknd'.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Movie Name ),
Sizes( :Audience Score ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Show Roles( 1 ),
X as Sum( 1 ),
Size as Sum( 0 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis variable.
- Set Y axis variable.
- Define sizes variable.
- Set time variable.
- Define coloring variable.
- Enable roles display.
- Aggregate X values.
- Do not aggregate sizes.
Example 99
Summary: Generates a bubble plot to visualize the relationship between Movie Name, Rotten Tomatoes Score, and Audience Score, with Genre as the time axis and BOA Opening Wknd coloring.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Show Roles( 1 ),
Y as Sum( 1 ),
Size as Sum( 0 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Movie Name.
- Set Y-axis to Rotten Tomatoes Score.
- Set sizes to Audience Score.
- Set time axis to Genre.
- Set coloring to BOA Opening Wknd.
- Enable roles display.
- Aggregate Y values by sum.
- Do not aggregate size values.
Example 100
Summary: Creates a bubble plot with interactive features, displaying movie names on the X-axis, Rotten Tomatoes scores on the Y-axis, and audience scores as bubble sizes, while coloring bubbles by BOA opening weekend.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to movie names.
- Set Y-axis to Rotten Tomatoes scores.
- Define bubble sizes by audience scores.
- Use genre for time axis.
- Color bubbles by BOA opening weekend.
- Display roles in plot.
Example 101
Summary: Generates a bubble plot to visualize movie data, with X-axis representing Movie Name, Y-axis representing Rotten Tomatoes Score, and sizes determined by Audience Score. The plot also includes coloring based on BOA Opening Wknd.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Show Roles( 1 ),
Size as Sum( 0 ),
Color as Sum( 1 ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis: Movie Name.
- Set Y axis: Rotten Tomatoes Score.
- Set bubble sizes: Audience Score.
- Set time axis: Genre.
- Set coloring: BOA Opening Wknd.
- Enable roles display.
- Disable size summation.
- Enable color summation.
Example 102
Summary: Generates a bubble plot to visualize the relationship between Rotten Tomatoes Score, Theme, and Production Budget, with additional dimensions of Genre and BOA Opening Wknd.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Theme ),
Sizes( :Production Budget ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Time Index( 6 ),
Show Roles( 1 ),
X as Sum( 1 ),
Color as Sum( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Rotten Tomatoes Score.
- Set Y axis to Theme.
- Define sizes by Production Budget.
- Use Genre for time dimension.
- Color bubbles by BOA Opening Wknd.
- Set time index to 6.
- Show roles in plot.
- Aggregate X values as sum.
- Aggregate color values as sum.
Example 103
Summary: Creates a bubble plot with sizes defined by Genre, coloring by Theme, and identification of Genre and Lead Studio Name.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Theme ),
Sizes( :Genre ),
Time( :Theme ),
Coloring( :Theme ),
ID( :Genre, :Lead Studio Name ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Movie Name.
- Set Y-axis to Theme.
- Define sizes by Genre.
- Use Theme for time dimension.
- Color bubbles by Theme.
- Identify Genre and Lead Studio Name.
- Display roles in bubble plot.
- Show bubble plot.
Example 104
Summary: Creates a bubble plot with sizes and coloring defined, utilizing the Bubble Plot platform in JMP.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Theme ), Sizes( :Genre ), Coloring( :Lead Studio Name ), Show Roles( 1 ), );
Code Explanation:
- Open table.
- Create bubble plot.
- Set X axis.
- Set Y axis.
- Define sizes.
- Define colors.
- Show roles.
Example 105
Summary: Creates a bubble plot with Movie Name on the X-axis, Genre on the Y-axis, and Theme as IDs, displaying roles.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Genre ), ID( :Theme ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis: Movie Name.
- Set Y axis: Genre.
- Use Theme for IDs.
- Display roles.
Example 106
Summary: Creates a bubble plot with ID roles, using 'Movie Name' as the X-axis, 'Theme' as the Y-axis, and 'Lead Studio Name' and 'Genre' for secondary IDs.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Theme ), ID( :Lead Studio Name, :Genre ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Movie Name.
- Set Y-axis to Theme.
- Use Lead Studio Name for ID.
- Use Genre for secondary ID.
- Display roles in plot.
Example 107
Summary: Creates a bubble plot with sizes based on Genre, showcasing Movie Name and Theme, using Open() to load data from 'data_table.jmp'.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Theme ), Sizes( :Genre ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Movie Name.
- Set Y-axis to Theme.
- Use Genre for bubble sizes.
- Show roles in plot.
Example 108
Summary: Creates a bubble plot with X-axis variable 'Movie Name', Y-axis variable 'Genre', and time variable 'Lead Studio Name' from an open data table.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Genre ), Time( :Lead Studio Name ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Set time variable.
- Show roles in plot.
Example 109
Summary: Creates a bubble plot with sizes defined by theme, colored by genre, and displaying roles in JMP.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Movie Name ), Y( :Lead Studio Name ), Sizes( :Theme ), Time( :Genre ), Coloring( :Genre ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Movie Name.
- Set Y-axis to Lead Studio Name.
- Define sizes by Theme.
- Use Genre for time dimension.
- Color bubbles by Genre.
- Display roles in plot.
Example 110
Summary: Generates a bubble plot to visualize the relationship between Production Budget and Profitability, with additional dimensions of Size, Audience Score, and Rotten Tomatoes Score.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Production Budget ),
Y( :Profitability ),
Sizes( :Size ),
Time( :Audience Score ),
Coloring( :Rotten Tomatoes Score ),
ID( :Domestic Gross, :World Gross ),
By( :Genre ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis to Production Budget.
- Set Y axis to Profitability.
- Define bubble sizes by Size.
- Use Audience Score for time dimension.
- Color bubbles by Rotten Tomatoes Score.
- Identify Domestic Gross and World Gross.
- Group data by Genre.
- Show all roles in plot.
Example 111
Summary: Creates a bubble plot with sizes defined by World Gross and colored by Rotten Tomatoes Score, using the Open data table function to load the 'data_table.jmp' file.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Audience Score ), Y( :Profitability ), Sizes( :World Gross ), Coloring( :Rotten Tomatoes Score ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Audience Score.
- Set Y-axis to Profitability.
- Define sizes by World Gross.
- Color bubbles by Rotten Tomatoes Score.
Example 112
Summary: Creates a bubble plot with X-axis set to Production Budget, Y-axis set to Profitability, and IDs based on Rotten Tomatoes Score.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Production Budget ), Y( :Profitability ), ID( :Rotten Tomatoes Score ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Production Budget.
- Set Y axis to Profitability.
- Use Rotten Tomatoes Score for IDs.
Example 113
Summary: Creates a bubble plot with two IDs, displaying production budget on the x-axis and profitability on the y-axis.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Production Budget ), Y( :Profitability ), ID( :Domestic Gross, :World Gross ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Production Budget.
- Set Y-axis to Profitability.
- Use Domestic Gross for ID.
- Use World Gross for ID2.
- Display roles in plot.
- End script.
Example 114
Summary: Creates a bubble plot with X-axis set to Domestic Gross, Y-axis set to Theaters Opening Wknd, and bubble sizes set to Profitability.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Domestic Gross ), Y( :Theaters Opening Wknd ), Sizes( :Profitability ), );
Code Explanation:
- Open data table;
- Create bubble plot object.
- Set X-axis to Domestic Gross.
- Set Y-axis to Theaters Opening Wknd.
- Set bubble sizes to Profitability.
Example 115
Summary: Creates a bubble plot with X-axis set to Audience Score, Y-axis set to World Gross, and Time axis set to Profitability, using data from an open JMP data table.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Audience Score ), Y( :World Gross ), Time( :Profitability ), );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis: Audience Score.
- Set Y axis: World Gross.
- Set Time axis: Profitability.
Example 116
Summary: Creates a bubble plot with interactive features, displaying Production Budget on the X-axis, Profitability on the Y-axis, and World Gross as size markers, colored by Rotten Tomatoes Score.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Production Budget ),
Y( :Profitability ),
Sizes( :World Gross ),
Time( :Audience Score ),
Coloring( :Rotten Tomatoes Score ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X-axis to "Production Budget".
- Set Y-axis to "Profitability".
- Set sizes to "World Gross".
- Set time to "Audience Score".
- Set coloring to "Rotten Tomatoes Score".
Example 117
Summary: Creates a bubble plot with coloring, sizing, and show roles from a data table, utilizing the Bubble Plot platform in JMP.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Rotten Tomatoes Score ), Y( :Audience Score ), Coloring( :Genre ), Sizes( :World Gross ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Apply coloring variable.
- Apply size variable.
- Show roles.
Example 118
Summary: Creates a bubble plot with X-axis set to Genre, Y-axis set to Audience Score, and Time axis set to World Gross, utilizing Show Roles set to 1.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Genre ), Y( :Audience Score ), Time( :World Gross ), Show Roles( 1 ), );
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X-axis to Genre.
- Set Y-axis to Audience Score.
- Set Time axis to World Gross.
- Show Roles set to 1.
Example 119
Summary: Creates a bubble plot with interactive features, displaying Rotten Tomatoes Score on the X-axis, Audience Score on the Y-axis, and coloring bubbles by Genre, sizing them by World Gross, and using Theaters Opening Wknd for time.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Audience Score ),
Coloring( :Genre ),
Sizes( :World Gross ),
Time( :Theaters Opening Wknd ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X-axis to "Rotten Tomatoes Score".
- Set Y-axis to "Audience Score".
- Color bubbles by "Genre".
- Size bubbles by "World Gross".
- Use "Theaters Opening Wknd" for time.
- Display roles.
Example 120
Summary: Creates a bubble plot with X-axis set to Audience Score, Y-axis set to Genre, and time dimension set to Profitability, displaying roles in the plot.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Audience Score ), Y( :Genre ), Time( :Profitability ), Show Roles( 1 ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis to Audience Score.
- Set Y-axis to Genre.
- Use Profitability for time dimension.
- Display roles in plot.
Example 121
Summary: Creates a bubble plot with interactive features, displaying Rotten Tomatoes Score on the X-axis, Movie Name on the Y-axis, and sizes defined by Genre, colored by Theme, animated over Audience Score, and identified with Domestic Gross and World Gross.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Movie Name ),
Sizes( :Genre ),
Coloring( :Theme ),
Time( :Audience Score ),
ID( :Domestic Gross, :World Gross ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Rotten Tomatoes Score.
- Set Y axis to Movie Name.
- Define sizes by Genre.
- Color bubbles by Theme.
- Animate over Audience Score.
- Identify with Domestic Gross, World Gross.
- Display roles.
- Show bubble plot.
Example 122
Summary: Creates a bubble plot with interactive features, displaying Rotten Tomatoes scores against movie names, colored by genre and sized by audience score.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Movie Name ),
Sizes( :Movie Name ),
Coloring( :Genre ),
Time( :Audience Score ),
ID( :Movie Name, :Theme ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Apply coloring by genre.
- Use audience score for time.
- Identify movies by name and theme.
- Display roles.
- Finalize bubble plot creation.
Example 123
Summary: Creates a Bubble Plot with interactive features, displaying Rotten Tomatoes Score on the X-axis, Genre on the Y-axis, and Audience Score as bubble sizes, while coloring by Theme and animating over Profitability.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Genre ),
Sizes( :Audience Score ),
Coloring( :Theme ),
Time( :Profitability ),
ID( :Domestic Gross, :World Gross ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X-axis: Rotten Tomatoes Score.
- Set Y-axis: Genre.
- Define bubble sizes: Audience Score.
- Color bubbles by Theme.
- Animate over Profitability.
- Display Domestic Gross, World Gross.
- Show roles in plot.
- Execute Bubble Plot creation.
Example 124
Summary: Creates a bubble plot with various visualizations, including X-axis variable 'Rotten Tomatoes Score', Y-axis variable 'Genre', and coloring based on 'BOA Opening Wknd'.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Rotten Tomatoes Score ),
Y( :Genre ),
Sizes( :Audience Score ),
Coloring( :BOA Opening Wknd ),
Time( :Genre ),
ID( :Domestic Gross, :Lead Studio Name ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign coloring variable.
- Use time variable.
- Specify ID variables.
- Show roles in plot.
- Display bubble plot.
Example 125
Summary: Creates a bubble plot with X-axis set to Rotten Tomatoes Score, Y-axis set to Audience Score, and identification by Genre.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot( X( :Rotten Tomatoes Score ), Y( :Audience Score ), ID( :Genre ), );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Rotten Tomatoes Score.
- Set Y axis to Audience Score.
- Use Genre for identification.
Example 126
Summary: Creates a bubble plot to visualize movie data, with X-axis set to Movie Name, Y-axis to Rotten Tomatoes Score, and sizes determined by Genre. The plot is colored by Theme and animated over Audience Score.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Rotten Tomatoes Score ),
Sizes( :Genre ),
Coloring( :Theme ),
Time( :Audience Score ),
ID( :Domestic Gross, :World Gross ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis to Movie Name.
- Set Y axis to Rotten Tomatoes Score.
- Use Genre for bubble sizes.
- Color bubbles by Theme.
- Animate over Audience Score.
- Identify Domestic Gross, World Gross.
- Display roles in plot.
- Show bubble plot.
Example 127
Summary: Creates a bubble plot with various visualizations, including X-axis variable, Y-axis variable, sizes, coloring, and time dimension, from a data table.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Genre ),
Y( :Rotten Tomatoes Score ),
Sizes( :Movie Name ),
Coloring( :Genre ),
Time( :Audience Score ),
ID( :Movie Name, :Theme ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Set coloring variable.
- Add time dimension.
- Assign ID variables.
- Show roles option.
- Display plot.
Example 128
Summary: Creates a bubble plot with interactive features, including X-axis variable, Y-axis variable, bubble sizes, color categories, and time animation.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Genre ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Coloring( :Theme ),
Time( :Profitability ),
ID( :Domestic Gross, :World Gross ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign color categories.
- Enable time animation.
- Identify bubble IDs.
- Display roles legend.
- Configure bubble plot settings.
Example 129
Summary: Creates a bubble plot with interactive features, displaying Genre on the X-axis, Rotten Tomatoes Score on the Y-axis, and Audience Score as bubble sizes, while coloring by BOA Opening Wknd and providing additional information through ID roles.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Genre ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Coloring( :BOA Opening Wknd ),
Time( :Genre ),
ID( :Domestic Gross, :Lead Studio Name ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign coloring variable.
- Set time variable.
- Identify with domestic gross.
- Identify with lead studio name.
- Display roles.
Example 130
Summary: Creates a bubble plot to visualize personal consumption expenditures by gross national product ($billions) across years, with sizes based on population and ID variables for region and country.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country ),
Title Position( 0.77, 0.0865 ),
SendToReport(
Dispatch( {}, "Bubble Plot of Portion60+ by Portion 0-19 Sized by Pop Across Year ID Region", OutlineBox,
{Set Title(
"Bubble Plot of personal consumption expenditures by gross national product ($billions) Sized by net exports of goods and services Across DATE"
)}
),
Dispatch( {}, "Portion60+", TextEditBox, {Set Text( "personal consumption expenditures" )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 503, 360 )} ),
Dispatch( {}, "Portion 0-19", TextEditBox, {Set Text( "gross national product ($billions)" )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time dimension.
- Identify regions and countries.
- Position title on plot.
- Set overall plot title.
- Label Y-axis.
- Resize plot frame.
- Label X-axis.
Example 131
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing JMP's Bubble Plot platform.
Code:
Open("data_table.jmp");
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
{Add Image(
Set Blob(
Char To Blob(
"1iVBORw0KGgoAAAANSUhEUgAAAA0AAAALCAYAAACksgdhAAAAAXNSR0IArs4c6QAAAARnQU1B
AACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVChTY2DAAf4zMAARCQCkAYaJ0oasgSiN
2DTg1YhPA1aNxGggWyPWQCHZTzBTSA49bBqJiidkjbg0AABqcnmHm4QAiAAAAABJRU5ErkJggg==",
"base64compressed"
),
"png"
),
Bounds( Left( 0.6675 ), Right( 0.675625 ), Top( 0.115777777777778 ), Bottom( 0.110888888888889 ) ),
), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
);
ps = Report( bp )[framebox( 1 )] << Find Seg( PictSeg );
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign country identifiers.
- Send report settings.
- Add image to plot.
- Set image properties.
- Find and return segment.
Example 132
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
{Add Image(
Set Blob(
Char To Blob(
"1iVBORw0KGgoAAAANSUhEUgAAAA0AAAALCAYAAACksgdhAAAAAXNSR0IArs4c6QAAAARnQU1B
AACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAA+SURBVChTY2DAAf4zMAARCQCkAYaJ0oasgSiN
2DTg1YhPA1aNxGggWyPWQCHZTzBTSA49bBqJiidkjbg0AABqcnmHm4QAiAAAAABJRU5ErkJggg==",
"base64compressed"
),
"png"
),
Bounds( Left( 0.6675 ), Right( 0.675625 ), Top( 0.115777777777778 ), Bottom( 0.110888888888889 ) ),
), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
);
ps = Report( bp )[framebox( 1 )] << Find Seg( PictSeg );
ps << Fillgraph;
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Set size variable.
- Set ID variable.
- Send report settings.
- Add image to plot.
- Set image bounds.
- Fill graph with image.
Example 133
Summary: Creates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption, with sizes based on population and time indexed by year, utilizing SendToReport dispatch for customized axis formats.
Code:
dt = Open("data_table.jmp");
Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Time Index( 26.6000000000001 ),
Title Position( 13250, 208750 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Format( "Custom", Formula( Round( ArcCosine( Cosine( value ) ), 2 ) ), 12 ), Min( -25000 ), Max( 200000 ), Inc( 50000 ),
Minor Ticks( 1 )}
),
Dispatch( {}, "2", ScaleBox,
{Format( "Custom", Formula( Round( ArcSine( Sine( value ) ), 2 ) ), 12 ), Min( -25000 ), Max( 250000 ), Inc( 50000 ),
Minor Ticks( 1 )}
),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 483, 360 )} )
)
);
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Add time variable.
- Identify nations.
- Set time index.
- Position title.
- Customize axis formats.
Example 134
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the SendToReport function to dispatch scale boxes and frame boxes.
Code:
Open("data_table.jmp");
Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Time( :Time ),
Coloring( :Airline ),
ID( :Tail Number ),
Speed( 85.7075471698113 ),
Title Position( -33.8159722222222, 70.8551493046094 ),
SendToReport(
Dispatch( {}, "1", ScaleBox,
{Scale( "Geodesic" ), Min( -158.494441105581 ), Max( -61.2713575551654 ), Inc( 20 ), Minor Ticks( 0 )}
),
Dispatch( {}, "2", ScaleBox, {Scale( "Geodesic" ), Min( 16.0016585855032 ), Max( 76.9079482805108 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Frame Size( 514, 322 ), Background Map( Images( "Simple Earth", Transparency( 0.7 ) ), Boundaries( "World" ) ),
Grid Line Order( 3 ), Reference Line Order( 4 ), {Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 2008 ),
Index Row( 2008 ),
UniqueID( -1729408776 ),
FoundPt( {240, 92} ),
Origin( {-149.648607462572, 62.0290512992411} ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 3830 ),
Index Row( 3830 ),
UniqueID( -1729406954 ),
FoundPt( {394, 228} ),
Origin( {-94.7657523417862, 40.3256920602609} ),
Tag Line( 1 )
), Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 30 ),
Index Row( 30 ),
UniqueID( -1729410754 ),
FoundPt( {476, 284} ),
Origin( {-80.2091557061591, 25.9605593284194} ),
Offset( {-46, -51} ),
Tag Line( 1 )
)}}
)
)
);
Code Explanation:
- Open data_table data
- Create bubble plot.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Set time variable.
- Color by Airline.
- Use Tail Number for ID.
- Set speed value.
- Position title.
- Configure scale and map settings.
Example 135
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing JMP's Bubble Plot platform.
Code:
Open("data_table.jmp") << Bubble Plot(
X( :weight ),
Y( :height ),
Coloring( :age ),
Title Position( 1.36625688434918e-311, 1.36625688438475e-311 ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
Add Pin Annotation(
Seg( CustomStreamSeg( 1 ) ),
Index( 3 ),
Index Row( -1 ),
UniqueID( 3 ),
FoundPt( {388, 156} ),
Origin( {144.775, 66.1194444444445} ),
RightOfCenter( 1 ),
Tag Line( 1 )
)
)
)
);
Code Explanation:
- Open data_table data
- Create Bubble Plot.
- Set X-axis to weight.
- Set Y-axis to height.
- Color by age.
- Adjust title position.
- Send report to JMP.
- Dispatch to Bubble Plot frame.
- Add pin annotation.
- Customize annotation properties.
Example 136
Summary: Creates a bubble plot with interactive features, including X-axis labeling by 'Movie Name', Y-axis labeling by 'Rotten Tomatoes Score', and coloring by 'BOA Opening Wknd'.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Movie Name ),
Y( :Rotten Tomatoes Score ),
Sizes( :Audience Score ),
Time( :Genre ),
Coloring( :BOA Opening Wknd ),
Show Roles( 1 ),
);
Code Explanation:
- Open table "data_table".
- Create bubble plot.
- Set X-axis to "Movie Name".
- Set Y-axis to "Rotten Tomatoes Score".
- Set bubble sizes to "Audience Score".
- Use "Genre" for time axis.
- Color bubbles by "BOA Opening Wknd".
- Show roles in plot.
- Execute bubble plot creation.
- Display resulting plot.
Example 137
Summary: Generates a bubble plot with interactive features to visualize the relationship between Production Budget, Profitability, and other variables in a data table.
Code:
dt under test = Open("data_table.jmp");
obj = dt under test << Bubble Plot(
X( :Production Budget ),
Y( :Profitability ),
Sizes( :Size ),
Time( :Audience Score ),
Coloring( :Rotten Tomatoes Score ),
ID( :Domestic Gross, :World Gross ),
By( :Theaters Opening Wknd ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis to Production Budget.
- Set Y axis to Profitability.
- Define sizes by Size variable.
- Use Audience Score for time dimension.
- Color bubbles by Rotten Tomatoes Score.
- Identify bubbles by Domestic and World Gross.
- Group plots by Theaters Opening Wknd.
- Display all roles.
Example 138
Summary: Creates a bubble plot with interactive features, including coloring and sizing based on specific variables, to visualize relationships between Production Budget, Profitability, Size, Audience Score, Rotten Tomatoes Score, Domestic Gross, World Gross, and Theaters Opening Wknd.
Code:
dt under test = Open("data_table.jmp");
obj = Bubble Plot(
X( :Production Budget ),
Y( :Profitability ),
Sizes( :Size ),
Time( :Audience Score ),
Coloring( :Rotten Tomatoes Score ),
ID( :Domestic Gross, :World Gross ),
By( :Theaters Opening Wknd ),
Show Roles( 1 ),
);
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Set time variable.
- Assign coloring variable.
- Identify bubble IDs.
- Group by theaters.
- Display all roles.
Example 139
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing SendToReport dispatches to customize scale properties.
Code:
dt = Open("data_table.jmp");
obj = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Time Index( 26.6000000000001 ),
Title Position( 13250, 208750 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -25000 ), Max( 200000 ), Inc( 50000 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( -25000 ), Max( 250000 ), Inc( 50000 ), Minor Ticks( 1 )} )
)
);
rpt1 = obj << Report;
expr1 = rpt1[FrameBox( 1 )] << Get Journal;
:Nation << Set Property( "Missing Value Codes", "India" );
obj2 = obj << Redo Analysis;
rpt = obj2 << Report;
expr = rpt[FrameBox( 1 )] << Get Journal;
ans = Equal( expr, expr1 );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Set X axis variable.
- Set Y axis variable.
- Set sizes variable.
- Set time variable.
- Set ID variable.
- Set time index.
- Set title position.
- Adjust X scale properties.
- Adjust Y scale properties.
- Generate initial report.
- Extract first frame journal.
- Set missing value code for Nation.
- Redo analysis with updated settings.
- Generate updated report.
- Extract updated frame journal.
- Compare initial and updated journals.
Example 140
Summary: Creates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption by nation, with population sizes and time-based filtering.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Circle Size( 20047.1698113208 ),
Time Index( 2 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( Log ), Format( "Best" ), Min( 0.0001 ), Max( 238471 ), Inc( 1 ), Minor Ticks( 8 )} )
)
);
rpt = bp << report;
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define sizes by population.
- Use time variable.
- Identify by nation.
- Set circle size.
- Set time index.
- Disable all labels.
Example 141
Summary: Creates a bubble plot with coloring based on sum, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Coloring( :Pop ), ID( :Country ) );
bp << Color as Sum( 1 );
bp << Color as Sum( 0 );
bp << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define coloring variable.
- Assign ID variable.
- Color bubbles by sum.
- Color bubbles by sum.
- Close bubble plot window.
Example 142
Summary: Creates a bubble plot with interactive steps and report generation from a data table, featuring coloring by sex and dynamic updates.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :age ), Y( :height ), Time( :age ), Coloring( :sex ), ID( :sex ), );
dt << Add Rows( 10 );
bp << Step;
bp << Step;
bp << Step;
bp << Step;
bp << Step;
dt << Select Rows( 41 :: 50 );
dt << Delete Rows;
rpt = Report( bp );
Code Explanation:
- Open data table;
- Create bubble plot.
- Add 10 rows to data table.
- Move bubble plot forward.
- Move bubble plot forward.
- Move bubble plot forward.
- Move bubble plot forward.
- Move bubble plot forward.
- Select last 10 rows.
- Delete selected rows.
- Generate report from bubble plot.
Example 143
Summary: Creates a bubble plot with sizes based on % Taking, utilizing the Bubble Plot platform in JMP.
Code:
Open("data_table.jmp");
bp = Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :Name( "% Taking (2004)" ) ),
Time( :Year ),
ID( :State ),
All Labels( 1 ),
No Labels( 0 ),
Title Position( 540, 500 ),
);
bp << Close Window();
dt = New Table( "TEST",
Add Rows( 4 ),
New Property( "Bubble Plot", Bubble Plot( X( :X ), Y( :Y ), Sizes( :size ) ) ),
New Column( "size", Numeric, Continuous, Set Values( [3338, 4944, 969153332, 986476563] ) ),
New Column( "X", Numeric, Continuous, Set Values( [14, 13, 290412, 301294] ) ),
New Column( "Y", Numeric, Continuous, Set Values( [0, 0, 195109, 206434] ) )
);
bp = dt << Run Script( "Bubble Plot" );
bp << Close Window();
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X axis to SAT Math.
- Set Y axis to SAT Verbal.
- Set sizes based on % Taking.
- Set time variable to Year.
- Set ID variable to State.
- Enable all labels.
- Disable no labels.
- Set title position.
- Close bubble plot window.
- Create new table named TEST.
- Add four rows to table.
- Add Bubble Plot property to table.
- Create size column with values.
- Create X column with values.
- Create Y column with values.
- Run Bubble Plot script from table.
- Close bubble plot window.
Example 144
Summary: Creates a bubble plot to visualize CO2 emissions from liquid and solid fuel consumption, with population sizes and year as interactive features.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot(
X( :CO2 emissions from liquid fuel consumption ),
Y( :CO2 emissions from solid fuel consumption ),
Sizes( :Population ),
Time( :Year ),
ID( :Nation ),
Circle Size( 20047.1698113208 ),
Time Index( 2 ),
All Labels( 0 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( "Log" ), Format( "Best" ), Min( 0.0001 ), Max( 238471 ), Inc( 1 ), Minor Ticks( 8 )} )
)
);
bp << Title Position( 50000, 10 );
bp << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Identify nations.
- Set circle size.
- Configure time index.
- Disable all labels.
Example 145
Summary: Creates a bubble plot with trail lines and bubbles, selecting specific rows from a data table and closing the window.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :Population ), Y( :SAT Math ), ID( :State ), All Labels( 0 ) );
bp << Trail Lines( 1 );
bp << Trail Bubbles( 1 );
dt << Select Rows( 33 :: 40 );
r = dt << Get Selected Rows;
bp << Close Window();
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Use state as identifier.
- Disable all labels.
- Enable trail lines.
- Enable trail bubbles.
- Select specific rows.
- Retrieve selected row numbers.
- Close bubble plot window.
Example 146
Summary: Creates a bubble plot with customized scales and frame size, using data from an open JMP table.
Code:
dt = Open("data_table.jmp");
bp = dt << Bubble Plot(
X( :height ),
Y( :weight ),
ID( :sex ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 1050 ), Max( 1450 ), Inc( 50 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 100 ), Max( 109 ), Inc( 1 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 270, 212 )} )
)
);
dt << Add Rows( 10 );
bp << X as Sum( 1 );
bp << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis: height.
- Set Y axis: weight.
- Set ID: sex.
- Customize X scale.
- Customize Y scale.
- Set frame size.
- Add 10 rows to table.
- Close bubble plot window.
Example 147
Summary: Creates a bubble plot to visualize SAT Math and Verbal scores for states over time, with size proportional to the percentage of students taking the test in 2004.
Code:
Open("data_table.jmp");
bp = Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :Name( "% Taking (2004)" ) ),
Time( :Year ),
ID( :State ),
All Labels( 1 ),
No Labels( 0 ),
Title Position( 540, 500 ),
);
bp << Close Window();
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Identify states.
- Show all labels.
- Enable labels.
- Set title position.
Example 148
Summary: Creates a bubble plot to visualize SAT Math and Verbal scores by Region, with interactive filtering capabilities.
Code:
dt = Open("data_table.jmp");
bp = Bubble Plot( X( :SAT Math ), Y( :SAT Verbal ), ID( :Region, :State ), All Labels( 0 ) );
dt << Select Where( :Region == "Northeast" );
bp << Split;
bp << Close Window();
Code Explanation:
- Open table.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Set ID variables.
- Hide all labels.
- Select rows where Region is Northeast.
- Split bubble plot.
- Close bubble plot window.
Example 149
Summary: Creates and manipulates a bubble plot with coloring, followed by the recreation of the plot without coloring, using JMP's Bubble Plot platform.
Code:
Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Coloring( :Phase ) );
myBP << Close Window;
Row State( 139 ) = Combine States( Color State( 4 ) );
Row State( 140 ) = Combine States( Color State( 4 ) );
Row State( 141 ) = Combine States( Color State( 4 ) );
Row State( 142 ) = Combine States( Color State( 4 ) );
Row State( 143 ) = Combine States( Color State( 4 ) );
Row State( 144 ) = Combine States( Color State( 4 ) );
Row State( 145 ) = Combine States( Color State( 4 ) );
Row State( 146 ) = Combine States( Color State( 4 ) );
Row State( 147 ) = Combine States( Color State( 4 ) );
Row State( 148 ) = Combine States( Color State( 4 ) );
Row State( 149 ) = Combine States( Color State( 4 ) );
Row State( 150 ) = Combine States( Color State( 4 ) );
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ) );
myBP << Close Window;
Code Explanation:
- Open data table.
- Create bubble plot.
- Close bubble plot window.
- Set row state for row 139.
- Set row state for row 140.
- Set row state for row 141.
- Set row state for row 142.
- Set row state for row 143.
- Set row state for row 144.
- Set row state for row 145.
- Set row state for row 146.
- Set row state for row 147.
- Set row state for row 148.
- Set row state for row 149.
- Set row state for row 150.
- Create bubble plot without coloring.
- Close bubble plot window.
Example 150
Summary: Creates and customizes bubble plots with needle plots for high, close, and low stock prices over time.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
dt << Select Rows( 21 );
myBP << Filled( 0 );
myBP << Close Window;
myBP = Bubble Plot(
X( :Date ),
Y( :Name( "# defects" ) ),
Sizes( :Unit size ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
DispatchSeg( CustomStreamSeg( 1 ), {Fill Color( {128, 128, 0} ), Text Color( {253, 250, 204} ), Font( {"", 16, 3} )} )
)
)
);
myBP << Close Window();
Close( dt, nosave );
dt2 = New Table( "Test",
New Column( "Y", Values( [1, 1, 1, 2, 2, 2, 3, 3, 3] ) ),
New Column( "X", Values( [1, 2, 3, 1, 2, 3, 1, 2, 3] ) ),
New Column( "Z", Values( {1, 2, 3, 2, 3, 1, , 3, 1, 2} ) )
);
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Z ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, DispatchSeg( CustomStreamSeg( 1 ), {Text Color( {255, 0, 0} )} ) ) )
);
myBP << Close Window();
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Z ),
All Labels( 1 ),
SendToReport(
Dispatch( {}, "2", ScaleBox, {Scale( Linear ), Format( "Best" ), Min( 3.25 ), Max( 0.75 ), Inc( 0.5 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, DispatchSeg( CustomStreamSeg( 1 ), {Text Color( {255, 255, 0} )} ) )
)
);
myBP << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Set plot properties.
- Toggle fill and labels.
- Select specific rows.
- Toggle fill again.
- Close first bubble plot.
- Create second bubble plot.
- Customize appearance.
- Close second bubble plot.
- Close original data table.
- Create new data table.
- Create third bubble plot.
- Customize text color.
- Close third bubble plot.
- Create fourth bubble plot.
- Customize axes and text color.
- Close fourth bubble plot.
Example 151
Summary: Creates and customizes bubble plots to visualize data from a sample dataset, utilizing various features such as X-axis, Y-axis, sizes, coloring, and circle size.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :OZONE ),
Y( :city ),
Sizes( :POP ),
Coloring( :Region ),
ID( :State ),
Circle Size( 2.2 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 360, 774 ) ) )
);
myBP << Filled( 0 );
myBP << Close Window();
myBP = Bubble Plot(
X( :Region ),
Y( :NO ),
ID( :city ),
Circle Size( 0.001 ),
Filled( 0 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 585, 550 ) ) )
);
myBP << Close Window();
Close( dt, nosave );
dt2 = New Table( "bubble",
New Column( "name", character, values( {"Robert", "Robert"} ) ),
New Column( "dollars", values( [73273, 53273] ) )
);
myBP = bubble plot( Y( :dollars ), X( :name ), Circle Size( 2175 ), All Labels( 1 ) );
myBP << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot with OZONE.
- Set Y axis to city.
- Use POP for sizes.
- Color by Region.
- Identify by State.
- Set circle size.
- Show all labels.
- Resize frame.
- Disable fill.
- Close bubble plot window.
- Create another bubble plot with Region.
- Set Y axis to NO.
- Identify by city.
- Set small circle size.
- Disable fill.
- Show all labels.
- Resize frame.
- Close bubble plot window.
- Close original data table without saving.
- Create new table named bubble.
- Add name column with values.
- Add dollars column with values.
- Create bubble plot with dollars.
- Set X axis to name.
- Set circle size.
- Show all labels.
- Close bubble plot window.
Example 152
Summary: Creates a bubble plot with combined California bubbles, adding text and line annotations to highlight specific details.
Code:
dt4 = Open("data_table.jmp");
myBP = Bubble Plot(
X( :X ),
Y( :Y ),
Sizes( :Max deg. F Jan ),
Coloring( :Region ),
ID( :State, :city ),
All Labels( 0 ),
Size as Sum( 0 )
);
myBP << Split All;
dt4 << select where( :State == "CA" );
myBP << Combine;
myBP << SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
{Add Text Annotation( Text( "CA bubbles should be combined" ), Text Box( {10, 204, 159, 227} ) ),
Add Line Annotation( Line( {75, 41}, {30, 129} ), Color( "Yellow" ) )}
)
);
myBP << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Define bubble sizes.
- Color bubbles by region.
- Use state and city for IDs.
- Disable all labels.
- Sum bubble sizes.
- Split all bubbles.
- Select California states.
- Combine selected bubbles.
- Add text annotation.
- Add line annotation.
- Close bubble plot window.
Example 153
Summary: Creates and customizes bubble plots with varying sizes, circle sizes, and labels in JMP.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Sizes( :Phase ) );
myBP << Close Window();
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Circle Size( 0.0375 ) );
myBP << Close Window();
Close( dt, nosave );
dt2 = New Table( "Test",
New Column( "X", Values( [1, 2, 3] ) ),
New Column( "Y", Values( [1, 2, 3] ) ),
New Column( "Size", Values( [-1, 0, 1] ) )
);
myBP = Bubble Plot( X( :X ), Y( :Y ), Sizes( :Size ), Circle Size( 0.8 ), All Labels( 1 ) );
myBP << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot with sizes.
- Close bubble plot window.
- Create bubble plot with fixed size.
- Close bubble plot window.
- Close data table without saving.
- Create new table with columns.
- Create bubble plot with all labels.
- Close bubble plot window.
Example 154
Summary: Creates and customizes a bubble plot with needle plots for high, close, and low stock prices of DJI over time.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :Date ), Y( :Name( "# defects" ) ), Sizes( :Unit size ), Circle Size( 4.5 ), Filled( 0 ), All Labels( 1 ) );
myBP << Filled( 1 ) << All Labels( 0 );
dt << Select Rows( 21 );
myBP << Filled( 0 );
myBP << Close Window;
myBP = Bubble Plot(
X( :Date ),
Y( :Name( "# defects" ) ),
Sizes( :Unit size ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
DispatchSeg( CustomStreamSeg( 1 ), {Fill Color( {128, 128, 0} ), Text Color( {253, 250, 204} ), Font( {"", 16, 3} )} )
)
)
);
myBP << Close Window();
Code Explanation:
- Open data table.
- Create bubble plot.
- Customize bubble plot appearance.
- Select specific rows.
- Toggle fill setting.
- Close first bubble plot.
- Create second bubble plot.
- Customize appearance further.
- Close second bubble plot.
Example 155
Summary: Creates two bubble plots to visualize ozone levels, city populations, and regional information, with adjustable circle sizes and labels.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot(
X( :OZONE ),
Y( :city ),
Sizes( :POP ),
Coloring( :Region ),
ID( :State ),
Circle Size( 2.2 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 360, 774 ) ) )
);
myBP << Filled( 0 );
myBP << Close Window();
myBP = Bubble Plot(
X( :Region ),
Y( :NO ),
ID( :city ),
Circle Size( 0.001 ),
Filled( 0 ),
All Labels( 1 ),
SendToReport( Dispatch( {}, "Bubble Plot", FrameBox, Frame Size( 585, 550 ) ) )
);
myBP << Close Window();
Code Explanation:
- Open data table;
- Create bubble plot.
- Set X-axis to OZONE.
- Set Y-axis to city.
- Set bubble sizes to POP.
- Color bubbles by Region.
- Identify bubbles by State.
- Adjust circle size.
- Display all labels.
- Resize frame.
- Disable filling.
- Close window.
- Create second bubble plot.
- Set X-axis to Region.
- Set Y-axis to NO.
- Identify bubbles by city.
- Adjust circle size.
- Disable filling.
- Display all labels.
- Resize frame.
- Close window.
Example 156
Summary: Creates and displays two bubble plots with varying size specifications, showcasing data visualization capabilities in JMP.
Code:
dt = Open("data_table.jmp");
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Sizes( :Phase ) );
myBP << Close Window();
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ), Circle Size( 0.0375 ) );
myBP << Close Window();
Code Explanation:
- Open data table;
- Create bubble plot with sizes.
- Close first bubble plot window.
- Create second bubble plot without sizes.
- Close second bubble plot window.
Example 157
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, utilizing the SendToReport function to customize report settings.
Code:
Open("data_table.jmp");
obj = Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Name( "Wind (Knots)" ) ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 220 ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -110 ), Max( 10 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 0 ), Max( 70 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Images( "NASA server" ) ), Grid Line Order( 2 ), Reference Line Order( 3 )}
)
)
);
rpt = obj << report;
Code Explanation:
- Open data_table data
- Create Bubble Plot object.
- Set X-axis to Longitude.
- Set Y-axis to Latitude.
- Define bubble sizes by Wind (Knots).
- Add Time variable for animation.
- Color bubbles by Landfall in USA.
- Use Name and ID for labels.
- Set animation speed to 220.
- Configure report settings.
Example 158
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, using Longitude as X-axis, Latitude as Y-axis, and Wind (Knots) as bubble sizes.
Code:
dt = Open("data_table.jmp");
obj = Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Name( "Wind (Knots)" ) ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 220 ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -110 ), Max( 10 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 0 ), Max( 70 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Images( "Simple Earth" ), Boundaries( "World Countries" ) ), Grid Line Order( 3 ), Reference Line Order( 4 ),
DispatchSeg(
Shape Seg( 1 ),
{Line Color( {204, 204, 204} ), Fill Color( "None" ), Missing shape fill( 2147483647 ), Missing value fill( -14540253 )}
)}
)
)
);
rpt = obj << report;
Code Explanation:
- Open table.
- Create Bubble Plot.
- Set X-axis to Longitude.
- Set Y-axis to Latitude.
- Set bubble sizes to Wind (Knots).
- Set time variable to Date.
- Color bubbles by Landfall in USA.
- Use Name and ID for labels.
- Set speed to 220.
- Configure report settings.
Example 159
Summary: Creates a bubble plot with needle plots for high, close, and low stock prices of DJI over time, using Longitude as X-axis, Latitude as Y-axis, and Wind speed to size bubbles.
Code:
dt = Open("data_table.jmp");
obj = Bubble Plot(
X( :Longitude ),
Y( :Latitude ),
Sizes( :Name( "Wind (Knots)" ) ),
Time( :Date ),
Coloring( :Landfall in USA ),
ID( :Name and ID ),
Speed( 220 ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( -88.679, 59.73 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -110 ), Max( 10 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 0 ), Max( 70 ), Inc( 10 ), Minor Ticks( 0 )} ),
Dispatch( {}, "Bubble Plot", FrameBox,
{Background Map( Images( "Detailed Earth" ), Boundaries( "US States" ) ), Grid Line Order( 3 ), Reference Line Order( 4 ),
DispatchSeg(
Shape Seg( 1 ),
{Line Color( {204, 204, 204} ), Fill Color( "None" ), Missing shape fill( 2147483647 ), Missing value fill( -14540253 )}
)}
)
)
);
rpt = obj << report;
Code Explanation:
- Open data table;
- Create Bubble Plot object.
- Set X axis to Longitude.
- Set Y axis to Latitude.
- Define bubble sizes by Wind speed.
- Use Date for animation.
- Color bubbles by Landfall status.
- Identify bubbles by Name and ID.
- Set animation speed to 220.
- Customize report appearance.
Example 160
Summary: Creates a bubble plot with background map, utilizing the Open function to load data and the Bubble Plot function to generate the visualization.
Code:
dt = Open("data_table.jmp");
obj = Bubble Plot( Y( :height ), X( :weight ), coloring( :sex ), Bubble Size( 30 ) );
rpt = obj << report;
Report( obj )[FrameBox( 1 )] << Background Map( Images( "Simple Earth" ) );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Assign plot to variable.
- Generate report object.
- Access first frame box.
- Add background map.
- Use "Simple Earth" image.
Bubble Plot using New Window
Example 1
Summary: Visualizes flu cases by region using a bubble plot with filtering capabilities, allowing for interactive exploration of the data.
Code:
// Region Bubble with Filter
// Open data table
dt = Open("data_table.jmp");
// Region Bubble with Filter
New Window( "SAT Bubble Plot with Filter",
H List Box(
Current Data Table() <<
Data Filter(
Add Filter(
columns( :Region ),
Display(
:Region,
Size( 204, 148 ),
List Display
)
),
Mode(
Show( 1 ),
Include( 1 )
)
),
Bubble Plot(
X( :Date ),
Y( :Flu Cases ),
Sizes(
:
"Population (July 2009)"n
),
Time( :Date ),
Coloring( :Region ),
ID( :Region, :State ),
Speed( 33.08 ),
Time Index(
208.199999999992
),
Trail Lines( 1 ),
All Labels( 0 ),
Show Roles( 1 ),
SendToReport(
Dispatch( {}, "1",
ScaleBox,
{Min( 3125000000 ),
Max( 3350000000 ),
Interval( "Month" ),
Inc(
19.0128526884174
), Minor Ticks( 1 )}
),
Dispatch( {}, "2",
ScaleBox,
{Max( 11000 ),
Minor Ticks( 0 )}
),
Dispatch( {},
"Bubble Plot",
FrameBox,
Frame Size(
480, 302
)
)
)
)
)
);
Code Explanation:
- Open data table.
- Create new window titled "SAT Bubble Plot with Filter".
- Add horizontal list box.
- Apply data filter on Region column.
- Set filter display size and mode.
- Create bubble plot.
- Set X axis to Date.
- Set Y axis to Flu Cases.
- Define bubble sizes based on Population.
- Configure plot settings including time, coloring, ID, speed, and labels.
Example 2
Summary: Visualizes flu cases by state over time, utilizing a bubble plot with interactive filtering and coloring by region.
Code:
// State Bubble with Filter
// Open data table
dt = Open("data_table.jmp");
// State Bubble with Filter
New Window( "SAT Bubble Plot with Filter",
H List Box(
Current Data Table() <<
Data Filter(
Add Filter(
columns( :State ),
Display(
:State,
Size( 221, 274 ),
List Display
)
),
Mode(
Show( 1 ),
Include( 1 )
)
),
Bubble Plot(
X( :Date ),
Y( :Flu Cases ),
Sizes(
:
"Population (July 2009)"n
),
Time( :Date ),
Coloring( :Region ),
ID( :State ),
Speed( 54.09 ),
Time Index(
32.7005249999998
),
Trail Lines( 1 ),
All Labels( 0 ),
Show Roles( 1 ),
SendToReport(
Dispatch( {}, "1",
ScaleBox,
{Min( 3125000000 ),
Max( 3350000000 ),
Interval( "Month" ),
Inc(
19.0128526884174
), Minor Ticks( 1 )}
),
Dispatch( {}, "2",
ScaleBox,
{Max( 20000 ),
Inc( 5000 )}
),
Dispatch( {},
"Bubble Plot",
FrameBox,
Frame Size(
480, 317
)
)
)
)
)
);
Code Explanation:
- Open table.
- Create new window.
- Add horizontal list box.
- Add data filter.
- Set filter for State column.
- Configure filter display.
- Create bubble plot.
- Set X axis to Date.
- Set Y axis to Flu Cases.
- Set bubble sizes.
Example 3
Summary: Creates a new window with a data filter context box, graph builder, and bubble plot platform to visualize relationships between age, weight, and height.
Code:
Names Default To Here( 1 );
dt = Open("data_table.jmp");
New Window( "Selection Filter",
Data Filter Context Box(
H List Box(
Data Filter Source Box(
Graph Builder(
Size( 208, 207 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :age ) ),
Elements( Bar( X, Legend( 3 ) ) ),
SendToReport( Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "Filter" )} ) )
)
),
( Current Data Table(), Bubble Plot( X( :weight ), Y( :height ), Sizes( :age ), Title Position( 0, 0 ) ) )
)
)
);
Code Explanation:
- Set default names scope.
- Open data table.
- Create new window.
- Add data filter context box.
- Create horizontal list box.
- Add data filter source box.
- Create graph builder.
- Set graph size.
- Hide control panel.
- Hide legend.
- Set X variable.
- Add bar element.
- Set graph title.
- Add bubble plot platform.
- Set X, Y, and size variables.
- Set title position.
Example 4
Summary: Creates a shared filter window with two local data filters, displaying a bubble plot and tabulate for analyzing salary and taking percentage data.
Code:
dt = Open("data_table.jmp");
New Window( "shared filter",
Data Filter Context Box(
H List Box(
dt << Data Filter(
Local,
Add Filter( columns( :"Salary (1997)"n ), Where( :"Salary (1997)"n >= 25.994 & :"Salary (1997)"n <= 38.449 ) )
),
Data Filter Context Box(
H List Box(
dt << Data Filter(
Local,
Add Filter( columns( :"% Taking (1997)"n ), Where( :"% Taking (1997)"n >= 0.4525 & :"% Taking (1997)"n <= 0.81 ) )
),
Bubble Plot(
X( :SAT Math ),
Y( :SAT Verbal ),
Sizes( :"% Taking (2004)"n ),
Time( :Year ),
ID( :Region, :State ),
Label( "All" )
),
Tabulate(
Show Control Panel( 0 ),
Add Table( Row Table( Analysis Columns( :"% Taking (2004)"n, :"% Taking (1997)"n ), Grouping Columns( :Region ) ) )
)
)
)
)
)
);
Code Explanation:
- Open table.
- Create new window.
- Add data filter context box.
- Create horizontal list box.
- Add local data filter.
- Set salary filter.
- Create another horizontal list box.
- Add local data filter.
- Set taking percentage filter.
- Display bubble plot and tabulate.
Example 5
Summary: Creates a new window with data filter context box, bubble plots for weight vs height and age, and retrieves row states from an open data table.
Code:
dt = Open("data_table.jmp");
nw = New Window( "Shared Local Filter",
Data Filter Context Box(
H List Box(
Current Data Table() << Data Filter( Local, Add Filter( columns( :sex ), Where( :sex == "F" ) ) ),
( Current Data Table(), Bubble Plot( X( :weight ), Y( :height ), Sizes( :age ), Title Position( 0, 0 ) ) ),
( Current Data Table(), Bubble Plot( X( :weight ), Y( :age ), Sizes( :height ), Title Position( 0, 0 ) ) )
)
)
);
rs = dt << get row states;
nw << close window;
Code Explanation:
- Open data table.
- Create new window.
- Add data filter context box.
- Define horizontal list box.
- Apply local filter on sex.
- Create bubble plot for weight vs height.
- Create bubble plot for weight vs age.
- Retrieve row states.
- Close the new window.
Example 6
Summary: Creates a new window with a data filter context box, applying local filters and displaying a bubble plot platform to visualize age distribution by sex.
Code:
dt = Open("data_table.jmp");
win = New Window( "Shared Local Filter",
Data Filter Context Box(
H List Box(
dt << Data Filter( Local, <<Conditional( 1 ), Add Filter( Columns( :Age ), Where( :Age == 12 ) ) ),
( dt, Bubble Plot( X( :weight ), Y( :height ), Sizes( :age ), By( :sex ), Title Position( 0, 0 ) ) )
)
)
);
text1 = win[Box( 1 )][Text Box( 1 )] << Get Text;
Code Explanation:
- Open table.
- Create new window.
- Add data filter context box.
- Define horizontal list box.
- Apply local data filter.
- Set filter condition.
- Add age filter.
- Create bubble plot platform.
- Set X axis.
- Set Y axis.
- Set sizes.
- Group by sex.
- Set title position.
- Retrieve text from text box.
Example 7
Summary: Creates filter windows for data tables, updating excluded row counts and displaying them in text boxes.
Code:
dt = Open("data_table.jmp");
New Window( "filter test",
Data Filter Context Box(
V List Box(
t = Text Box( "0 Rows Excluded" ),
Distribution( Continuous Distribution( Column( :weight ) ), Nominal Distribution( Column( :age ) ) )
)
)
);
updatetext = Function( {},
rs = t << Get Row States( dt );
n = 0;
For( ii = 1, ii <= N Rows( rs ), ii++,
If( Excluded( As Row State( rs[ii] ) ),
n
++)
);
t << Set Text( Char( n ) || " Rows Excluded" );
);
rsupdate = Function( {a},
If( Is Matrix( a ),
updatetext()
)
);
rsh = t << Make Row State Handler( dt, rsupdate );
updatetext();
dt2 = Open("data_table.jmp");
New Window( "filter test",
Data Filter Context Box(
V List Box(
t2 = Text Box( "0 Rows Excluded" ),
Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) )
)
)
);
updatetext2 = Function( {},
rs = t2 << Get Row States( dt2 );
n = 0;
For( ii = 1, ii <= N Rows( rs ), ii++,
If( Excluded( As Row State( rs[ii] ) ),
n
++)
);
t2 << Set Text( Char( n ) || " Rows Excluded" );
);
rsupdate2 = Function( {a},
If( Is Matrix( a ),
updatetext2()
)
);
rsh2 = t2 << Make Row State Handler( dt2, rsupdate2 );
updatetext2();
dt << Select Rows( [1, 2, 3, 4] );
dt << Exclude;
rows = dt << Get as Matrix( {1, 2} );
dt2 << Select Rows( [1, 2] );
dt2 << Exclude;
rows2 = dt2 << data view;
newtable = rows2 << Get as matrix( {2} );
Code Explanation:
- Open data table;
- Create filter window for data_table.
- Initialize excluded row count display.
- Define update function for excluded rows.
- Attach update function to row state changes.
- Update excluded row count display.
- Open data table;
- Create filter window for PopAgeGroup.
- Initialize excluded row count display.
- Define update function for excluded rows.
Example 8
Summary: Creates a bubble plot with multiple variables, including X-axis as negative weight, Y-axis as absolute height, and sizes as sum of age, while also configuring color levels, axis scales, and frame size.
Code:
dt = Open("data_table.jmp");
New Window( "data_table - Bubble Plot of Abs[height] by -weight",
Bubble Plot(
X( Transform Column( "-weight", Formula( -:weight ) ) ),
Y( Transform Column( "Abs[height]", Formula( Abs( :height ) ) ) ),
Sizes( Transform Column( "Sum[age]", Formula( Col Sum( :age ) ) ) ),
Coloring( Transform Column( "Row", Formula( Row() ) ) ),
ID( Transform Column( "First[name]", Character, Formula( Word( 1, :name ) ) ) ),
Legend( 0 ),
Color Levels( [1 10.75 20.5 30.25 40] ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -180 ), Max( -60 ), Inc( 20 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 50 ), Max( 70 ), Inc( 5 ), Minor Ticks( 1 )} ),
Dispatch( {}, "Bubble Plot", FrameBox, {Frame Size( 482, 360 )} )
)
)
) << Move Window( 152, 91 ) << Set Window Icon( "BubblePlot" );
New Window( "data_table - Bubble Plot of Abs[height] by -weight 2",
Bubble Plot(
X( Transform Column( "-weight", Formula( -:weight ) ) ),
Y( Transform Column( "Abs[height]", Formula( Abs( :height ) ) ) ),
Sizes( Transform Column( "Sum[age]", Formula( Col Sum( :age ) ) ) ),
Coloring( Transform Column( "Row", Formula( Row() ) ) ),
ID( Transform Column( "First[name]", Character, Formula( Word( 1, :name ) ) ) ),
Legend( 0 ),
Color Levels( [1 10.75 20.5 30.25 40] ),
Title Position( 0, 0 ),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( -180 ), Max( -60 ), Inc( 20 ), Minor Ticks( 1 )} ),
Dispatch( {}, "2", ScaleBox, {Min( 50 ), Max( 70 ), Inc( 5 ), Minor Ticks( 1 )} )
)
)
) << Move Window( 58, 58 ) << Set Window Icon( "BubblePlot" );
Code Explanation:
- Open data table.
- Create new window for bubble plot.
- Define X-axis as negative weight.
- Define Y-axis as absolute height.
- Define sizes as sum of age.
- Define coloring by row number.
- Define ID as first name.
- Hide legend.
- Set color levels.
- Adjust title position.
- Set axis scales and frame size.
- Move window to position (152, 91).
- Set window icon.
- Repeat steps 2-13 for second bubble plot.
- Move second window to position (58, 58).
- Set second window icon.
Bubble Plot using Column
Summary: Creates a bubble plot to visualize relationships between weight, height, and sex in a dataset, utilizing value labels for categorical data.
Code:
Open("data_table.jmp");
Column( "sex" ) << ValueLabels( {"M", "F"}, {"Male", "Female"} );
Column( "sex" ) << UseValueLabels;
Bubble Plot( X( :weight ), Y( :height ), ID( :sex ), Label( "All" ), Title Position( 0, 0 ), Label Offset( {0, 23, -81}, {1, -89, 70} ) );
Code Explanation:
- Open data table;
- Set value labels for "sex".
- Enable value labels for "sex".
- Create bubble plot.
- Set X axis to "weight".
- Set Y axis to "height".
- Use "sex" for IDs.
- Label all points.
- Set title position.
- Set label offsets.
Bubble Plot using Row State
Summary: Creates a bubble plot from a data table, setting row states for specific rows and assigning color states to selected rows.
Code:
dt = Open("data_table.jmp");
Row State( 139 ) = Combine States( Color State( 4 ) );
Row State( 140 ) = Combine States( Color State( 4 ) );
Row State( 141 ) = Combine States( Color State( 4 ) );
Row State( 142 ) = Combine States( Color State( 4 ) );
Row State( 143 ) = Combine States( Color State( 4 ) );
Row State( 144 ) = Combine States( Color State( 4 ) );
Row State( 145 ) = Combine States( Color State( 4 ) );
Row State( 146 ) = Combine States( Color State( 4 ) );
Row State( 147 ) = Combine States( Color State( 4 ) );
Row State( 148 ) = Combine States( Color State( 4 ) );
Row State( 149 ) = Combine States( Color State( 4 ) );
Row State( 150 ) = Combine States( Color State( 4 ) );
myBP = Bubble Plot( X( :DAY ), Y( :DIAMETER ) );
Code Explanation:
- Open data table.
- Set row state for specific rows.
- Assign color state to selected rows.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
Bubble Plot using Select Where
Example 1
Summary: Creates a bubble plot to visualize data for 1962, hiding selected rows and setting X-axis, Y-axis, and bubble sizes.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :year == 1962 );
dt << Hide( 1 );
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
Code Explanation:
- Open data table.
- Select rows where year is 1962.
- Hide selected rows.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Add time variable.
- Include ID variables.
Example 2
Summary: Creates a bubble plot to visualize data from 1962, hiding selected rows and setting various variables for X-axis, Y-axis, sizes, time, and ID.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :year == 1962 );
dt << Hide( 1 );
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
bp << time index( 3 );
Code Explanation:
- Open data table.
- Select rows where year is 1962.
- Hide selected rows.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Set sizes variable.
- Set time variable.
- Set ID variables.
- Set time index to 3.
Example 3
Summary: Creates a bubble plot to visualize data from 1962, with interactive features for filtering and grouping by region and country.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :year == 1962 );
dt << Hide( 1 );
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
bp << time index( 3 );
dt << Hide( 0 );
Code Explanation:
- Open data table.
- Select rows where year is 1962.
- Hide selected rows.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Set size variable.
- Set time variable.
- Set ID variables.
- Show all hidden rows.
Example 4
Summary: Creates a bubble plot from a data table, filtering rows by year and excluding specific values.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :year == 1962 );
dt << Exclude( 1 );
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
Code Explanation:
- Open data table.
- Select rows where year is 1962.
- Exclude selected rows.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Set sizes variable.
- Set time variable.
- Set ID variables.
- Display bubble plot.
Example 5
Summary: Creates a bubble plot to visualize data from 1962, utilizing the Bubble Plot platform in JMP.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :year == 1962 );
dt << Exclude( 1 );
bp = Bubble Plot( X( :Name( "Portion 0-19" ) ), Y( :Name( "Portion60+" ) ), Sizes( :Pop ), Time( :Year ), ID( :Region, :Country ) );
bp << time index( 3 );
Code Explanation:
- Open data table.
- Select rows where year is 1962.
- Exclude selected rows.
- Create bubble plot.
- Set X axis variable.
- Set Y axis variable.
- Set sizes variable.
- Set time variable.
- Set ID variables.
- Set time index to 3.
Example 6
Summary: Creates a bubble plot to visualize population data for specific countries, with adjustable label offsets.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :Country == 1125 | :Country == 4120 );
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
Label Offset( {0, -16, -207}, {76, 110, 16}, {2222, 25, 25} )
);
Code Explanation:
- Open data table.
- Select specific countries.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Identify country bubbles.
- Adjust label offsets.
Example 7
Summary: Creates a bubble plot to visualize population data for specific countries, with adjustable label offsets.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :Country == 1125 | :Country == 4120 );
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
ID( :Country ),
Label Offset( {0}, {76, 110, 16}, {2222, 25, 25} )
);
Code Explanation:
- Open data table.
- Select specific countries.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Define bubble sizes.
- Assign country IDs.
- Adjust label offsets.
Example 8
Summary: Creates a bubble plot to visualize male records from a data table, with height on the X-axis and weight on the Y-axis.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :sex == "M" );
bp_id = Bubble Plot(
X( :height ),
Y( :weight ),
Time( :age ),
Coloring( :sex ),
ID( :sex ),
Time Index( 6 ),
Filled( 0 ),
Trail Bubbles( 1 ),
Trail Lines( 1 )
);
Code Explanation:
- Open data table.
- Select male records.
- Create bubble plot.
- Set X axis to height.
- Set Y axis to weight.
- Set time variable to age.
- Color bubbles by sex.
- Use sex for bubble IDs.
- Set time index to 6.
- Disable filled bubbles.
Example 9
Summary: Creates a bubble plot to visualize male records from a data table, with height on the X-axis, weight on the Y-axis, and age as the time variable, colored by sex.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :sex == "M" );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Time( :age ), Coloring( :sex ), Time Index( 6 ), Filled( 0 ), );
Code Explanation:
- Open data table.
- Select male records.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Set time variable to age.
- Color by sex.
- Set time index to 6.
- Disable filled bubbles.
Example 10
Summary: Creates a bubble plot to visualize population data by region and country, with X-axis set to Portion 0-19 and Y-axis to Portion60+, using JMP's Graph Builder platform.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :Region == "Europe" );
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( 0.77, 0.0865 ),
Split( "Asia" ),
Split( "Europe" ),
);
Code Explanation:
- Open data table.
- Select rows where Region is Europe.
- Create bubble plot.
- Set X axis to Portion 0-19.
- Set Y axis to Portion60+.
- Set sizes by population.
- Set time variable to Year.
- Use Region and Country for IDs.
- Disable all labels.
- Disable no labels.
- Set title position.
- Split plot by Asia.
- Split plot by Europe.
Example 11
Summary: Creates a bubble plot to visualize population data across regions, with X-axis variable 'Portion 0-19', Y-axis variable 'Portion60+', and sizes variable 'Pop'.
Code:
dt = Open("data_table.jmp");
dt << Select Where( :Region == "Europe" );
bp = Bubble Plot(
X( :Name( "Portion 0-19" ) ),
Y( :Name( "Portion60+" ) ),
Sizes( :Pop ),
Time( :Year ),
ID( :Region, :Country ),
All Labels( 0 ),
No Labels( 0 ),
Title Position( 0.77, 0.0865 ),
Split( "Asia" ),
Split( "Europe" ),
);
bp << Close Window;
Code Explanation:
- Open table.
- Select where region is Europe.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Set sizes variable.
- Set time variable.
- Set ID variables.
- Disable all labels.
- Disable no labels.
Bubble Plot using Select Rows
Example 1
Summary: Creates a bubble plot to visualize height and weight data, colored by sex, using specific rows from a data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), ID( :sex ), Filled( 0 ), );
Code Explanation:
- Open data table.
- Select specific rows.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Color by sex.
- Use sex for ID.
- Disable filled bubbles.
Example 2
Summary: Creates a bubble plot to visualize height and weight data, colored by sex, for the first 15 rows of a data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), Filled( 0 ), );
Code Explanation:
- Open data table.
- Select first 15 rows.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Color bubbles by sex.
- Disable bubble filling.
Example 3
Summary: Creates a bubble plot to visualize height and weight data, colored by sex, from a specific set of rows in a data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), ID( :sex ), Filled( 1 ), );
Code Explanation:
- Open data table.
- Select specific rows.
- Create bubble plot.
- Set X-axis variable.
- Set Y-axis variable.
- Apply coloring based on sex.
- Use sex for ID.
- Fill bubbles.
Example 4
Summary: Creates a bubble plot to visualize height and weight data, colored by sex, for the first 15 rows of a data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), Filled( 1 ), );
Code Explanation:
- Open data table;
- Select first 15 rows.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Color bubbles by sex.
- Fill bubbles.
Example 5
Summary: Creates a bubble plot to visualize height and weight data, with sex as the ID variable.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_id = Bubble Plot( X( :height ), Y( :weight ), ID( :sex ), Filled( 1 ), );
Code Explanation:
- Open data table.
- Select first 15 rows.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Use sex for ID.
- Enable filled bubbles.
Example 6
Summary: Creates a bubble plot with filled bubbles, using height as the X-axis and weight as the Y-axis, from the first 15 rows of a data table.
Code:
dt = Open("data_table.jmp");
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Filled( 1 ), );
Code Explanation:
- Open data table;
- Select first 15 rows.
- Create bubble plot.
- Set X-axis to height.
- Set Y-axis to weight.
- Enable filled bubbles.
Bubble Plot using Try
Example 1
Summary: Creates a bubble plot to visualize age, height, and weight data, with customizable color theme and title position.
Code:
Open("data_table.jmp");
Try(
Bubble Plot(
X( :age ),
Y( :height ),
Sizes( :weight ),
Coloring( :age ),
Bubble Size( 26 ),
Color Theme( "foofoo" ),
Title Position( 0, 0 ),
)
);
Code Explanation:
- Open data table;
- Attempt to create Bubble Plot.
- Set X-axis to age.
- Set Y-axis to height.
- Use weight for bubble sizes.
- Color bubbles by age.
- Set bubble size to 26.
- Apply color theme "foofoo".
- Position title at origin.
- Handle errors gracefully.
Example 2
Summary: Creates a bubble plot from a data table, with X-axis set to age, Y-axis set to height, and bubble sizes determined by weight, colored by age, and sized at 26 pixels.
Code:
Open("data_table.jmp");
Try(
Bubble Plot(
X( :age ),
Y( :height ),
Sizes( :weight ),
Coloring( :age ),
Bubble Size( 26 ),
Color Theme( "foofoo" ),
Title Position( 0, 0 ),
)
);
bp = Bubble Plot( X( :age ), Y( :height ), Sizes( :weight ), Coloring( :age ), Bubble Size( 26 ), Title Position( 0, 0 ), );
Code Explanation:
- Open data table.
- Attempt to create bubble plot.
- Set X-axis to age.
- Set Y-axis to height.
- Use weight for bubble sizes.
- Color bubbles by age.
- Set bubble size to 26.
- Apply color theme "foofoo".
- Position title at (0,0).
- Create bubble plot again.
Bubble Plot using Char
Summary: Creates and manipulates bubble plots to visualize data table rows based on sex, with interactive features for filtering and selecting specific groups.
Code:
dt = Open("data_table.jmp");
Print( "current data table should be data_table, actually is: " || Char( Current Data Table() << get name ) );
dt << Select Where( :sex == "M" );
bp_id = Bubble Plot(
X( :height ),
Y( :weight ),
Time( :age ),
Coloring( :sex ),
ID( :sex ),
Time Index( 6 ),
Filled( 0 ),
Trail Bubbles( 1 ),
Trail Lines( 1 )
);
Print( "current data table should be data_table, actually is: " || Char( Current Data Table() << get name ) );
bp_id << Close Window;
Print( "current data table should be data_table, actually is: " || Char( Current Data Table() << get name ) );
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Time( :age ), Coloring( :sex ), Time Index( 6 ), Filled( 0 ), );
Print( "current data table should be data_table, actually is: " || Char( Current Data Table() << get name ) );
bp_no_id << Close Window;
Print( "current data table should be data_table, actually is: " || Char( Current Data Table() << get name ) );
dt << Clear Select;
dt << Select Rows( [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] );
bp_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), ID( :sex ), Filled( 0 ), );
bp_id << Close Window;
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), Filled( 0 ), );
bp_no_id << Close Window;
bp_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), ID( :sex ), Filled( 1 ), );
bp_id << Close Window;
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Coloring( :sex ), Filled( 1 ), );
bp_no_id << Close Window;
bp_id = Bubble Plot( X( :height ), Y( :weight ), ID( :sex ), Filled( 1 ), );
bp_id << Close Window;
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Filled( 1 ), );
bp_no_id << Close Window;
dt << clear select;
dt << select where( :sex == "F" );
bp_id = Bubble Plot( X( :height ), Y( :weight ), ID( :sex ), Filled( 0 ), );
bp_id << Close Window;
bp_no_id = Bubble Plot( X( :height ), Y( :weight ), Filled( 0 ), );
bp_no_id << Close Window;
Code Explanation:
- Open data table.
- Print current data table name.
- Select male rows.
- Create bubble plot with time.
- Print current data table name.
- Close bubble plot window.
- Print current data table name.
- Create bubble plot without time.
- Print current data table name.
- Close bubble plot window.
- Print current data table name.
- Clear row selection.
- Select first 15 rows.
- Create bubble plot with ID and filled.
- Close bubble plot window.
- Create bubble plot without ID and filled.
- Close bubble plot window.
- Create bubble plot with ID and filled.
- Close bubble plot window.
- Create bubble plot without ID and filled.
- Close bubble plot window.
- Create bubble plot with ID and filled.
- Close bubble plot window.
- Create bubble plot without ID and filled.
- Close bubble plot window.
- Clear row selection.
- Select female rows.
- Create bubble plot with ID and filled.
- Close bubble plot window.
- Create bubble plot without ID and filled.
- Close bubble plot window.
Bubble Plot using Run Script
Summary: Creates and configures a bubble plot to visualize data relationships, utilizing JMP's scripting language.
Code:
dt = Open("data_table.jmp");
bp = dt << Run Script( "Bubble Plot by Region" );
bp << Step();
bp << Step();
bp << Step();
bp << Close Window();
Close( dt, No Save );
dt = New Table( "TempBubblePlot- (Group = 1)",
Add Rows( 4 ),
New Property( "Source",
Data Table("data_table") << Subset( Output Table( "TempBubblePlot: (Group = 1)" ), Linked, Rows( [1, 2, 3, 4] ) )
),
New Column( "[Organic]", Numeric, Continuous, Format( "Best", 11 ), Set Values( [0.2498697, 0.213315393, 0.253421974, 0.215915522] ) ),
New Column( "[Mexocel]",
Numeric,
Continuous,
Format( "Best", 11 ),
Set Values( [0.022988012, 0.023034056, 0.020273758, 0.020273758] )
),
New Column( "0=Fail", Numeric, Continuous, Format( "Best", 10 ), Set Values( [1, 1, 1, 1] ) ),
New Column( "d(0.5) day 0", Numeric, Continuous, Format( "Best", 10 ), Set Values( [6.3, 7.061, 6.344, 6.477] ) ),
Set Row States( [13312, 13312, 13312, 13312] )
);
bp = Bubble Plot(
X( :Name( "[Mexocel]" ) ),
Y( :Name( "[Organic]" ) ),
Sizes( :Name( "d(0.5) day 0" ) ),
Coloring( :Name( "0=Fail" ) ),
Legend( 1 )
);
bp << Close Window();
Close( dt, No Save );
cert r = [33, 34, 35, 36, 37, 38, 39, 40];
Code Explanation:
- Open data table.
- Run bubble plot script.
- Advance bubble plot step.
- Advance bubble plot step.
- Advance bubble plot step.
- Close bubble plot window.
- Close original data table.
- Create new temporary table.
- Define columns and values.
- Set row states.
Bubble Plot using Bubble Size
Summary: Creates and creates a report for a bubble plot with geographic boundaries, utilizing JMP's graphing capabilities.
Code:
dt = Open("data_table.jmp");
obj = bubble plot( Y( :height ), X( :weight ), coloring( :sex ), Bubble Size( 30 ) );
rpt = obj << report;
Report( obj )[FrameBox( 1 )] << Background Map( Boundaries( "World Countries" ) );
Code Explanation:
- Open data table.
- Create bubble plot object.
- Assign plot to variable.
- Generate report object.
- Access first frame box.
- Add background map.
- Set map boundaries.
Bubble Plot using Set Property
Summary: Creates and customizes bubble plots with color annotations in JMP, utilizing Set Property and SendToReport functions.
Code:
dt = Open("data_table.jmp");
dt:sex << Set Property( "Value Colors", {"F" = -2762201, "M" = -11671595} );
dt:height << Set Property( "Color Gradient", {"White to Green"} );
bp = Bubble Plot(
X( :age ),
Y( :weight ),
Coloring( :sex ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
Add Text Annotation(
Text( "Colors should be SAS Default (dark blue/red),
not Pastel (purple, light green)" ),
Text Box( {2, 19, 400, 65} ),
Filled( 0 ),
Font( "Arial", 12, "Bold Italic" )
)
)
)
);
rpt = bp << report;
bp << Close Window;
bp = Bubble Plot(
X( :age ),
Y( :weight ),
Coloring( :height ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
Add Text Annotation(
Text( "Colors should be White to Green, not White to Black" ),
Text Box( {2, 19, 313, 65} ),
Filled( 0 ),
Font( "Arial", 12, "Bold Italic" )
)
)
)
);
rpt = bp << report;
bp << Close Window;
bp = Bubble Plot(
X( :age ),
Y( :weight ),
Coloring( :weight ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
Add Text Annotation(
Text( "Colors should be White to Black" ),
Text Box( {2, 19, 313, 65} ),
Filled( 0 ),
Font( "Arial", 12, "Bold Italic" )
)
)
)
);
rpt = bp << report;
bp << Close Window;
bp = Bubble Plot(
X( :age ),
Y( :weight ),
Coloring( :age ),
SendToReport(
Dispatch( {}, "Bubble Plot", FrameBox,
Add Text Annotation(
Text( "Colors should be Pastel (purple, light green)" ),
Text Box( {2, 19, 400, 65} ),
Filled( 0 ),
Font( "Arial", 12, "Bold Italic" )
)
)
)
);
rpt = bp << report;
bp << Close Window;
Code Explanation:
- Open data table.
- Set sex color properties.
- Set height color gradient.
- Create bubble plot with sex coloring.
- Add text annotation for sex colors.
- Retrieve report.
- Close bubble plot window.
- Create bubble plot with height coloring.
- Add text annotation for height colors.
- Retrieve report.