Mercurial > hg > may
view scraps/plot.yeti @ 173:2cb4c78d42db
Another test
author | Chris Cannam |
---|---|
date | Thu, 02 May 2013 17:38:23 +0100 |
parents | 8f6c2f87dc35 |
children |
line wrap: on
line source
module scraps.plot; import org.jzy3d.chart: Chart; import org.jzy3d.plot3d.rendering.canvas: Quality; import org.jzy3d.maths: Coord3d; import org.jzy3d.plot3d.primitives: MultiColorScatter; import org.jzy3d.colors.colormaps: ColorMapRainbow; import org.jzy3d.colors: ColorMapper; import org.jzy3d.colors: Color; import org.jzy3d.chart: ChartLauncher; points = new Coord3d[1000]; r () = Math#random() - 0.5; for [0..999] do i: points[i] := new Coord3d(r(),r(),r()) done; m = new MultiColorScatter(points, new ColorMapper(new ColorMapRainbow (), -0.5, 0.5)); c = new Chart(Quality#Advanced); c#getAxeLayout()#setMainColor(Color#WHITE); c#getView()#setBackgroundColor(Color#BLACK); c#getScene()#add(m); ChartLauncher#openChart(c);