Debian Codegraph @

bqplot/ui-tests/tests/notebooks/lines.ipynb

raw
1 {
2 "cells": [
3 {
4 "cell_type": "code",
5 "execution_count": null,
6 "id": "da5f4803",
7 "metadata": {},
8 "outputs": [],
9 "source": [
10 "from bqplot import *\n",
11 "\n",
12 "import numpy as np\n",
13 "import pandas as pd\n",
14 "\n",
15 "np.random.seed(0)\n",
16 "\n",
17 "x = list(range(10))\n",
18 "y = [10**i for i in range(10)]\n",
19 "\n",
20 "sc_x = LinearScale()\n",
21 "sc_y = LogScale()\n",
22 "\n",
23 "lines = Lines(x=x, y=y,\n",
24 " scales={'x': sc_x, 'y': sc_y})\n",
25 "ax_x = Axis(scale=sc_x, label='Index')\n",
26 "ax_y = Axis(scale=sc_y, orientation='vertical', label='lines')\n",
27 "\n",
28 "Figure(marks=[lines], axes=[ax_x, ax_y], title='Lines')"
29 ]
30 },
31 {
32 "cell_type": "code",
33 "execution_count": null,
34 "id": "3d0a20a0",
35 "metadata": {},
36 "outputs": [],
37 "source": [
38 "x = list(range(10))\n",
39 "y = [10**i for i in range(10)]\n",
40 "\n",
41 "sc_x = LinearScale()\n",
42 "sc_y = LinearScale()\n",
43 "\n",
44 "lines = Lines(x=x, y=y,\n",
45 " scales={'x': sc_x, 'y': sc_y})\n",
46 "ax_x = Axis(scale=sc_x, label='Index')\n",
47 "ax_y = Axis(scale=sc_y, orientation='vertical', label='lines')\n",
48 "\n",
49 "Figure(marks=[lines], axes=[ax_x, ax_y], title='Lines')"
50 ]
51 }
52 ],
53 "metadata": {
54 "kernelspec": {
55 "display_name": "Python 3 (ipykernel)",
56 "language": "python",
57 "name": "python3"
58 },
59 "language_info": {
60 "codemirror_mode": {
61 "name": "ipython",
62 "version": 3
63 },
64 "file_extension": ".py",
65 "mimetype": "text/x-python",
66 "name": "python",
67 "nbconvert_exporter": "python",
68 "pygments_lexer": "ipython3",
69 "version": "3.10.0"
70 }
71 },
72 "nbformat": 4,
73 "nbformat_minor": 5
74 }