In [ ]:
%%clojure
(doto (Plot.)
            (.setTitle "Title")
            (.setXLabel "Horizontal")
            (.setYLabel "Vertical")
            (.add (doto (Line.)
                        (.setX [0, 1, 2, 3, 4, 5])
                        (.setY [0, 1, 6, 5, 2, 8]))))

In [ ]:
%%groovy
def p = new Plot(title : 'Title', xLabel: 'Horizontal', yLabel: 'Vertical');
p << new Line(x: [0, 1, 2, 3, 4, 5], y: [0, 1, 6, 5, 2, 8])

In [ ]:
%%java
import java.util.List;
import com.twosigma.beakerx.chart.xychart.Plot;
import java.util.Arrays;

Plot p = new Plot();

p.setTitle("Title");
p.setXLabel("Horizontal");
p.setYLabel("Vertical");

Bars b = new Bars();

List<Object> x = Arrays.asList(0, 1, 2, 3, 4, 5);
List<Number> y = Arrays.asList(0, 1, 6, 5, 2, 8);
Line line = new Line();
line.setX(x);
line.setY(y);
p.add(line);
  
return p;

In [ ]:
%%kotlin
val x: MutableList<Any> = mutableListOf(0, 1, 2, 3, 4, 5)
val y: MutableList<Number> = mutableListOf(0, 1, 6, 5, 2, 8)
val line = Line()
line.setX(x)
line.setY(y)

val plot = Plot()
plot.setTitle("Title")
plot.setXLabel("Horizontal")
plot.setYLabel("Vertical")
plot.add(line)
plot

In [ ]:
%%scala
val plot = new Plot { title = "Title"; xLabel="Horizontal"; yLabel="Vertical" }
val line = new Line {x = Seq(0, 1, 2, 3, 4, 5); y = Seq(0, 1, 6, 5, 2, 8)}
plot.add(line)

In [ ]:
%%sql
%defaultDatasource jdbc:h2:mem:db
DROP TABLE IF EXISTS cities;
CREATE TABLE cities(
    zip_code varchar(5),
    latitude float,
    longitude float,
    city varchar(100),
    state varchar(2),
    county varchar(100),
    PRIMARY KEY (zip_code),
) AS SELECT
    zip_code,
    latitude,
    longitude,
    city,
    state,
    county
FROM CSVREAD('../resources/data/UScity.csv')

In [ ]:
%%sql
SELECT * FROM cities WHERE state = 'NY'

In [ ]:
%defaultDatasource jdbc:h2:mem:db

In [ ]: