From the course: Data Science for Java Developers
Unlock this course with a free trial
Join today to access over 22,600 courses taught by industry experts.
Multiple datasets on a scatterplot - Java Tutorial
From the course: Data Science for Java Developers
Multiple datasets on a scatterplot
- [Instructor] Okay, so now that we've seen how to display a basic scatter plot, there's one more thing I want to show you that's going to come in handy later on when we start actually building our own classifiers. And that is how to display two different types of data on the same scatter plot, all right. So let's say maybe that we wanted to label all of our data points here as either cars that were built before a certain year, or cars that were built after a certain year. And we wanted to display them with a different color on the graph. So if we run it right now, it's all the same color. But let's say we wanted to see visually whether there's really a difference in weight versus mileage, depending on the year that the car was built in. Well, as a matter of fact, JavaFX will largely do this for us. All we really have to do is divide our car data into two different lists basically, and then add those lists to separate…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Setting up JavaFX5m 38s
-
(Locked)
Formatting data for a scatterplot7m 55s
-
(Locked)
Displaying a scatterplot5m 22s
-
(Locked)
Multiple datasets on a scatterplot6m 35s
-
(Locked)
Calculating average MPG4m 46s
-
(Locked)
Displaying a bar chart4m 17s
-
(Locked)
Challenge: Displaying data on a bar chart1m 15s
-
(Locked)
Solution: Displaying data on a bar chart4m 8s
-
(Locked)
-
-
-