{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "%matplotlib inline" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "# Scatterplot\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import seaborn as sns\nsns.set_theme(style=\"white\")\n\n# Load the example mpg dataset\nmpg = sns.load_dataset(\"mpg\")\n\n# Plot miles per gallon against horsepower with other semantics\nsns.relplot(x=\"horsepower\", y=\"mpg\", hue=\"origin\", size=\"weight\",\n sizes=(40, 400), alpha=.5, palette=\"muted\",\n height=6, data=mpg)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.10" } }, "nbformat": 4, "nbformat_minor": 0 }