I'd like to generate graphs using the visualization package, e.g.,
import breeze.linalg._
import breeze.plot._
val f = Figure()
val p = f.subplot(0)
val x = linspace(0.0,1.0)
p += plot(x, x ^:^ 2.0)
p += plot(x, x ^:^ 3.0, '.')
p.xlabel = "x axis"
p.ylabel = "y axis"
f.saveas("lines.png")
This does work and generate a file lines.png. However, it also opens a Java Swing window showing the plot.
In my brief search I could not find an easy way to turn this off so I kindly ask for a way to be added to generate visualizations without them automatically opening a GUI window.
Especially if you are using breeze in a scala worksheet, it is rather annoying having to close the window every time you save the worksheet.
I'd like to generate graphs using the visualization package, e.g.,
This does work and generate a file
lines.png
. However, it also opens a Java Swing window showing the plot. In my brief search I could not find an easy way to turn this off so I kindly ask for a way to be added to generate visualizations without them automatically opening a GUI window.Especially if you are using breeze in a scala worksheet, it is rather annoying having to close the window every time you save the worksheet.