From: Omar B. <oba...@gm...> - 2006-11-27 15:05:52
|
Hi, I found the problem just shortly after I sent the email, it seems that the Plot class does not change the zoom automatically as the other graphs, so I have to make sure the X and Y min and max values range was adequate for the values being plotted. The values *were* plotted but as they where outside of the range they were not displayed in the graphic. Thank you! On 11/27/06, Nick Collier <nic...@ve...> wrote: > Omar, > > What you are doing should work. Perhaps, try adding weathPlot.fillPlot() in > step. > > Are you sure that step is actually being called, and if so, if the loop in > over the agents in it is adding valid points? > > Nick > > > > -----Original Message----- > From: rep...@li... > [mailto:rep...@li...] On Behalf Of Omar > Baqueiro > Sent: Thursday, November 23, 2006 9:43 AM > To: rep...@li... > Subject: [Repast-interest] help using uchicago.src.sim.analysis.Plot > > Hi, I am trying to plot some values using the Plot class, however I am > affraid I must be doing something wrong as the Plot window does not show > anything. > > So far I have done this: > > void setup() { > // Create the Agent wealth plot > if (weatlhPlot != null) { > weatlhPlot.dispose(); > } > weatlhPlot = new Plot("Agent Weatlh", this); > weatlhPlot.setAxisTitles("Wealth", "Agent"); ... > } > > begin(){ > ... > weatlhPlot.display(); > } > > step() > { > ... > // clear the data set > weatlhPlot.clear(0); > // plot all the points in the dataset > for (ExchangeAgent agent : this.agentList) { > weatlhPlot.plotPoint(agent.getAgentNumber(), agent.getWealth(), 0); > } > weatlhPlot.updateGraph(); > weatlhPlot.step(); // just added > } > > The Plot window is displayed but none of the points are being shown. I have > debugged it and no error appear. I added the .step() function to see if > something happened. > > Is there anything else I need to do? > -- > Omar Baqueiro Espinosa > Computer Science PhD Candidate > Computer Systems Engineer > Home: www.csc.liv.ac.uk/~omar/ > Calendar: calendar.yahoo.com/obaqueiro > PGP Key available at: www.csc.liv.ac.uk/~omar/pgp.html _____ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's > Techsay panel and you'll get the chance to share your opinions on IT & > business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Repast-interest mailing list > Rep...@li... > https://lists.sourceforge.net/lists/listinfo/repast-interest > > -- Omar Baqueiro Espinosa Computer Science PhD Candidate Computer Systems Engineer Home: www.csc.liv.ac.uk/~omar/ Calendar: calendar.yahoo.com/obaqueiro PGP Key available at: www.csc.liv.ac.uk/~omar/pgp.html _____ |