MASON-INTEREST-L Archives

June 2016

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Tue, 14 Jun 2016 23:23:59 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (16 lines)
On Jun 14, 2016, at 9:49 PM, Joseph F Harrison <[log in to unmask]> wrote:

> Option A) Version based on TimeTableXYDataset.

This is the wrong dataset.  Don't use it.

> Option B) Version that uses a DefaultTableXYDataset to store the data.

You might also try CategoryTableXYDataset or XYSeriesCollection.  Anyway...

> Here's what happens: DefaultTableXYDataset listens to the change event for all the XYSeries you add to it. Whenever you add a value to any series with a previously unseen x-value (e.g. x=1), it adds a dummy entry to all the other series. Then, when you try to add a value (at x=1) to another series, it sees the dummy value already there (at x=1) and throws a SeriesException: X-value already exists.

Are you using add() or are you using addOrUpdate()?  The latter would probably work, no?

Sean

ATOM RSS1 RSS2