MASON-INTEREST-L Archives

May 2012

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML 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:
Joaquin Zabalo <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Fri, 4 May 2012 10:03:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (30 lines)
I’m trying to extract TimeSeriesAttributes in order to set the line color in
a time-series by using setStrokeColor(). I followed the suggestions in:

	MASON-INTEREST-L Digest - 24 Aug 2009 to 26 Aug 2009 (#2009-25)

I am using the following sample code segments:

	TimeSeriesChartGenerator chartgen;
	TimeSeriesAttributes attrib;
	XYSeries series[];

	series[1] = new XYSeries("Fish abundance", false);
	series[2] = new XYSeries("Seal abundance", false);

	chartgen.addSeries(series[1],  null);
	chartgen.addSeries(series[2],  null);

	TimeSeriesAttributes attrib = 
                   (TimeSeriesAttributes) chartgen.getSeriesAttributes(1);

	attrib.setStrokeColor(Color.blue);

However,  when I try to extract the TimeSeriesAttributes in the line before
last, I get the following error:

	The method getSeriesAttributes() in the type ChartGenerator is not
              applicable for the arguments (int)

Is this the correct way to change the line color?

ATOM RSS1 RSS2