diff --git a/examples/axisartist/demo_floating_axes.py b/examples/axisartist/demo_floating_axes.py index db133fcd89f6..fb1dcb7321fa 100644 --- a/examples/axisartist/demo_floating_axes.py +++ b/examples/axisartist/demo_floating_axes.py @@ -149,12 +149,12 @@ def setup_axes3(fig, rect): ax2, aux_ax2 = setup_axes2(fig, 132) theta = np.random.rand(10)*.5*np.pi radius = np.random.rand(10) + 1. -aux_ax2.scatter(theta, radius) +aux_ax2.plot(theta, radius, ".") ax3, aux_ax3 = setup_axes3(fig, 133) theta = (8 + np.random.rand(10)*(14 - 8))*15. # in degrees radius = np.random.rand(10)*14000. -aux_ax3.scatter(theta, radius) +aux_ax3.plot(theta, radius, ".") plt.show() diff --git a/examples/images_contours_and_fields/quiver_demo.py b/examples/images_contours_and_fields/quiver_demo.py index f06f4e17198a..1a7654522f54 100644 --- a/examples/images_contours_and_fields/quiver_demo.py +++ b/examples/images_contours_and_fields/quiver_demo.py @@ -35,7 +35,7 @@ pivot='mid', units='inches') qk = ax2.quiverkey(Q, 0.9, 0.9, 1, r'$1 \frac{m}{s}$', labelpos='E', coordinates='figure') -ax2.scatter(X[::3, ::3], Y[::3, ::3], color='r', s=5) +ax2.plot(X[::3, ::3], Y[::3, ::3], '.', ms=3, c='r') ############################################################################### @@ -48,7 +48,7 @@ scale=1 / 0.15) qk = ax3.quiverkey(Q, 0.9, 0.9, 1, r'$1 \frac{m}{s}$', labelpos='E', coordinates='figure') -ax3.scatter(X, Y, color='0.5', s=1) +ax3.plot(X, Y, '.', color='0.5', ms=3) plt.show() diff --git a/examples/lines_bars_and_markers/scatter_star_poly.py b/examples/lines_bars_and_markers/scatter_star_poly.py index 6dafbf27c832..f051a684d37e 100644 --- a/examples/lines_bars_and_markers/scatter_star_poly.py +++ b/examples/lines_bars_and_markers/scatter_star_poly.py @@ -3,10 +3,9 @@ Scatter Star Poly ================= -Create multiple scatter plots with different -star symbols. - +Create multiple scatter plots with different star symbols. """ + import numpy as np import matplotlib.pyplot as plt diff --git a/examples/statistics/confidence_ellipse.py b/examples/statistics/confidence_ellipse.py index ca5809de7aea..0774251dcb2d 100644 --- a/examples/statistics/confidence_ellipse.py +++ b/examples/statistics/confidence_ellipse.py @@ -142,14 +142,14 @@ def get_correlated_dataset(n, dependency, mu, scale): fig, axs = plt.subplots(1, 3, figsize=(9, 3)) for ax, (title, dependency) in zip(axs, PARAMETERS.items()): x, y = get_correlated_dataset(800, dependency, mu, scale) - ax.scatter(x, y, s=0.5) + ax.plot(x, y, ".", ms=1) ax.axvline(c='grey', lw=1) ax.axhline(c='grey', lw=1) confidence_ellipse(x, y, ax, edgecolor='red') - ax.scatter(mu[0], mu[1], c='red', s=3) + ax.plot(mu[0], mu[1], ".", ms=1, c="r") ax.set_title(title) plt.show() @@ -175,7 +175,7 @@ def get_correlated_dataset(n, dependency, mu, scale): ax_nstd.axhline(c='grey', lw=1) x, y = get_correlated_dataset(500, dependency_nstd, mu, scale) -ax_nstd.scatter(x, y, s=0.5) +ax_nstd.plot(x, y, ".", ms=1) confidence_ellipse(x, y, ax_nstd, n_std=1, label=r'$1\sigma$', edgecolor='firebrick') @@ -184,7 +184,7 @@ def get_correlated_dataset(n, dependency, mu, scale): confidence_ellipse(x, y, ax_nstd, n_std=3, label=r'$3\sigma$', edgecolor='blue', linestyle=':') -ax_nstd.scatter(mu[0], mu[1], c='red', s=3) +ax_nstd.plot(mu[0], mu[1], ".", ms=1, c="r") ax_nstd.set_title('Different standard deviations') ax_nstd.legend() plt.show() @@ -215,8 +215,8 @@ def get_correlated_dataset(n, dependency, mu, scale): confidence_ellipse(x, y, ax_kwargs, alpha=0.5, facecolor='pink', edgecolor='purple', zorder=0) -ax_kwargs.scatter(x, y, s=0.5) -ax_kwargs.scatter(mu[0], mu[1], c='red', s=3) +ax_kwargs.plot(x, y, ".", ms=1) +ax_kwargs.plot(mu[0], mu[1], ".", ms=1, c="r") ax_kwargs.set_title(f'Using kwargs') fig.subplots_adjust(hspace=0.25) diff --git a/examples/statistics/customized_violin.py b/examples/statistics/customized_violin.py index c686b3096776..35fa40240b5b 100644 --- a/examples/statistics/customized_violin.py +++ b/examples/statistics/customized_violin.py @@ -63,7 +63,7 @@ def set_axis_style(ax, labels): whiskersMin, whiskersMax = whiskers[:, 0], whiskers[:, 1] inds = np.arange(1, len(medians) + 1) -ax2.scatter(inds, medians, marker='o', color='white', s=30, zorder=3) +ax2.plot(inds, medians, 'o', color='white', zorder=3) ax2.vlines(inds, quartile1, quartile3, color='k', linestyle='-', lw=5) ax2.vlines(inds, whiskersMin, whiskersMax, color='k', linestyle='-', lw=1) diff --git a/examples/text_labels_and_annotations/text_rotation.py b/examples/text_labels_and_annotations/text_rotation.py index 0e22ee02d638..d5dcee85be7f 100644 --- a/examples/text_labels_and_annotations/text_rotation.py +++ b/examples/text_labels_and_annotations/text_rotation.py @@ -29,7 +29,7 @@ def addtext(ax, props): ax.text(3.5, 0.5, 'text 225', props, rotation=225) ax.text(4.5, 0.5, 'text -45', props, rotation=-45) for x in range(0, 5): - ax.scatter(x + 0.5, 0.5, color='r', alpha=0.5) + ax.plot(x + 0.5, 0.5, 'ro', alpha=0.5) ax.set_yticks([0, .5, 1]) ax.set_xlim(0, 5) ax.grid(True) diff --git a/examples/userdemo/annotate_text_arrow.py b/examples/userdemo/annotate_text_arrow.py index 193fe52efbba..b246c100209b 100644 --- a/examples/userdemo/annotate_text_arrow.py +++ b/examples/userdemo/annotate_text_arrow.py @@ -16,8 +16,8 @@ x2 = 1. + np.random.randn(100) y2 = 1. + np.random.randn(100) -ax.scatter(x1, y1, color="r") -ax.scatter(x2, y2, color="g") +ax.plot(x1, y1, ".", c="r") +ax.plot(x2, y2, ".", c="g") bbox_props = dict(boxstyle="round", fc="w", ec="0.5", alpha=0.9) ax.text(-2, -2, "Sample A", ha="center", va="center", size=20,