diff --git a/research/object_detection/utils/visualization_utils.py b/research/object_detection/utils/visualization_utils.py index b5532a1d29b60d02efc9215e3685a273730a58ee..675cdab6b5ebcbfcbe5ad9c48367e02aef381f9f 100644 --- a/research/object_detection/utils/visualization_utils.py +++ b/research/object_detection/utils/visualization_utils.py @@ -1294,7 +1294,7 @@ def add_cdf_image_summary(values, name): fraction_of_examples = (np.arange(cumulative_values.size, dtype=np.float32) / cumulative_values.size) fig = plt.figure(frameon=False) - ax = fig.add_subplot('111') + ax = fig.add_subplot(1, 1, 1) ax.plot(fraction_of_examples, cumulative_values) ax.set_ylabel('cumulative normalized values') ax.set_xlabel('fraction of examples') @@ -1321,7 +1321,7 @@ def add_hist_image_summary(values, bins, name): def hist_plot(values, bins): """Numpy function to plot hist.""" fig = plt.figure(frameon=False) - ax = fig.add_subplot('111') + ax = fig.add_subplot(1, 1, 1) y, x = np.histogram(values, bins=bins) ax.plot(x[:-1], y) ax.set_ylabel('count')