From 53d38e07790eec7fdaf88b7305ff5891f37e016d Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Fri, 17 Jul 2020 17:05:05 -0400 Subject: [PATCH] Backport PR #17949: examples: fix a few deprecated subplot specifiers. --- examples/axisartist/axis_direction_demo_step01.py | 2 +- examples/axisartist/axis_direction_demo_step02.py | 4 ++-- examples/axisartist/axis_direction_demo_step03.py | 4 ++-- examples/axisartist/axis_direction_demo_step04.py | 4 ++-- examples/axisartist/simple_axis_direction01.py | 2 +- examples/axisartist/simple_axis_direction03.py | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/examples/axisartist/axis_direction_demo_step01.py b/examples/axisartist/axis_direction_demo_step01.py index df5d8e57017c..daf4508baa45 100644 --- a/examples/axisartist/axis_direction_demo_step01.py +++ b/examples/axisartist/axis_direction_demo_step01.py @@ -25,7 +25,7 @@ def setup_axes(fig, rect): fig = plt.figure(figsize=(3, 2.5)) fig.subplots_adjust(top=0.8) -ax1 = setup_axes(fig, "111") +ax1 = setup_axes(fig, 111) ax1.axis["x"].set_axis_direction("left") diff --git a/examples/axisartist/axis_direction_demo_step02.py b/examples/axisartist/axis_direction_demo_step02.py index de6a21df4283..bc8a8e652b03 100644 --- a/examples/axisartist/axis_direction_demo_step02.py +++ b/examples/axisartist/axis_direction_demo_step02.py @@ -28,13 +28,13 @@ def setup_axes(fig, rect): fig = plt.figure(figsize=(6, 2.5)) fig.subplots_adjust(bottom=0.2, top=0.8) -ax1 = setup_axes(fig, "121") +ax1 = setup_axes(fig, 121) ax1.axis["x"].set_ticklabel_direction("+") ax1.annotate("ticklabel direction=$+$", (0.5, 0), xycoords="axes fraction", xytext=(0, -10), textcoords="offset points", va="top", ha="center") -ax2 = setup_axes(fig, "122") +ax2 = setup_axes(fig, 122) ax2.axis["x"].set_ticklabel_direction("-") ax2.annotate("ticklabel direction=$-$", (0.5, 0), xycoords="axes fraction", xytext=(0, -10), textcoords="offset points", diff --git a/examples/axisartist/axis_direction_demo_step03.py b/examples/axisartist/axis_direction_demo_step03.py index 6b6d6a287462..b02962af8ebf 100644 --- a/examples/axisartist/axis_direction_demo_step03.py +++ b/examples/axisartist/axis_direction_demo_step03.py @@ -28,7 +28,7 @@ def setup_axes(fig, rect): fig = plt.figure(figsize=(6, 2.5)) fig.subplots_adjust(bottom=0.2, top=0.8) -ax1 = setup_axes(fig, "121") +ax1 = setup_axes(fig, 121) ax1.axis["x"].label.set_text("Label") ax1.axis["x"].toggle(ticklabels=False) ax1.axis["x"].set_axislabel_direction("+") @@ -36,7 +36,7 @@ def setup_axes(fig, rect): xytext=(0, -10), textcoords="offset points", va="top", ha="center") -ax2 = setup_axes(fig, "122") +ax2 = setup_axes(fig, 122) ax2.axis["x"].label.set_text("Label") ax2.axis["x"].toggle(ticklabels=False) ax2.axis["x"].set_axislabel_direction("-") diff --git a/examples/axisartist/axis_direction_demo_step04.py b/examples/axisartist/axis_direction_demo_step04.py index 25ea10c0cff8..5769f2934e76 100644 --- a/examples/axisartist/axis_direction_demo_step04.py +++ b/examples/axisartist/axis_direction_demo_step04.py @@ -29,7 +29,7 @@ def setup_axes(fig, rect): fig = plt.figure(figsize=(6, 2.5)) fig.subplots_adjust(bottom=0.2, top=0.8) -ax1 = setup_axes(fig, "121") +ax1 = setup_axes(fig, 121) ax1.axis["x1"].label.set_text("rotation=0") ax1.axis["x1"].toggle(ticklabels=False) @@ -41,7 +41,7 @@ def setup_axes(fig, rect): xytext=(0, -10), textcoords="offset points", va="top", ha="center") -ax2 = setup_axes(fig, "122") +ax2 = setup_axes(fig, 122) ax2.axis["x1"].set_axislabel_direction("-") ax2.axis["x2"].set_axislabel_direction("-") diff --git a/examples/axisartist/simple_axis_direction01.py b/examples/axisartist/simple_axis_direction01.py index 79d074b2d860..2240ceece7e0 100644 --- a/examples/axisartist/simple_axis_direction01.py +++ b/examples/axisartist/simple_axis_direction01.py @@ -8,7 +8,7 @@ import mpl_toolkits.axisartist as axisartist fig = plt.figure(figsize=(4, 2.5)) -ax1 = fig.add_subplot(axisartist.Subplot(fig, "111")) +ax1 = fig.add_subplot(axisartist.Subplot(fig, 111)) fig.subplots_adjust(right=0.8) ax1.axis["left"].major_ticklabels.set_axis_direction("top") diff --git a/examples/axisartist/simple_axis_direction03.py b/examples/axisartist/simple_axis_direction03.py index 5185d144ab1f..e9b758b15817 100644 --- a/examples/axisartist/simple_axis_direction03.py +++ b/examples/axisartist/simple_axis_direction03.py @@ -22,13 +22,13 @@ def setup_axes(fig, rect): fig = plt.figure(figsize=(5, 2)) fig.subplots_adjust(wspace=0.4, bottom=0.3) -ax1 = setup_axes(fig, "121") +ax1 = setup_axes(fig, 121) ax1.set_xlabel("X-label") ax1.set_ylabel("Y-label") ax1.axis[:].invert_ticklabel_direction() -ax2 = setup_axes(fig, "122") +ax2 = setup_axes(fig, 122) ax2.set_xlabel("X-label") ax2.set_ylabel("Y-label") pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy