import almond.interpreter.api._
val html = DisplayData.html("<div> Hello World </div>")
display(html)
import scala.concurrent._
implicit val ec = ExecutionContext.global
Future(diplay(html))
val svgText = """<svg version="1.1"
baseProfile="full"
width="300" height="200"
xmlns="http://www.w3.org/2000/svg">
<rect width="100%" height="100%" fill="red" />
<circle cx="150" cy="100" r="80" fill="green" />
<text x="150" y="125" font-size="60" text-anchor="middle" fill="white">SVG</text>
</svg>"""
val svg = DisplayData.svg(svgText)
display(svg)
val latex = DisplayData.latex("x^2 + y^2 = 1")
display(latex)
import $ivy.`io.github.siddhartha-gadgil::provingground-core-jvm:0.1.0`
import provingground._, interface._
val cvs = new SvgPlot(400, 200)
val plot = cvs
val ax = cvs.plot(cvs.axes)
display(DisplayData.html(ax.toString))
val svgAx = DisplayData.svg(s"""<svg version="1.1"
baseProfile="full"
width="300" height="200"
xmlns="http://www.w3.org/2000/svg">$ax</svg>""")
display(svgAx)
plot.yval(0)
plot.axes
import cvs._
axes
val pl = polyline((0, 0), (100, 100), (200, 100))
display(DisplayData.html(plot(pl).toString))
val point = (1 to 100) map ((x) => (x : Double, math.max(x, 50): Double))
val g = graph(point)
val pg = plot(g)
val svgPg = DisplayData.svg(s"""<svg version="1.1"
baseProfile="full"
width="300" height="200"
xmlns="http://www.w3.org/2000/svg">$pg</svg>""")
display(svgPg)
val circ = circle(0, 0, 20, "red")
val pic = plot(circ :: axes)
display(DisplayData.html(pic.toString))