Skip to content

Commit 5c5f68c

Browse files
tdhoppersalbaroudiroycoding
committed
Add altair example
Co-authored-by: salbaroudi <sean.al.baroudi@gmail.com> Co-authored-by: Roy Keyes <roy.coding@gmail.com>
1 parent 3381b4c commit 5c5f68c

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

Examples.ipynb

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,27 @@
435435
"Image(fig.to_image(format=\"png\", width=900, height=900))"
436436
]
437437
},
438+
{
439+
"cell_type": "code",
440+
"execution_count": null,
441+
"metadata": {
442+
"tags": [
443+
"ex",
444+
"name:simple-histogram",
445+
"package:altair"
446+
]
447+
},
448+
"outputs": [],
449+
"source": [
450+
"data = altair.X(\"cty\", bin=altair.Bin(step=2))\n",
451+
"chart = (altair \\\n",
452+
" .Chart(mpg) \\\n",
453+
" .mark_bar() \\\n",
454+
" .encode(data, y=\"count()\")\n",
455+
")\n",
456+
"Image(render_altair(chart))"
457+
]
458+
},
438459
{
439460
"cell_type": "markdown",
440461
"metadata": {},

0 commit comments

Comments
 (0)