Skip to content

Commit b5b5014

Browse files
authored
Merge pull request #293 from rossbar/update-mpl-links
2 parents 9079207 + 20a4f79 commit b5b5014

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

content/mooreslaw-tutorial.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ You'll use these NumPy and Matplotlib functions:
6060
* [`np.log`](https://numpy.org/doc/stable/reference/generated/numpy.log.html): this function takes the natural log of all elements in a NumPy array
6161
* [`np.exp`](https://numpy.org/doc/stable/reference/generated/numpy.exp.html): this function takes the exponential of all elements in a NumPy array
6262
* [`lambda`](https://docs.python.org/3/library/ast.html?highlight=lambda#ast.Lambda): this is a minimal function definition for creating a function model
63-
* [`plt.semilogy`](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.semilogy.html): this function will plot x-y data onto a figure with a linear x-axis and $\log_{10}$ y-axis
64-
[`plt.plot`](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.plot.html): this function will plot x-y data on linear axes
63+
* [`plt.semilogy`](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.semilogy.html): this function will plot x-y data onto a figure with a linear x-axis and $\log_{10}$ y-axis
64+
[`plt.plot`](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html): this function will plot x-y data on linear axes
6565
* slicing arrays: view parts of the data loaded into the workspace, slice the arrays e.g. `x[:10]` for the first 10 values in the array, `x`
6666
* boolean array indexing: to view parts of the data that match a given condition use boolean operations to index an array
6767
* [`np.block`](https://numpy.org/doc/stable/reference/generated/numpy.block.html): to combine arrays into 2D arrays
@@ -259,7 +259,7 @@ year. Now compare your model to the actual manufacturing reports. Plot
259259
the linear regression results and all of the transistor counts.
260260

261261
Here, use
262-
[`plt.semilogy`](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.semilogy.html)
262+
[`plt.semilogy`](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.semilogy.html)
263263
to plot the number of transistors on a log-scale and the year on a
264264
linear scale. You have defined a three arrays to get to a final model
265265

@@ -280,11 +280,11 @@ $\text{transistor_count}_{\text{predicted}} = e^Be^{A\cdot \text{year}}$.
280280
+++
281281

282282
In the next plot, use the
283-
[`fivethirtyeight`](https://matplotlib.org/3.1.1/gallery/style_sheets/fivethirtyeight.html)
283+
[`fivethirtyeight`](https://matplotlib.org/gallery/style_sheets/fivethirtyeight.html)
284284
style sheet.
285285
The style sheet replicates
286286
<https://fivethirtyeight.com> elements. Change the matplotlib style with
287-
[`plt.style.use`](https://matplotlib.org/3.3.2/api/style_api.html#matplotlib.style.use).
287+
[`plt.style.use`](https://matplotlib.org/api/style_api.html#matplotlib.style.use).
288288

289289
```{code-cell}
290290
transistor_count_predicted = np.exp(B) * np.exp(A * year)
@@ -329,9 +329,9 @@ $\text{transistor_count} = e^{B}e^{A\cdot \text{year}}$.
329329
A great way to compare these measurements is to compare your prediction
330330
and Moore's prediction to the average transistor count and look at the
331331
range of reported values for that year. Use the
332-
[`plt.plot`](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.pyplot.plot.html)
332+
[`plt.plot`](https://matplotlib.org/api/_as_gen/matplotlib.pyplot.plot.html)
333333
option,
334-
[`alpha=0.2`](https://matplotlib.org/3.1.1/api/_as_gen/matplotlib.artist.Artist.set_alpha.html),
334+
[`alpha=0.2`](https://matplotlib.org/api/_as_gen/matplotlib.artist.Artist.set_alpha.html),
335335
to increase the transparency of the data. The more opaque the points
336336
appear, the more reported values lie on that measurement. The green $+$
337337
is the average reported transistor count for 2017. Plot your predictions

content/tutorial-plotting-fractals.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ mesh = x + (1j * y) # Make mesh of complex plane
110110
Now we will apply our function to each value contained in the mesh. Since we used a universal function in our design, this means that we can pass in the entire mesh all at once. This is extremely convenient for two reasons: It reduces the amount of code needed to be written and greatly increases the efficiency (as universal functions make use of system level C programming in their computations).
111111

112112

113-
Here we plot the absolute value (or modulus) of each element in the mesh after one “iteration” of the function using a [**3D scatterplot**](https://matplotlib.org/2.0.2/mpl_toolkits/mplot3d/tutorial.html#scatter-plots):
113+
Here we plot the absolute value (or modulus) of each element in the mesh after one “iteration” of the function using a [**3D scatterplot**](https://matplotlib.org/stable/users/explain/toolkits/mplot3d.html#scatter-plots):
114114

115115
```{code-cell} ipython3
116116
output = np.abs(f(mesh)) # Take the absolute value of the output (for plotting)

content/tutorial-static_equilibrium.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ This defines `forceA` as being a vector with magnitude of 1 in the $x$ direction
7878

7979
It may be helpful to visualize these forces in order to better understand how they interact with each other.
8080
Matplotlib is a library with visualization tools that can be utilized for this purpose.
81-
Quiver plots will be used to demonstrate [three dimensional vectors](https://matplotlib.org/3.3.4/gallery/mplot3d/quiver3d.html), but the library can also be used for [two dimensional demonstrations](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.quiver.html).
81+
Quiver plots will be used to demonstrate [three dimensional vectors](https://matplotlib.org/gallery/mplot3d/quiver3d.html), but the library can also be used for [two dimensional demonstrations](https://matplotlib.org/stable/api/_as_gen/matplotlib.axes.Axes.quiver.html).
8282

8383
```{code-cell}
8484
fig = plt.figure()

0 commit comments

Comments
 (0)