{ "cells": [ { "cell_type": "markdown", "id": "ac09fa5f", "metadata": {}, "source": [ "# Ridgeline plot" ] }, { "cell_type": "markdown", "id": "69c79ad3", "metadata": {}, "source": [ "## Preparation" ] }, { "cell_type": "code", "execution_count": 1, "id": "32f79dd9", "metadata": { "execution": { "iopub.execute_input": "2024-08-23T10:56:59.070125Z", "iopub.status.busy": "2024-08-23T10:56:59.068923Z", "iopub.status.idle": "2024-08-23T10:57:01.762788Z", "shell.execute_reply": "2024-08-23T10:57:01.762517Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " \n", " " ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ " " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "%useLatestDescriptors\n", "%use lets-plot\n", "%use dataframe" ] }, { "cell_type": "code", "execution_count": 2, "id": "91f59d82", "metadata": { "execution": { "iopub.execute_input": "2024-08-23T10:57:01.764714Z", "iopub.status.busy": "2024-08-23T10:57:01.764473Z", "iopub.status.idle": "2024-08-23T10:57:01.801981Z", "shell.execute_reply": "2024-08-23T10:57:01.801612Z" } }, "outputs": [ { "data": { "text/plain": [ "Lets-Plot Kotlin API v.4.8.0. Frontend: Notebook with dynamically loaded JS. Lets-Plot JS v.4.4.1." ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "LetsPlot.getInfo()" ] }, { "cell_type": "code", "execution_count": 3, "id": "9a29719b", "metadata": { "execution": { "iopub.execute_input": "2024-08-23T10:57:01.803723Z", "iopub.status.busy": "2024-08-23T10:57:01.803483Z", "iopub.status.idle": "2024-08-23T10:57:02.533537Z", "shell.execute_reply": "2024-08-23T10:57:02.533708Z" } }, "outputs": [ { "data": { "application/kotlindataframe+json": "{\"nrow\":5,\"ncol\":5,\"columns\":[\"sepal_length\",\"sepal_width\",\"petal_length\",\"petal_width\",\"species\"],\"kotlin_dataframe\":[{\"sepal_length\":5.1,\"sepal_width\":3.5,\"petal_length\":1.4,\"petal_width\":0.2,\"species\":\"setosa\"},{\"sepal_length\":4.9,\"sepal_width\":3.0,\"petal_length\":1.4,\"petal_width\":0.2,\"species\":\"setosa\"},{\"sepal_length\":4.7,\"sepal_width\":3.2,\"petal_length\":1.3,\"petal_width\":0.2,\"species\":\"setosa\"},{\"sepal_length\":4.6,\"sepal_width\":3.1,\"petal_length\":1.5,\"petal_width\":0.2,\"species\":\"setosa\"},{\"sepal_length\":5.0,\"sepal_width\":3.6,\"petal_length\":1.4,\"petal_width\":0.2,\"species\":\"setosa\"}]}", "text/html": [ " \n", " \n", " \n", " \n", " \n", "DataFrame: rowsCount = 5, columnsCount = 5
\n", "sepal_length | sepal_width | petal_length | petal_width | species |
---|---|---|---|---|
5.100000 | 3.500000 | 1.400000 | 0.200000 | setosa |
4.900000 | 3.000000 | 1.400000 | 0.200000 | setosa |
4.700000 | 3.200000 | 1.300000 | 0.200000 | setosa |
4.600000 | 3.100000 | 1.500000 | 0.200000 | setosa |
5.000000 | 3.600000 | 1.400000 | 0.200000 | setosa |
DataFrame: rowsCount = 5, columnsCount = 12
\n", "untitled | manufacturer | model | displ | year | cyl | trans | drv | cty | hwy | fl | class |
---|---|---|---|---|---|---|---|---|---|---|---|
1 | audi | a4 | 1.800000 | 1999 | 4 | auto(l5) | f | 18 | 29 | p | compact |
2 | audi | a4 | 1.800000 | 1999 | 4 | manual(m5) | f | 21 | 29 | p | compact |
3 | audi | a4 | 2.000000 | 2008 | 4 | manual(m6) | f | 20 | 31 | p | compact |
4 | audi | a4 | 2.000000 | 2008 | 4 | auto(av) | f | 21 | 30 | p | compact |
5 | audi | a4 | 2.800000 | 1999 | 6 | auto(l5) | f | 16 | 26 | p | compact |