Skip to content

Commit 8d0acc9

Browse files
committed
Added plot basic comment
1 parent 2ebea44 commit 8d0acc9

5 files changed

Lines changed: 992 additions & 773 deletions

File tree

docs/lessons/11_plotting_basics.html

Lines changed: 739 additions & 771 deletions
Large diffs are not rendered by default.

docs/search.json

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

docs/site_libs/bootstrap/bootstrap-67e3698c9357a87fd1a0e9aab97ce577.min.css

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/site_libs/quarto-html/quarto-syntax-highlighting-37eea08aefeeee20ff55810ff984fec1.css

Lines changed: 236 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lessons/11_plotting_basics.qmd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ sns.scatterplot(data = new_metadata,
173173
style = "celltype")
174174
```
175175

176+
::: callout-note
177+
You may have noticed that the figure legend moved when we added our `style` argument. This is because there is a argument (`loc`) set within `plt.legend()` which allows you to direct the placement of the legend. It can take the value of one of nine possible locations (`'upper left'`, `'upper right'`, `'lower left'`, `'lower right'`, `'upper center'`, `'lower center'`, `'center left'`, `'center right'`, `'center'`) to determine where to place the legend. However, the default is a value of `'best'` which selects one of those nine possible locations, which minimizes the overlap of the legend on top of data. As a result of adding our `style` argument, it made the legend longer, which meant that it would be better placed is a different location in the plot to minimize overlap with the data points.
178+
:::
176179

177180
The data points are quite small. We can also adjust the `s` (size) of the data points within the `scatterplot()` function. Since we do not want the size of the data points to be scaled according to a column in `new_metadata`, we will just specify a number for this argument.
178181

0 commit comments

Comments
 (0)