Last active
February 3, 2026 20:26
-
-
Save dacr/56cb6df878fc1ebc00968b9bcd0b1c3e to your computer and use it in GitHub Desktop.
smile visualization qqplot / published by https://github.com/dacr/code-examples-manager #5a091c44-98fa-4462-a743-fc1bf51c4245/cd7c2e3af96e7e65730ee6fe0d4da1b673b8081d
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // summary : smile visualization qqplot | |
| // keywords : smile, chart, visualization | |
| // publish : gist | |
| // authors : David Crosson | |
| // license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt) | |
| // id : 5a091c44-98fa-4462-a743-fc1bf51c4245 | |
| // created-on : 2021-03-05T09:23:01Z | |
| // managed-by : https://github.com/dacr/code-examples-manager | |
| // run-with : scala-cli $file | |
| // --------------------- | |
| //> using scala "3.4.2" | |
| //> using dep "com.github.haifengl::smile-scala:3.1.1" | |
| // --------------------- | |
| import smile.stat.distribution.* | |
| import smile.plot.swing.* | |
| import smile.plot.show | |
| // examples coming from http://haifengl.github.io/visualization.html | |
| implicit val renderer:Canvas=>Unit = JWindow.apply | |
| // -------------------------------------------------------------------- | |
| { | |
| val gauss = new GaussianDistribution(0.0, 1.0) | |
| val data = (0 until 1000) map { (i: Int) => gauss.rand } | |
| show(qqplot(data.toArray)) | |
| } | |
| // -------------------------------------------------------------------- | |
| println("enter to exit"); scala.io.StdIn.readLine() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment