View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Easy MultipleTimeseriesSeries

4.0 | 1 rating Rate this file 5 Downloads (last 30 days) File Size: 262 KB File ID: #30405 Version: 1.0
image thumbnail

Easy MultipleTimeseriesS‚Äčeries


Sven Koerner (view profile)


Example Code of MultipleTimeSeries using JFreeChart within Matlab

| Watch this File

File Information

Multiple TimeSeriesDemo al√° JFreeGraph-Demo

The code behind is just a demo of what is possible with JFreeChart using it in Matlab. I played a little
with codesnippets I found on the web and the API-Documentation.
( When you want to explore the whole functionality,
I think it is better to buy the JFreeChart Developer Guide (

This function shows a multiple TimeSeries as an example of JFreeChart ( The Idea
to this code is based on the UndocumentedMatlab-Blog of Yair Altman, who shows a sample Code of JFreeChart
for creating a PieChart (

Within the plot you can zoom by pressing the left mouse button and moving the pointer. Also you have some
properties by right-clicking on the chart.

Before this demo works, you need to download JFreeChart and make matlab get to know with it. There are 2
ways you can do this:

1. Add the jcommon and jfreechart jar to the dynamic matlab JavaClassPath (uncommented lines in the first
   cell an change path to your local installation path)
2. Add the jcommon and jfreechart jar to the static matlab JavaClassPath (see Matlab Help, modify
   classpath.txt on matlabroot\toolbox\local)

Finally you must donwload jcontrol from Malcom Lidierth


Using Java Swing Components In Matlab inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Other requirements
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
12 Feb 2013 Morteza

Hi dear Sven
I try to plot may data according to sample time that it belong to past.
in these two lines program takes current system time and plot your data:

series.add(startperiod, value);
startperiod =;

How can I set the my time sampling instead of system time sampling?

your work is great ...
plot in this situation is really beautiful...
Thanks Sven...

Comment only
05 Aug 2011 Zdenek Cepa

14 Feb 2011 Yair Altman

Yair Altman (view profile)

Thanks Sven - I updated the Blog comment with a link here.

I think additional JFreeChart-based utilities such as this will be accepted with enthusiasm by the Matlab File Exchange community. So please keep up by posting additional plot types.

Comment only

Contact us