# HG changeset patch # User Chris Cannam # Date 1396258122 -3600 # Node ID 25b925cf3c9888885d9b5d2041a9e77ce19b1fbc # Parent f20297bca167873fa3e41e62537abacc4276d440# Parent 25800b390b07ab44b5420a03d111157919819d0b Merge diff -r 25800b390b07 -r 25b925cf3c98 src/may/plot.yeti --- a/src/may/plot.yeti Fri Mar 28 13:16:12 2014 +0000 +++ b/src/may/plot.yeti Mon Mar 31 10:28:42 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: