From 27de919502e1e239ca6766d4f8e830933b28a719 Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 00:02:33 +0530 Subject: [PATCH 1/6] Removes OldScalarFormatter --- .../pylab_examples/newscalarformatter_demo.py | 29 ++----------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/examples/pylab_examples/newscalarformatter_demo.py b/examples/pylab_examples/newscalarformatter_demo.py index 381ced7f3b49..90f4fa257019 100644 --- a/examples/pylab_examples/newscalarformatter_demo.py +++ b/examples/pylab_examples/newscalarformatter_demo.py @@ -1,33 +1,10 @@ import matplotlib.pyplot as plt import numpy as np -from matplotlib.ticker import OldScalarFormatter, ScalarFormatter +from matplotlib.ticker import ScalarFormatter # Example 1 x = np.arange(0, 1, .01) fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2, figsize=(6, 6)) -fig.text(0.5, 0.975, 'The old formatter', - horizontalalignment='center', verticalalignment='top') -ax1.plot(x * 1e5 + 1e10, x * 1e-10 + 1e-5) -ax1.xaxis.set_major_formatter(OldScalarFormatter()) -ax1.yaxis.set_major_formatter(OldScalarFormatter()) - -ax2.plot(x * 1e5, x * 1e-4) -ax2.xaxis.set_major_formatter(OldScalarFormatter()) -ax2.yaxis.set_major_formatter(OldScalarFormatter()) - -ax3.plot(-x * 1e5 - 1e10, -x * 1e-5 - 1e-10) -ax3.xaxis.set_major_formatter(OldScalarFormatter()) -ax3.yaxis.set_major_formatter(OldScalarFormatter()) - -ax4.plot(-x * 1e5, -x * 1e-4) -ax4.xaxis.set_major_formatter(OldScalarFormatter()) -ax4.yaxis.set_major_formatter(OldScalarFormatter()) - -fig.subplots_adjust(wspace=0.7, hspace=0.6) - -# Example 2 -x = np.arange(0, 1, .01) -fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2, figsize=(6, 6)) fig.text(0.5, 0.975, 'The new formatter, default settings', horizontalalignment='center', verticalalignment='top') @@ -50,7 +27,7 @@ fig.subplots_adjust(wspace=0.7, hspace=0.6) -# Example 3 +# Example 2 x = np.arange(0, 1, .01) fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2, figsize=(6, 6)) fig.text(0.5, 0.975, 'The new formatter, no numerical offset', @@ -75,7 +52,7 @@ fig.subplots_adjust(wspace=0.7, hspace=0.6) -# Example 4 +# Example 3 x = np.arange(0, 1, .01) fig, [[ax1, ax2], [ax3, ax4]] = plt.subplots(2, 2, figsize=(6, 6)) fig.text(0.5, 0.975, 'The new formatter, with mathtext', From 71a4eb86bced76240ec3a9162261b573d65deb6c Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 00:12:10 +0530 Subject: [PATCH 2/6] Renaming file to scalarformatter_demo.py --- .../{newscalarformatter_demo.py => scalarformatter_demo.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/pylab_examples/{newscalarformatter_demo.py => scalarformatter_demo.py} (100%) diff --git a/examples/pylab_examples/newscalarformatter_demo.py b/examples/pylab_examples/scalarformatter_demo.py similarity index 100% rename from examples/pylab_examples/newscalarformatter_demo.py rename to examples/pylab_examples/scalarformatter_demo.py From a8af90e321d1c1b78b89fa798dd2e034ff9b2aaf Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 00:35:32 +0530 Subject: [PATCH 3/6] Renaming to plot_scalarformatter.py --- .../{scalarformatter_demo.py => plot_scalarformatter.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename examples/pylab_examples/{scalarformatter_demo.py => plot_scalarformatter.py} (100%) diff --git a/examples/pylab_examples/scalarformatter_demo.py b/examples/pylab_examples/plot_scalarformatter.py similarity index 100% rename from examples/pylab_examples/scalarformatter_demo.py rename to examples/pylab_examples/plot_scalarformatter.py From a21821794f9e4546ff2aff7a377daff3f51168ba Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 01:04:57 +0530 Subject: [PATCH 4/6] Adds title and description --- examples/pylab_examples/plot_scalarformatter.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/examples/pylab_examples/plot_scalarformatter.py b/examples/pylab_examples/plot_scalarformatter.py index 90f4fa257019..67f6ef3590fe 100644 --- a/examples/pylab_examples/plot_scalarformatter.py +++ b/examples/pylab_examples/plot_scalarformatter.py @@ -1,3 +1,16 @@ +""" +=========================== +Example For ScalerFromatter +=========================== + +The example shows use of ScalerFormater with different settings. + +Example 1 : Default + +Example 2 : With no Numerical Offset + +Example 3 : With Mathtext +""" import matplotlib.pyplot as plt import numpy as np from matplotlib.ticker import ScalarFormatter From eab3d7f26d414589e6bb153c77c48141b2e6ea25 Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 01:32:36 +0530 Subject: [PATCH 5/6] changing name in backend_driver.py --- examples/tests/backend_driver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tests/backend_driver.py b/examples/tests/backend_driver.py index 5ad48da75038..e084e032f9d8 100755 --- a/examples/tests/backend_driver.py +++ b/examples/tests/backend_driver.py @@ -205,7 +205,7 @@ 'multiline.py', 'multiple_figs_demo.py', 'nan_test.py', - 'newscalarformatter_demo.py', + 'plot_scalarformatter.py', 'pcolor_demo.py', 'pcolor_log.py', 'pcolor_small.py', From 375fd314f07f3260e191aa03d63f9666dbdb0005 Mon Sep 17 00:00:00 2001 From: Ninad Bhat Date: Wed, 15 Mar 2017 09:37:00 +0530 Subject: [PATCH 6/6] Correcting typos and moving file to ticks and spines --- .../plot_scalarformatter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename examples/{pylab_examples => ticks_and_spines}/plot_scalarformatter.py (93%) diff --git a/examples/pylab_examples/plot_scalarformatter.py b/examples/ticks_and_spines/plot_scalarformatter.py similarity index 93% rename from examples/pylab_examples/plot_scalarformatter.py rename to examples/ticks_and_spines/plot_scalarformatter.py index 67f6ef3590fe..ef04408b8dd3 100644 --- a/examples/pylab_examples/plot_scalarformatter.py +++ b/examples/ticks_and_spines/plot_scalarformatter.py @@ -1,9 +1,9 @@ """ -=========================== -Example For ScalerFromatter -=========================== +========================================= +Tick formatting using the ScalarFromatter +========================================= -The example shows use of ScalerFormater with different settings. +The example shows use of ScalarFormatter with different settings. Example 1 : Default 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