O'Reilly logo

Scientific Computing with Scala by Vytautas Jančauskas

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Plotting with scala-chart

scala-chart is a wrapper for JFreeChart that provides a more convenient interface for working with JFreeChart than using the Java library directly. It allows you to accomplish everything that JFreeChart does with fewer lines of code and at the same time using idiomatic Scala, a definite feel-good factor. In this section, we will see how to replicate the plots from the previous section using this library. The website for scala-chart is given here:

https://github.com/wookietreiber/scala-chart

Installing scala-chart

Create a build.sbt file in your project directory like we have done through most of this book. Then, add the following lines to it to pull-in the required dependencies:

libraryDependencies += "com.github.wookietreiber" ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required