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.
Calculating average MPG - Java Tutorial
From the course: Data Science for Java Developers
Calculating average MPG
- [Instructor] Okay, so we've seen how to display data on a scatterplot. And the next thing we're going to do is take a look at a slightly different way to display data. There's obviously a lot of different charts, a lot of different graphs that we can use to visualize our data. So let's take a look at how to display bar charts in Java FX. So let's go over here and create a new Java FX application. And we're going to call this one bar graph. All right, and it's going to look just like what our scatterplot application looked like before. So for this one, what we're going to do is we're basically going to load all of the car data again. So basically what I'm going to do is just go in and copy and paste that from our scatterplot application. Just copy those two statements there. Paste it, and what we're going to do, why don't we just see how the average miles per gallon compares between cars with four cylinder engines, six…
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)
-
-
-