From the course: Data Science for Java Developers
Unlock this course with a free trial
Join today to access over 22,400 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.