Re: [Ccoptions-development] Altering graphs using controls
Status: Planning
Brought to you by:
csvgr
|
From: Peter W. <P.W...@wa...> - 2003-09-17 08:23:24
|
>>> d.r...@wa... 09/16/03 18:50 PM >>>
This email is really to Peter but I thought I'd post to the list to keep
everyone informed.
CCDataSet co2concs =3D new CCDataSet("global", "co2concs");
loads co2concs from the file global.csv into a new dataset
This loads the past smoothedco2concs from global.csv into a dataset. We =
need this as figures from t-25 are need for the smoothed co2 concentrations=
curve.
CCDataSet smoothedco2concs =3D new CCDataSet("global",
"smoothedco2concs");
=20
Create a new smoothed co2 curve from the data we have
CCCo2Concentrations co2conc =3D new CCCo2Concentrations(co2concs, ds, =
revision);
actually calculate the smoothed co2, calculating data for every year
CCDataSet ds2 =3D co2conc.model(1900, 2200, 1);
at the moment (until its fixed, easy) this needs to be calculated for =
every year as I couldn't find a neat solution to the difference equation.
got to go now, will continue later
// Using the predicted CO2, get the smoothed temperature model.
CCSmoothedTemp cct =3D new CCSmoothedTemp(ds2, smoothedco2concs);
// why does it all go so wonky if i set the temperature back to 1900?
// do we have any data on temperature rises in the past?
CCDataSet ds3 =3D cct.model(2000, 2200, 1);
TimeSeries s2 =3D ds3.toTimeSeries("Global Temperature Rise");
dataset.addSeries(s2);
dataset.setDomainIsPointsInTime(true);
dataset.setPosition(TimeSeriesCollection.MIDDLE);
JFreeChart chart =3D createChart(dataset,
"Predicted Global Temperate Rise");
ChartPanel chartPanel =3D new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
chartPanel.setMouseZoomable(true, false);
getContentPane().add(chartPanel);
}
If you could reply with some examples of how the control could alter the
graph and correct my comments above then that would be very useful...
Cheers,
Dan.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Ccoptions-development mailing list
Cco...@li...
https://lists.sourceforge.net/lists/listinfo/ccoptions-development
|