Wait, never mind. I switched 0 for the 1 in the index, and it worked. I looked in vain for a better way to reference the series index. Ah well.

On Mon, Jun 28, 2010 at 4:05 PM, Paul Smaldino <[log in to unmask]> wrote:
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?

Thanks!

-Paul


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




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