Picta is a graphing library for the Scala. It has an easy to use API that is close to natural language, making it easy to visualize different types of data.
Picta comes with many different plot types, adding extensive charting functionality to the Scala ecosystem.
Plots are composed from smaller, simpler components, and combined together to create plots of varying complexity.
The library is written in Scala, and cross-compiles to versions 2.12 and 2.13.
Picta is also able to run inside a Jupyter Notebook, thanks to it's integration with the Almond kernel.
All plots created by Picta are valid HTML. More information about the library can be found at the Documentation site.
The following are the main folders and files for the project. Files or folders not listed here are simply used for compilation, and can be ignored.
This folder contains all the main code for the library, and consists of of two further directories:
This folder contains all the code that implements Picta. In this folder you will find the case classes that represent each plot component.
All code associated with actually rendering plots on screen can be found in the
/conus/ folder contains code for all the Picta helper functions that help a user visualize forward-models.
The remaining folders implement various functionality useful to the library.
This folder contains the unit tests for the library. Generally each class corresponds to a test suite that tests a specific part of the library.
To see how to set up the unit testing framework, please see Running The Unit Testing Framework below.
node_modulescontains all the dependencies downloaded by the
NPMpackage manager to run the Node.js specific unit testing code.
This folder simply contains a README.md file that contains details on where to find the in depth documentation.
This file tells
SBT how to build and compile the project. The file also contains all the dependencies this project will automatically pull in when
it is being compiled and built.
This contains a copy of the GNU general public license, version 3.
This contains information on how the project is licensed. It goes hand in hand with the
COPYING.md listed file above.
This is a Jupyter notebook that contains many different examples of charts that are created using the Picta library.
This file is used to create the start page for the API documentation, which can be found hosted at Picta API.
Picta was written from scratch, except for the following files:
These files simply contain code from open source libraries used in the creation of Picta.
This library is hosted on Maven for an easy installation on your machine.
You can find the Maven repository: https://mvnrepository.com/artifact/org.carbonateresearch/picta
To use this project, you need to have installed Scala version 2.12.12 or greater. You will also need the appropriate version of the JDK. You can use the openjdk.
If you wish to run the unit tests, you will also need to install Node.js.
If you have NPM installed, you can simply navigate to
This should install all the necessary dependencies to get the unit-testing framework working.
To run the tests, simply open an SBT shell and use the following command:
This will run the unit tests, which should all pass.
You can find more information on how to contribute using the unit-testing framework in the main documentation here.
If you are using SBT, add the following to your build.sbt file:
resolvers += "jitpack" at "https://jitpack.io"
libraryDependencies ++= Seq(
// Last release
"org.carbonateresearch" %% "picta" % "0.1.1"
To use inside an Almond Jupyter Notebook, add the following to the top of the notebook:
interp.repositories() ++= Seq(coursierapi.MavenRepository.of(
import $ivy. `org.carbonateresearch::picta:0.1.1`
The documentation site for the project can be found here:
The documentation site contains extensive examples on how to use the Picta library.
In addition to the documentation site above, there is also an API documentation site, built with Scaladoc here:
The API docs contain detailed information about the source code, such as function signatures and types of the various elements in the library.
You can find an extensive list of plot examples here.
The Picta logo was created by design_league.