Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 308bc7b

Browse files
committed
Fix plot
1 parent 961de9b commit 308bc7b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

doc/api/index.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ methods on them to plot data, add axis labels and a figure title.
2626
import matplotlib.pyplot as plt
2727
import numpy as np
2828

29-
x = np.arange(0, 4, 0.1)
29+
x = np.arange(0, 4, 0.05)
3030
y = np.sin(x*np.pi)
3131

3232
fig, ax = plt.subplots(figsize=(3,2), constrained_layout=True)
3333
ax.plot(x, y)
3434
ax.set_xlabel('t [s]')
3535
ax.set_ylabel('S [V]')
36-
fig.suptitle('Sine wave')
36+
ax.set_title('Sine wavey')
37+
fig.set_facecolor('lightsteelblue')
3738

3839

3940
Modules

0 commit comments

Comments
 (0)