---
title: Time Series Forecasting Model STATBEANS® | Time Series Visualization
description: See how the Time Series Forecasting Model STATBEAN® can plot a forecast for a time. Get the Statgraphics to aid in time series visualization and analysis.
---

[![Statgraphics 19 logo](https://www.statgraphics.com/hs-fs/hubfs/stat19plain-01-1.png?width=2272&height=484&name=stat19plain-01-1.png "Statgraphics 19 logo")](https://www.statgraphics.com)

- [Products](https://www.statgraphics.com/product)
- [Learn](https://www.statgraphics.com/statistics-library)
- [Training](https://www.statgraphics.com/training-and-consulting)

- [Product](https://www.statgraphics.com/product) 
    - [Centurion XVIII](https://www.statgraphics.com/centurion-xvii)
    - [Sigma Express](https://www.statgraphics.com/statgraphics-sigma-express)
    - [Online](https://www.statgraphics.com/statgraphics-stratus)
    - [Web Services](https://www.statgraphics.com/statgraphics-web-services)
- [Learn](https://www.statgraphics.com/statistics-library) 
    - [Statistics Library](https://www.statgraphics.com/statistics-library)
    - [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)
    - [Instructional Videos](https://www.statgraphics.com/instructional-videos)
    - [Applications/ Case Studies](https://www.statgraphics.com/application)
- [Training & Consulting](https://www.statgraphics.com/training-and-consulting) 
    - [Statpoint Seminars](https://www.statgraphics.com/statpoint-seminar)
    - [Statpoint Instructors](https://www.statgraphics.com/statpoint-instructor)
    - [Training Partners](https://www.statgraphics.com/training-partners)
    - [Webinars](https://www.statgraphics.com/webinars)
- [Support](https://www.statgraphics.com/customer-support-overview)
- [Blog](https://www.statgraphics.com/blog)
- [Store](http://store.statgraphics.com)

### Statgraphics

## [Centurion](https://www.statgraphics.com/centurion-overview)

#### [LEARN MORE](https://www.statgraphics.com/centurion-overview)

### Statgraphics

## [Sigma *express*](https://www.statgraphics.com/statgraphics-sigma-express)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-sigma-express)

### Statgraphics

## [*Stratus*](https://www.statgraphics.com/statgraphics-stratus)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-stratus)

### Statgraphics

## [Web Services](https://www.statgraphics.com/statgraphics-web-services)

#### [LEARN MORE](https://www.statgraphics.com/statgraphics-web-services)

## [Statistics Library](https://www.statgraphics.com/statistics-library)

#### [LEARN MORE](https://www.statgraphics.com/statistics-library)

## [Six Sigma & Lean](https://www.statgraphics.com/six-sigma-lean)

#### [LEARN MORE](https://www.statgraphics.com/six-sigma-lean)

## [Instructional Videos](https://www.statgraphics.com/instructional-videos)

#### [LEARN MORE](https://www.statgraphics.com/instructional-videos)

## [Applications/ Case Studies](https://www.statgraphics.com/statistical-applications)

#### [LEARN MORE](https://www.statgraphics.com/statistical-applications)

## [Statgraphics Seminars](https://www.statgraphics.com/statpoint-seminar)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-seminar)

## [Statgraphics Instructors](https://www.statgraphics.com/statpoint-instructor)

#### [LEARN MORE](https://www.statgraphics.com/statpoint-instructor)

## [Training Partners](https://www.statgraphics.com/public-seminar)

#### [LEARN MORE](https://www.statgraphics.com/public-seminar)

## [Webinars](https://www.statgraphics.com/webinars)

#### [LEARN MORE](https://www.statgraphics.com/webinars)

#### Statbeans

- [STATBEANS® Overview](https://www.statgraphics.com/statbeans)
- [DataSource STATBEANS®](https://www.statgraphics.com/statbeans_datasource)
- [Calculation STATBEANS®](https://www.statgraphics.com/statbeans_calculations)
- [Tabular STATBEANS®](https://www.statgraphics.com/statbeans_tabular)
- [Graphical STATBEANS®](https://www.statgraphics.com/statbeans_graphical)

[Back to Product Overviews](https://www.statgraphics.com/product)

<https://www.statgraphics.com/statbeans/graphical/time_series_forecast_plot#anchor3>

# TimeSeriesForecastPlot Statbean®

**Purpose:** Plots forecast for a time series. Allows Statgraphics to create a time series forecasting model.

**Time Series Visualization DataSource: **TimeSeriesForecast. 

![forecastplot](https://www.statgraphics.com/hs-fs/hubfs/forecastplot.gif?width=450&name=forecastplot.gif)

**Time Series Visualization Read/Write Properties**

| **Name** | **Type** | **Description** | **Possible Values** | **Default Value** |
| --- | --- | --- | --- | --- |
| confidenceLimitsColor | Color | The color of the confidence limits. | Any valid Color. | Color.red |
| forecastColor | Color | The color of the forecasts. | Any valid Color. | Color.magenta |
| lastPeriodsToPlot | int | The number of data values to plot in addition to the forecasts. | 0+, or -1 for all | -1 |
| showConfidenceLimits | boolean | Whether to display confidence limits for the forecasts. | true,false | true |

Other properties for creating a time series forecasting model are inherited from the java.awt.Canvas class and from the general [GraphicalStatbean](http://www.statlets.com/statbeans/graphicalstatbeandoc.htm) class.

**Time Series Visualization Tool Code Sample** 

//create a datasource bean   
FileDataSource fileDataSource1 = new STATBEANS.FileDataSource(); 

//set the file name to be read   
fileDataSource1.setFileName("c:\\\\statbeans\\\\samples\\\\bridge.txt"); 

//create a forecasting bean   
TimeSeriesForecast forecast1 = new STATBEANS.TimeSeriesForecast(); 

//set variable name   
forecast1.setTimeSeriesVariableName("traffic"); 

//set time scale   
forecast1.setTimeScale("month");   
forecast1.setStartTime("1/86");   
forecast1.setSeasonalLength(12); 

//set number of forecasts desired   
forecast1.setNumberOfForecasts(24); 

//set model type and parameters   
forecast1.setModelType("ARIMA");   
forecast1.setArimaD(1);   
forecast1.setArimaMA(1);   
forecast1.setArimaSD(1);   
forecast1.setArimaSMA(1);   
forecast1.setArimaIncludeConstant(false); 

//create a plot bean   
TimeSeriesForecastPlot plot1 = new STATBEANS.TimeSeriesForecastPlot(); 

//set plot features   
plot1.setBounds(36,12,450,300);   
plot1.setHighlightPointOnMouseClick(true);   
plot1.setShowPointClickedMessage(true); 

//restrict amount of historical data plotted   
plot1.setLastPeriodsToPlot(120); 

//add the plot to the application frame   
add(plot1); 

//make the forecasting bean a listener for changes in the FileDataSource bean   
fileDataSource1.addDataChangeListener(forecast1.listenerForDataChange); 

//make the plot bean a listener for changes in the forecasting bean   
forecast1.addDataChangeListener(plot1.listenerForDataChange); 

//instruct the fileDataSource bean to read the file   
fileDataSource1.readData();

[![contact-icon](https://www.statgraphics.com/hs-fs/hubfs/stat19web/sales.png?width=50&name=sales.png "contact-icon.fw")](https://www.statgraphics.com/contact-us-dealers-global-partners)

### [CONTACT SALES](https://www.statgraphics.com/contact-us-dealers-global-partners)

Contact our Sales team today

[![youtube-icon.fw](https://www.statgraphics.com/hubfs/stat19web/watchr.png)](https://www.statgraphics.com/instructional-videos)

### [WATCH A VIDEO](https://www.statgraphics.com/instructional-videos)

Learn more about the many enhancements added to Version 19

[![download](https://www.statgraphics.com/hubfs/stat19web/downloadr.png)](https://www.statgraphics.com/download18)

### [DOWNLOAD TRIAL](https://www.statgraphics.com/download19)

Try Statgraphics 19 today for free!

[![eye icon](https://www.statgraphics.com/hubfs/stat19web/viewr.png)](https://www.statgraphics.com/download-brochure-0)

### [VIEW BROCHURE](https://www.statgraphics.com/download-brochure-0)

Discover Statgraphics 19 with our product brochure.

![contact us](https://www.statgraphics.com/hubfs/stat19web/contactr.png)

© 2025 Statgraphics Technologies, Inc.

The Plains, Virginia

[CONTACT US](https://www.statgraphics.com/contact-us-partner)

![Statgraphics download center](https://www.statgraphics.com/hs-fs/hubfs/stat19web/downloadcr.png?width=50&name=downloadcr.png)

Have you purchased Statgraphics Centurion or Sigma Express and need to download your copy?

[CLICK HERE](https://www.statgraphics.com/download-center)

- [Support](https://www.statgraphics.com/customer-support-overview)
- [Company](https://www.statgraphics.com/contact-us-dealers-global-partners)
- [Blog](https://blog.statgraphics.com)

-  
-          

-  