June 2010


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
Paul Smaldino <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Mon, 28 Jun 2010 16:05:00 -0700
text/plain (1629 bytes) , text/html (2273 bytes)
Thanks. I followed/adapted the example in the how-to. I got the histogram to
appear with the initial values, but I'm having trouble figuring out how to
update the values, since it uses an array of doubles and not an XYSeries.

I tried
chart.updateSeries(1, as.getAgentConnectivity(), false);
where the second term is a double[].  But this doesn't work, possibly due to
the indexing? This JFreeChart stuff is pretty confusing.

Any tips on how to get the histogram to update?



On Mon, Jun 28, 2010 at 3:20 PM, Sean Luke <[log in to unmask]> wrote:

> You're probably looking for setting up a Chart as a Display -- a permanent
> fixture in your simulation, appearing under the Displays list, rather than
> something the user generates on his own.  That way you can customize it
> however you like.
> I don't have an example for doing this with a Histogram.  However the
> process is *very* similar to how it's done with Time Series charts, and
> there's an example of that in docs/howto.html  ("How to Add a Time-Series
> Chart Programmatically").
> At 5:51 PM, Paul Smaldino wrote:
>  Hi,
>> I really like the ability to make a dynamic histogram, as shown in the
>> Heatbugs demo. I'm interested in customizing it so I can pre-set the axis
>> labels, range, number of bins, colors, etc.  However, I'm not sure how to
>> go
>> about doing this. Can anyone help point me in the right direction?
>> Thanks!
>> -Paul
>> --
>> ____________________________
>> Paul Smaldino, M.A.
>> Department of Psychology
>> University of California, Davis

Paul Smaldino, M.A.
Department of Psychology
University of California, Davis