Skip to content

DOC: Add more 3D plot types - #28243

Merged
timhoffm merged 1 commit into
matplotlib:mainfrom
scottshambaugh:3d_plot_types
May 17, 2024
Merged

timhoffm merged 1 commit into
matplotlib:mainfrom
scottshambaugh:3d_plot_types

Conversation

@scottshambaugh

@scottshambaugh scottshambaugh commented May 17, 2024 •

Copy link
Copy Markdown
Contributor

PR summary

We were missing a good number of 3D plot types on this page: https://matplotlib.org/stable/plot_types/
I added examples for plot, quiver, bar3d, and stem.

image

PR checklist

@scottshambaugh scottshambaugh added the Documentation: plot types files in galleries/plot_types label May 17, 2024
@scottshambaugh
scottshambaugh marked this pull request as ready for review May 17, 2024 06:08
@@ -0,0 +1,27 @@
"""
================
plot(xs, ys, zs)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
plot(xs, ys, zs)
plot(x, y, z)

For consistency. Best also change the variable names below.

oh, I see, the existing scatter() was using this convention, but that's really the odd ball and should be changed as well.

@scottshambaugh scottshambaugh May 17, 2024 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Axes3D.plot function has xs, ys, and zs as the argument names, I figure it's best to be consistent with that?
https://matplotlib.org/stable/api/_as_gen/mpl_toolkits.mplot3d.axes3d.Axes3D.plot.html#mpl_toolkits.mplot3d.axes3d.Axes3D.plot

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add it to the list of annoying API inconsistencies

@timhoffm timhoffm added this to the v3.9.1 milestone May 17, 2024
@timhoffm
timhoffm merged commit 4775209 into matplotlib:main May 17, 2024
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request May 17, 2024
timhoffm added a commit that referenced this pull request May 17, 2024
…243-on-v3.9.x

Backport PR #28243 on branch v3.9.x (DOC: Add more 3D plot types)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation: plot types files in galleries/plot_types

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants