{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "fun double(x: Int): Int {\n", " return 2*x\n", "}\n", "val x = 23" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "\"hello, \" + double(3) + x" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "val numbers: MutableList = mutableListOf(1, 4, 3)\n", "val line = Line()\n", "line.setY(numbers)\n", "val plot = Plot()\n", "plot.setTitle(\"Kotlin Plotting\")\n", "plot.add(line)\n", "plot" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "%%python\n", "from beakerx import *\n", "pp = Plot(title=\"Title\", xLabel=\"Horizontal\", yLabel=\"Vertical\")\n", "pp.add(Line(displayName=\"Line\", x=[1, 4, 6, 8, 10],y=[3, 6, 4, 5, 9]))" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "press 'Shift' + 'Tab' for doc" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Kotlin", "language": "kotlin", "name": "kotlin" }, "language_info": { "codemirror_mode": "kt", "file_extension": ".kt", "mimetype": "", "name": "Kotlin", "nbconverter_exporter": "", "version": "1.2.21" } }, "nbformat": 4, "nbformat_minor": 2 }