/usr/share/doc/python-sphinx-gallery-doc/html/_downloads/plot_seaborn_notebook.ipynb is in python-sphinx-gallery-doc 0.1.13-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | {
"nbformat_minor": 0,
"nbformat": 4,
"cells": [
{
"execution_count": null,
"cell_type": "code",
"source": [
"%matplotlib inline"
],
"outputs": [],
"metadata": {
"collapsed": false
}
},
{
"source": [
"\nA notebook seaborn test\n=======================\n\nJust to have examples in the gallery of notebooks\n\n"
],
"cell_type": "markdown",
"metadata": {}
},
{
"execution_count": null,
"cell_type": "code",
"source": [
"# Author: Michael Waskom\n# License: BSD 3 clause\n\nfrom __future__ import division, absolute_import, print_function\nimport numpy as np\nfrom scipy.stats import kendalltau\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\nsns.set(style=\"ticks\")\n\nrs = np.random.RandomState(11)\nx = rs.gamma(2, size=1000)\ny = -.5 * x + rs.normal(size=1000)\n\nsns.jointplot(x, y, kind=\"hex\", stat_func=kendalltau, color=\"#4CB391\")"
],
"outputs": [],
"metadata": {
"collapsed": false
}
},
{
"source": [
"A new block in the notebook to have different styles\n\n\n"
],
"cell_type": "markdown",
"metadata": {}
},
{
"execution_count": null,
"cell_type": "code",
"source": [
"sns.set(style=\"whitegrid\", palette=\"pastel\", color_codes=True)\n\n# Load the example tips dataset\ntips = sns.load_dataset(\"tips\", cache=False)\n\n# Draw a nested violinplot and split the violins for easier comparison\nsns.violinplot(x=\"day\", y=\"total_bill\", hue=\"sex\", data=tips, split=True,\n inner=\"quart\", palette={\"Male\": \"b\", \"Female\": \"y\"})\nsns.despine(left=True)"
],
"outputs": [],
"metadata": {
"collapsed": false
}
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 2",
"name": "python2",
"language": "python"
},
"language_info": {
"mimetype": "text/x-python",
"nbconvert_exporter": "python",
"name": "python",
"file_extension": ".py",
"version": "2.7.14",
"pygments_lexer": "ipython2",
"codemirror_mode": {
"version": 2,
"name": "ipython"
}
}
}
}
|