Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active May 8, 2023 20:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dacr/715081999da3006ea0ee03c4ad15ba0f to your computer and use it in GitHub Desktop.
Save dacr/715081999da3006ea0ee03c4ad15ba0f to your computer and use it in GitHub Desktop.
breeze visualization example / published by https://github.com/dacr/code-examples-manager #849ab856-1ba9-4b60-8b74-42d989be30ea/1c208470743ebc6d92c82837e9619904e6909908
// summary : breeze visualization example
// keywords : plotting, breeze, math
// publish : gist
// authors : breeze documentation
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 849ab856-1ba9-4b60-8b74-42d989be30ea
// created-on : 2020-10-11T15:05:16Z
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// ---------------------
//> using scala "3.2.2"
//> using dep "org.scalanlp::breeze:2.1.0"
//> using dep "org.scalanlp::breeze-viz:2.1.0"
// ---------------------
// breeze viz documentation : https://github.com/scalanlp/breeze/wiki/Quickstart
import breeze.linalg._
import breeze.plot._
val f2 = Figure()
f2.subplot(0) += image(DenseMatrix.rand(200,200))
f2.saveas("image.png")
scala.io.StdIn.readLine("Press enter to quit")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment