Mercurial > hg > may
changeset 552:f20297bca167
Start on captions
author | Chris Cannam |
---|---|
date | Mon, 31 Mar 2014 10:16:02 +0100 |
parents | 5d6aeb765804 |
children | 25b925cf3c98 |
files | src/may/plot.yeti |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/may/plot.yeti Tue Mar 25 10:32:01 2014 +0000 +++ b/src/may/plot.yeti Mon Mar 31 10:16:02 2014 +0100 @@ -20,6 +20,7 @@ import org.jzy3d.contour: DefaultContourColoringPolicy; import org.jzy3d.contour: MapperContourPictureGenerator; import org.jzy3d.chart.factories.AWTChartComponentFactory; +import org.jzy3d.plot3d.text.drawable: DrawableTextBillboard, DrawableTextBitmap; import javax.imageio: ImageIO; @@ -129,6 +130,11 @@ */ ()); +addCaption chart colour caption is ~Chart -> ~Color -> string -> () = + (scene = chart#getScene(); + text = new DrawableTextBitmap(caption, new Coord3d(0, 0, 0), colour); + scene#add(text)); + /** * Plot a list of typed structures onto a single chart, and return the * resulting Chart object. @@ -144,6 +150,9 @@ for structures do s: colour = distinctColour j; case s of + Caption caption: + addCaption chart (new Color(0, 0, 0)) caption; + j := j - 1; // doesn't count as a distinct structure Grid matrix: plotMatrix chart colour matrix; Contour matrix: