Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

matplotlib deprecation: replace grid(b=False) with grid(False) to fix b parameter deprecation in matplotlib grid call #475

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions 05-Multivariate-Gaussians.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@
"plot_covariance_ellipse((2, 7), P, fc='g', alpha=0.2, \n",
" std=[1, 2, 3],\n",
" title='|2 0|\\n|0 6|')\n",
"plt.gca().grid(b=False);"
"plt.gca().grid(False);"
]
},
{
Expand Down Expand Up @@ -842,7 +842,7 @@
"P = [[2, 0], [0, 2]]\n",
"plot_covariance_ellipse(x, P, fc='g', alpha=0.2, \n",
" title='|2 0|\\n|0 2|')\n",
"plt.gca().grid(b=False)"
"plt.gca().grid(False)"
]
},
{
Expand Down Expand Up @@ -885,7 +885,7 @@
"P = [[2, 0], [0, 6]]\n",
"plot_covariance_ellipse(x, P, fc='g', alpha=0.2, \n",
" title='|2 0|\\n|0 6|')\n",
"plt.gca().grid(b=False)"
"plt.gca().grid(False)"
]
},
{
Expand Down
6 changes: 3 additions & 3 deletions kf_book/mkf_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,15 @@ def plot_3d_sampled_covariance(mean, cov):
def plot_3_covariances():
P = [[2, 0], [0, 2]]
plt.subplot(131)
plt.gca().grid(b=False)
plt.gca().grid(False)
plt.gca().set_xticks([0, 1, 2, 3, 4])
plot_covariance_ellipse((2, 7), cov=P, facecolor='g', alpha=0.2,
title='|2 0|\n|0 2|', std=[3], axis_equal=False)
plt.ylim((0, 15))
plt.gca().set_aspect('equal', adjustable='box')

plt.subplot(132)
plt.gca().grid(b=False)
plt.gca().grid(False)
plt.gca().set_xticks([0, 1, 2, 3, 4])
P = [[2, 0], [0, 6]]
plt.ylim((0, 15))
Expand All @@ -390,7 +390,7 @@ def plot_3_covariances():
std=[3], axis_equal=False, title='|2 0|\n|0 6|')

plt.subplot(133)
plt.gca().grid(b=False)
plt.gca().grid(False)
plt.gca().set_xticks([0, 1, 2, 3, 4])
P = [[2, 1.2], [1.2, 2]]
plt.ylim((0, 15))
Expand Down
6 changes: 3 additions & 3 deletions kf_book/nonlinear_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def plot_monte_carlo_mean(xs, ys, f, mean_fx, label, plot_colormap=True):
computed_mean_y = np.average(fys)

ax = plt.subplot(121)
ax.grid(b=False)
ax.grid(False)

plot_bivariate_colormap(xs, ys)

Expand All @@ -243,7 +243,7 @@ def plot_monte_carlo_mean(xs, ys, f, mean_fx, label, plot_colormap=True):
ax.set_ylim(-20, 20)

ax = plt.subplot(122)
ax.grid(b=False)
ax.grid(False)

plt.scatter(fxs, fys, marker='.', alpha=0.02, color='k')
plt.scatter(mean_fx[0], mean_fx[1],
Expand All @@ -268,7 +268,7 @@ def plot_cov_ellipse_colormap(cov=[[1,1],[1,1]]):
pos[:, :, 1] = Y
plt.axes(xticks=[], yticks=[], frameon=True)
rv = scipy.stats.multivariate_normal((0,0), cov)
plt.gca().grid(b=False)
plt.gca().grid(False)
plt.gca().imshow(rv.pdf(pos), cmap=plt.cm.Greys, origin='lower')
plt.show()

Expand Down
4 changes: 2 additions & 2 deletions kf_book/pf_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ def f(x,y):
fxs, fys = f(xs, ys)

plt.subplot(121)
plt.gca().grid(b=False)
plt.gca().grid(False)

plt.scatter(xs, ys, marker='.', alpha=.2, color='k')
plt.xlim(-25, 25)
plt.ylim(-25, 25)

plt.subplot(122)
plt.gca().grid(b=False)
plt.gca().grid(False)

plt.scatter(fxs, fys, marker='.', alpha=0.2, color='k')

Expand Down