Skip to content

Commit 3b7154b

Browse files
committed
Post-workshop clarifications
1 parent acc3133 commit 3b7154b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.org

+7-1
Original file line numberDiff line numberDiff line change
@@ -2317,9 +2317,15 @@ Let's make a poster!
23172317
sns.set_context('poster')
23182318

23192319
# Color by species
2320-
ax = sns.scatterplot(data=iris, x='sepal_length', y='petal_length', hue='species', palette='colorblind', size='petal_width')
2320+
ax = sns.scatterplot(data=iris, x='sepal_length', y='petal_length', hue='species',
2321+
palette='colorblind', size='petal_width')
2322+
2323+
# Place legend
2324+
ax.legend(bbox_to_anchor=(2,1))
23212325
#+END_SRC
23222326

2327+
- Read more about ~loc~ vs. ~bbox_to_anchor~ in the legend documentation: https://matplotlib.org/stable/api/legend_api.html
2328+
23232329
4. The Seaborn plot uses Matplotlib under the hood
23242330
#+BEGIN_SRC python
23252331
# Set the figure size

notebooks/visualization_scratch.ipynb

+1-2
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,7 @@
300300
"# Decorate the plot\n",
301301
"ax.set_title(\"GDP of Austria vs Bulgaria\", fontsize=22, fontweight='bold')\n",
302302
"ax.set_xlabel(\"GDP of Austria\",fontsize=20, fontweight='bold' )\n",
303-
"ax.set_ylabel(\"GDP of Bulgaria\",fontsize=20, fontweight='bold' )\n",
304-
"#+END_SRC"
303+
"ax.set_ylabel(\"GDP of Bulgaria\",fontsize=20, fontweight='bold' )"
305304
]
306305
},
307306
{

0 commit comments

Comments
 (0)