From ecc9c589fccd60454ea82a28acf6eda74cfcde98 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 23 Feb 2023 16:01:14 +0000 Subject: [PATCH 1/2] Add plot_types directory to isort --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 70db59c0e9fc..cf2034cd58d9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,4 +47,4 @@ repos: hooks: - id: isort name: isort (python) - files: ^tutorials/|^examples/ + files: ^tutorials/|^examples/|^plot_types/ From 28c8c6081d3d2cbf2f5ad5708ebb8470b8f7e702 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Thu, 23 Feb 2023 16:01:39 +0000 Subject: [PATCH 2/2] Apply isort to plot_types directory --- plot_types/3D/surface3d_simple.py | 3 ++- plot_types/3D/trisurf3d_simple.py | 3 ++- plot_types/3D/wire3d_simple.py | 3 ++- plot_types/basic/bar.py | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/plot_types/3D/surface3d_simple.py b/plot_types/3D/surface3d_simple.py index b1aff7d23b12..b421469b821d 100644 --- a/plot_types/3D/surface3d_simple.py +++ b/plot_types/3D/surface3d_simple.py @@ -6,9 +6,10 @@ See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`. """ import matplotlib.pyplot as plt -from matplotlib import cm import numpy as np +from matplotlib import cm + plt.style.use('_mpl-gallery') # Make data diff --git a/plot_types/3D/trisurf3d_simple.py b/plot_types/3D/trisurf3d_simple.py index 92832c1b5b3a..6bf3dc0835d5 100644 --- a/plot_types/3D/trisurf3d_simple.py +++ b/plot_types/3D/trisurf3d_simple.py @@ -6,9 +6,10 @@ See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. """ import matplotlib.pyplot as plt -from matplotlib import cm import numpy as np +from matplotlib import cm + plt.style.use('_mpl-gallery') n_radii = 8 diff --git a/plot_types/3D/wire3d_simple.py b/plot_types/3D/wire3d_simple.py index c0eaf40210e8..8ce1a460617e 100644 --- a/plot_types/3D/wire3d_simple.py +++ b/plot_types/3D/wire3d_simple.py @@ -5,9 +5,10 @@ See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe`. """ -from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt +from mpl_toolkits.mplot3d import axes3d + plt.style.use('_mpl-gallery') # Make data diff --git a/plot_types/basic/bar.py b/plot_types/basic/bar.py index e23d27baa06c..cc310f7a464b 100644 --- a/plot_types/basic/bar.py +++ b/plot_types/basic/bar.py @@ -7,6 +7,7 @@ """ import matplotlib.pyplot as plt import numpy as np + plt.style.use('_mpl-gallery') # make data: