Skip to content

Commit

Permalink
Update 05-data-visualization.Rmd
Browse files Browse the repository at this point in the history
  • Loading branch information
caalo committed Sep 10, 2024
1 parent 0eb4bfb commit d358378
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 05-data-visualization.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,30 @@ hist(iris$Sepal.Length)
```{r, out.width="200%"}
hist(iris$Sepal.Length)
```

matplotlib

```{python}
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
fruits = ['apple', 'blueberry', 'cherry', 'orange']
counts = [40, 100, 30, 55]
bar_labels = ['red', 'blue', '_red', 'orange']
bar_colors = ['tab:red', 'tab:blue', 'tab:red', 'tab:orange']
ax.bar(fruits, counts, label=bar_labels, color=bar_colors)
ax.set_ylabel('fruit supply')
ax.set_title('Fruit supply by kind and color')
ax.legend(title='Fruit color')
```

now show

```{python}
plt.show()
```

0 comments on commit d358378

Please sign in to comment.