All Downloads are FREE. Search and download functionalities are using the official Maven repository.

examples.plotting.example5.example.md Maven / Gradle / Ivy

The newest version!
# Example 5: Scatter Plot 

## Contents
* [Overview](#overview) 
* [Import files](#include_files)
* [The main function](#m_func)
* [Results](#results)
* [Source Code](#source_code)

##  Overview

##  Import files

```
import dataloader.CsvDataLoader;
import tech.tablesaw.api.Table;
import visualizations.ScatterChart;

import java.io.File;
import java.io.IOException;

```

##  The main function

```
public class Example5 {

    public static void main(String[] args) throws IOException {
        File file = new File("data/humans_data.csv");
        Table data = CsvDataLoader.TableLoader.parseFile(file);

        ScatterChart plotter = new ScatterChart();
        ScatterChart.ScatterChartOptions options = plotter.new ScatterChartOptions();
        options.chartTitle = "weight by age and height";
        options.xAxisName = "Age";
        options.yAxisName = "Height";
        options.sizeColName = "Weight";

        ScatterChart.plotScatter3D(options, data);
    }
}

```

##  Results

```

```

##  Source Code

Example5.java




© 2015 - 2024 Weber Informatics LLC | Privacy Policy