|
From: Michal K. <mic...@ce...> - 2004-04-01 13:36:18
|
Hello guys,
I'm using OpenHistogram in my simulation and I have created it this way:
----------------------------------------------------------------
//part of model class
histogram = new OpenHistogram("title", 7, 0, this);
histogram.setLocation(450, 450);
histogram.setAxisTitles("colonies", "average time");
histogram.setXRange(-1, 8);
histogram.setYRange(0, 1000);
histogram.setXTick(0, "t 1");
histogram.setXTick(1, "t 2");
histogram.setXTick(2, "t 3");
histogram.setXTick(3, "t 4");
histogram.setXTick(4, "t 5");
histogram.setXTick(5, "t 6");
histogram.setXTick(6, "t 7");
histogram.createHistogramItem("colony times", histogramList,
"getColonyNr", -1 ,2);
histogram.display();
----------------------------------------------------------------
then I normally call:
----------------------------------------------------------------
histogram.step();
----------------------------------------------------------------
scheduled of each tick.
My problem is this: at the beginning of simulation, when I click
'Initialize' button in RePast toolbar, it gives empty nice histogram
(see first attached picture), with proper labels 't 1', 't 2', 't 3',
't 4', 't 5', 't 6', 't 7' on x-axis. But when I start simulation with
either 'Step' or 'Start' button, the histogram gets filled with proper
values, but my 't 1', 't 2', 't 3', 't 4', 't 5', 't 6', 't 7' labels on
x-axis all disappear (see second attached picture) and are replaced with
strange numbers instead. I don't want this happen - I want to keep my
labels instead of these strange numbers (btw., what do they mean mean?).
How can I do it?
Thx, in advance
Michal
|