Skip to content
Draft
Changes from 1 commit
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
Next Next commit
WIP: Try to embed generated image at top of tutorial.
  • Loading branch information
rossbar committed Dec 9, 2025
commit 33bc4e9f8a10506aa1c612e9eb5bd94e84643ee9
8 changes: 4 additions & 4 deletions content/mooreslaw-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@ kernelspec:
---

# Determining Moore's Law with real data in NumPy
![Scatter plot of MOS transistor count per microprocessor every two years as a demonstration of Moore's Law.](_static/01-mooreslaw-tutorial-intro.png)

_The number of transistors reported per a given chip plotted on a log scale in the y axis with the date of introduction on the linear scale x-axis. The blue data points are from a [transistor count table](https://en.wikipedia.org/wiki/Transistor_count#Microprocessors). The red line is an ordinary least squares prediction and the orange line is Moore's law._
![](#mooreslaw-mainfig)

## What you'll do

Expand Down Expand Up @@ -287,6 +286,9 @@ The style sheet replicates
[`plt.style.use`](https://matplotlib.org/api/style_api.html#matplotlib.style.use).

```{code-cell}
:label: mooreslaw-mainfig
:caption: A scatter plot of MOS transistor count per microprocessor every two years with a red line for the ordinary least squares prediction and an orange line for Moore's law.
Copy link
Copy Markdown
Contributor

@rowanc1 rowanc1 Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(on my phone, and can not test)

A next thing that I would try is removing the caption here. It might interfere with the remove input. If that is the case, that should be reported as a bug!


transistor_count_predicted = np.exp(B) * np.exp(A * year)
transistor_Moores_law = Moores_law(year)
plt.style.use("fivethirtyeight")
Expand All @@ -305,8 +307,6 @@ plt.legend(loc="center left", bbox_to_anchor=(1, 0.5))
plt.ylabel("# of transistors\nper microprocessor")
```

_A scatter plot of MOS transistor count per microprocessor every two years with a red line for the ordinary least squares prediction and an orange line for Moore's law._

The linear regression captures the increase in the number of transistors
per semiconductors each year. In 2015, semiconductor manufacturers
claimed they could not keep up with Moore's law anymore. Your analysis
Expand Down