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
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,13 @@ Thinking: The Foundations of Data Science.
git clone https://github.com/data-8/textbook
```
2. Change the file you wish and commit it to the repository.
3. Push your change back to the `data-8/textbook` repository (ideally via a pull request).
4. That's it a GitHub Action will build the book and deploy it to [inferentialthinking.com](https://inferentialthinking.com)
3. Push your change back to the `data-8/textbook` repository (ideally via a pull request). If you edit or run a cell with matplotlib output, be sure to read the [following section, Alt text for matplotlib outputs](#alt-text-for-matplotlib-outputs).
4. That's it! A GitHub Action will build the book and deploy it to [inferentialthinking.com](https://inferentialthinking.com)

### Alt text for matplotlib outputs
Alt text has been manually added for matplotlib outputs because there isn't a great built in way to set these. If you edit or run a cell with matplotlib output, the alt text may be overwritten. **When making edits, it is your responsibility to ensure that the previously added alt text remains present.**

To add alt text for a matplotlib output, you will edit the cell JSON. With the edited notebook open in VSCode, select "More Actions" (the three dots) in the cell menu and choose "Edit Cell Tags (JSON)" to open a new tab with the raw notebook file. Once you've identified the JSON corresponding to the cell, find outputs.data.text/plain which will have a default value like "<Figure size 432x432 with 1 Axes>" from matplotlib. The outputs.data.text/plain value is what will become the alt text for the plot in the deployed book, so you should update this value to a quality alt text description of the plot. If the plot already existed in the textbook, you should look at what alt text was there previously by searching [pull requests](https://github.com/data-8/textbook/pulls?q=is%3Apr+) for "Ch N Better Alt Text" (N being the chapter number you're working on) and use that alt text if it is still appropriate.

## How this repository is deployed to `inferentialthinking.com`

Expand Down
Loading
Loading