Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified 01_materials/slides/06_subplots_and_combining_viz.pdf
Binary file not shown.
Binary file modified 01_materials/slides/09_beyond_matplotlib.pdf
Binary file not shown.
8 changes: 3 additions & 5 deletions 02_activities/assignments/assignment_3.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,9 @@
* The branch name for your repo should be: `assignment-3`
* What to submit for this assignment:
* A folder/directory containing:
* This file (assignment_3.md)
* Two data visualizations
* Two markdown files for each both visualizations with their written descriptions.
* Link to your dataset of choice.
* Complete and commented code as an appendix (for your visualization made with Python, and for the other, if relevant)
* Two distinct data visualizations (for example, PNGs, PDFs, or screenshots)
* Two Markdown files answering all questions for each visualization (including a link to your dataset in both files)
* One Python file contains the complete code and visualization, and another file (with or without code) contains the visualization.
* What the pull request link should look like for this assignment: `https://github.com/<your_github_username>/visualization/pull/<pr_id>`
* Open a private window in your browser. Copy and paste the link to your pull request into the address bar. Make sure you can see your pull request properly. This helps the technical facilitator and learning support staff review your submission easily.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,17 @@ You know enough at this point to do this! It’s not ~necessary~ but it’s a ni
```

- Then get our image from the internet
```
response = requests.get('https://upload.wikimedia.org/wikipedia/en/c/cb/Monkey_D_Luffy.png')
image_file = BytesIO(response.content)
image = Image.open(image_file)
```

---
```
url = "https://upload.wikimedia.org/wikipedia/en/c/cb/Monkey_D_Luffy.png"
headers = {"User-Agent": "Mozilla/5.0","Accept": "image/*,*/*;q=0.8","Referer": "https://en.wikipedia.org/"}

response = requests.get(url, headers=headers)
image_file = BytesIO(response.content)
image = Image.open(image_file)
```

----

# Adding an image to a plot

Expand Down
6 changes: 3 additions & 3 deletions 03_instructional_team/markdown_slides/09_beyond_matplotlib.md
Original file line number Diff line number Diff line change
Expand Up @@ -592,13 +592,13 @@ graph.update_layout(

```
diagram.get_label_by_id("10")
.set_text("n".join(A - B))
.set_text("\n".join(A - B))

diagram.get_label_by_id("11")
.set_text("n".join(A & B))
.set_text("\n".join(A & B))

diagram.get_label_by_id("01")
.set_text("n".join(B - A))
.set_text("\n".join(B - A))
```

*The numbers in our brackets come from the [documentation](https://github.com/konstantint/matplotlib-venn/blob/master/matplotlib_venn/_common.py#L12)
Expand Down