From 8a6beee79b388bcea9d4b2bb4d410ef5f3879dbc Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:37:45 +0330 Subject: [PATCH 01/10] update: scatter3d_simple.py title --- galleries/plot_types/3D/scatter3d_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/plot_types/3D/scatter3d_simple.py b/galleries/plot_types/3D/scatter3d_simple.py index 023a46448ccf..11c80d29b566 100644 --- a/galleries/plot_types/3D/scatter3d_simple.py +++ b/galleries/plot_types/3D/scatter3d_simple.py @@ -1,6 +1,6 @@ """ ============== -3D scatterplot +scatter(x, y, z) ============== See `~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`. From c222f4bca5dcf5581c4f9ec5125d4c2d32761be2 Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:39:15 +0330 Subject: [PATCH 02/10] update: surface3d_simple.py title --- galleries/plot_types/3D/surface3d_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/plot_types/3D/surface3d_simple.py b/galleries/plot_types/3D/surface3d_simple.py index b421469b821d..04f74d5edd14 100644 --- a/galleries/plot_types/3D/surface3d_simple.py +++ b/galleries/plot_types/3D/surface3d_simple.py @@ -1,6 +1,6 @@ """ ===================== -3D surface +plot_surface(X, Y, Z) ===================== See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_surface`. From a666950be708628b5520fd1cc648f0d8d5c49c37 Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:40:29 +0330 Subject: [PATCH 03/10] update: trisurf3d_simple.py title --- galleries/plot_types/3D/trisurf3d_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/plot_types/3D/trisurf3d_simple.py b/galleries/plot_types/3D/trisurf3d_simple.py index 6bf3dc0835d5..25de86ee06c0 100644 --- a/galleries/plot_types/3D/trisurf3d_simple.py +++ b/galleries/plot_types/3D/trisurf3d_simple.py @@ -1,6 +1,6 @@ """ ====================== -Triangular 3D surfaces +plot_trisurf(x, y, z) ====================== See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. From 57ca450820dc7406d76184618be85348fd2cce5b Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:42:13 +0330 Subject: [PATCH 04/10] update: voxels_simple.py title --- galleries/plot_types/3D/voxels_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/plot_types/3D/voxels_simple.py b/galleries/plot_types/3D/voxels_simple.py index c3473e108969..0c3b77e8e0a3 100644 --- a/galleries/plot_types/3D/voxels_simple.py +++ b/galleries/plot_types/3D/voxels_simple.py @@ -1,6 +1,6 @@ """ ========================== -3D voxel / volumetric plot +voxels([x, y, z]) ========================== See `~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels`. From 796438af1d8099b319211e0a11e69ee9e3ceb21f Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 00:42:55 +0330 Subject: [PATCH 05/10] update: wire3d_simple.py title --- galleries/plot_types/3D/wire3d_simple.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/galleries/plot_types/3D/wire3d_simple.py b/galleries/plot_types/3D/wire3d_simple.py index 8ce1a460617e..f0cef6dbb9fa 100644 --- a/galleries/plot_types/3D/wire3d_simple.py +++ b/galleries/plot_types/3D/wire3d_simple.py @@ -1,6 +1,6 @@ """ ================= -3D wireframe plot +plot_wireframe(X, Y, Z) ================= See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe`. From bf30f63a8121459a69c59b168b27c0bbe8fe68ea Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 15:39:57 +0330 Subject: [PATCH 06/10] style(title): fixed "=" length --- galleries/plot_types/3D/scatter3d_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/plot_types/3D/scatter3d_simple.py b/galleries/plot_types/3D/scatter3d_simple.py index 11c80d29b566..ef2f8443ca80 100644 --- a/galleries/plot_types/3D/scatter3d_simple.py +++ b/galleries/plot_types/3D/scatter3d_simple.py @@ -1,7 +1,7 @@ """ -============== +================ scatter(x, y, z) -============== +================ See `~mpl_toolkits.mplot3d.axes3d.Axes3D.scatter`. """ From c0debf6b2d13390fda65f79fdacd5dcb4450835a Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 15:41:22 +0330 Subject: [PATCH 07/10] style(title): fixed "=" length --- galleries/plot_types/3D/trisurf3d_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/plot_types/3D/trisurf3d_simple.py b/galleries/plot_types/3D/trisurf3d_simple.py index 25de86ee06c0..b32bd3ebc69a 100644 --- a/galleries/plot_types/3D/trisurf3d_simple.py +++ b/galleries/plot_types/3D/trisurf3d_simple.py @@ -1,7 +1,7 @@ """ -====================== +===================== plot_trisurf(x, y, z) -====================== +===================== See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_trisurf`. """ From baa19e3d14c5f6eb637f17bd96a420ea6ffbad08 Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 15:42:07 +0330 Subject: [PATCH 08/10] style(title): fixed "=" length --- galleries/plot_types/3D/voxels_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/plot_types/3D/voxels_simple.py b/galleries/plot_types/3D/voxels_simple.py index 0c3b77e8e0a3..5e6dcffb87f1 100644 --- a/galleries/plot_types/3D/voxels_simple.py +++ b/galleries/plot_types/3D/voxels_simple.py @@ -1,7 +1,7 @@ """ -========================== +================= voxels([x, y, z]) -========================== +================= See `~mpl_toolkits.mplot3d.axes3d.Axes3D.voxels`. """ From d6fe121bf77d16ec94f74d58de2a4f79f3127fd6 Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Fri, 11 Aug 2023 15:42:40 +0330 Subject: [PATCH 09/10] style(title): fixed "=" length --- galleries/plot_types/3D/wire3d_simple.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/galleries/plot_types/3D/wire3d_simple.py b/galleries/plot_types/3D/wire3d_simple.py index f0cef6dbb9fa..1ab847f3ecf4 100644 --- a/galleries/plot_types/3D/wire3d_simple.py +++ b/galleries/plot_types/3D/wire3d_simple.py @@ -1,7 +1,7 @@ """ -================= +======================= plot_wireframe(X, Y, Z) -================= +======================= See `~mpl_toolkits.mplot3d.axes3d.Axes3D.plot_wireframe`. """ From cdf3dbcc7248c92dff02157dd6eaa3cd3ff8b459 Mon Sep 17 00:00:00 2001 From: Amirreza Aflakparast <84932095+AmirAflak@users.noreply.github.com> Date: Mon, 21 Aug 2023 17:25:57 +0330 Subject: [PATCH 10/10] add: variable "ncols" for fixed number --- galleries/examples/color/named_colors.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/galleries/examples/color/named_colors.py b/galleries/examples/color/named_colors.py index c6cba68ab434..96612c353c90 100644 --- a/galleries/examples/color/named_colors.py +++ b/galleries/examples/color/named_colors.py @@ -31,6 +31,7 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True): cell_height = 22 swatch_width = 48 margin = 12 + ncols = 4 # Sort colors by hue, saturation, value and name. if sort_colors is True: @@ -42,14 +43,14 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True): n = len(names) nrows = math.ceil(n / ncols) - width = cell_width * 4 + 2 * margin + width = cell_width * ncols + 2 * margin height = cell_height * nrows + 2 * margin dpi = 72 fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi) fig.subplots_adjust(margin/width, margin/height, (width-margin)/width, (height-margin)/height) - ax.set_xlim(0, cell_width * 4) + ax.set_xlim(0, cell_width * ncols) ax.set_ylim(cell_height * (nrows-0.5), -cell_height/2.) ax.yaxis.set_visible(False) ax.xaxis.set_visible(False)