Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Scala client for the Lightning data visualization server (WIP)

[![Build Status](https://travis-ci.org/lightning-viz/lightning-scala.svg?branch=master)](https://travis-ci.org/lightning-viz/lightning-scala)

##installation
## installation
Build the project using `sbt` and the [assembly](https://github.com/sbt/sbt-assembly) plugin
```
sbt assembly
Expand All @@ -13,9 +13,9 @@ To then use lightning in the scala REPL, just add the jar to your classpath (her
scala -classpath target/scala-2.10/lightning-scala-assembly-0.1.0.jar
```

##usage
## usage

###creating a new session
### creating a new session
```
import org.viz.lightning._

Expand All @@ -25,28 +25,28 @@ lgn.createSession()
lgn.createSession("provide an optional session name")
```

###creating a visualization
### creating a visualization
Methods are available for the default visualization types included with Lightning
```
lgn.line(Array(Array(1.0,1.0,2.0,3.0,9.0,20.0)))
lgn.scatter(Array(1.0,2.0,3.0), Array(1.0,1.5,5.0))
```

###setting options
### setting options
Visualizations can be customized through optional parameters
```
lgn.line(Array(Array(1.0,1.0,2.0),Array(3.0,9.0,20.0)), label=Array(1,2))
lgn.scatter(Array(1.0,2.0,3.0), Array(1.0,1.5,5.0), label=Array(1,2,3))
```

###using a custom plot
### using a custom plot
For any other plot type, just specify by name, and provide the data as a `Map`
```
lgn.plot("line", Map("series" -> List(1,1,2,3,9,20)))
```
This is especially useful when working with custom plot types

##tests
## tests
Run the unit tests using `sbt` by calling

```
Expand All @@ -61,7 +61,7 @@ sbt "test-only *LightningPlotsSuite*"

The tests require that a local lightning server is running on `http://localhost:3000`

##todo
## todo
The following components need to be added
- Add updating and appending
- Add ability to post images
Expand Down