Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backport PR #23906 on branch v3.6.x (Edit mplot3d examples for correctness and consistency) #23971

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/mplot3d/2dcollections3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plot 2D data on 3D plot
=======================

Demonstrates using ax.plot's zdir keyword to plot 2D data on
Demonstrates using ax.plot's *zdir* keyword to plot 2D data on
selective axes of a 3D plot.
"""

Expand Down
6 changes: 3 additions & 3 deletions examples/mplot3d/contour3d.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
==================================================
Demonstrates plotting contour (level) curves in 3D
==================================================
=================================
Plot contour (level) curves in 3D
=================================

This is like a contour plot in 2D except that the ``f(x, y)=c`` curve is
plotted on the plane ``z=c``.
Expand Down
8 changes: 4 additions & 4 deletions examples/mplot3d/contour3d_2.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
============================================================================
Demonstrates plotting contour (level) curves in 3D using the extend3d option
============================================================================
===========================================================
Plot contour (level) curves in 3D using the extend3d option
===========================================================

This modification of the contour3d_demo example uses extend3d=True to
This modification of the :doc:`contour3d` example uses ``extend3d=True`` to
extend the curves vertically into 'ribbons'.
"""

Expand Down
8 changes: 4 additions & 4 deletions examples/mplot3d/contourf3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Filled contours
===============

contourf differs from contour in that it creates filled contours, ie.
a discrete number of colours are used to shade the domain.
`.Axes3D.contourf` differs from `.Axes3D.contour` in that it creates filled
contours, i.e. a discrete number of colours are used to shade the domain.

This is like a contourf plot in 2D except that the shaded region corresponding
to the level c is graphed on the plane z=c.
This is like a `.Axes.contourf` plot in 2D except that the shaded region
corresponding to the level c is graphed on the plane ``z=c``.
"""

from mpl_toolkits.mplot3d import axes3d
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/hist3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Create 3D histogram of 2D data
==============================

Demo of a histogram for 2 dimensional data as a bar graph in 3D.
Demo of a histogram for 2D data as a bar graph in 3D.
"""

import matplotlib.pyplot as plt
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/lines3d.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
================
Parametric Curve
Parametric curve
================

This example demonstrates plotting a parametric curve in 3D.
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/lorenz_attractor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
================
Lorenz Attractor
Lorenz attractor
================

This is an example of plotting Edward Lorenz's 1963 `"Deterministic Nonperiodic
Expand Down
6 changes: 3 additions & 3 deletions examples/mplot3d/mixed_subplots.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
=================================
2D and 3D *Axes* in same *Figure*
=================================
=============================
2D and 3D axes in same figure
=============================

This example shows a how to plot a 2D and 3D plot on the same figure.
"""
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/offset.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
=========================
Automatic Text Offsetting
Automatic text offsetting
=========================

This example demonstrates mplot3d's offset text display.
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/rotate_axes3d_sgskip.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Rotating a 3D plot
==================

A very simple animation of a rotating 3D plot about all 3 axes.
A very simple animation of a rotating 3D plot about all three axes.

See :doc:`wire3d_animation_sgskip` for another example of animating a 3D plot.

Expand Down
4 changes: 2 additions & 2 deletions examples/mplot3d/surface3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
=====================

Demonstrates plotting a 3D surface colored with the coolwarm colormap.
The surface is made opaque by using antialiased=False.
The surface is made opaque by using ``antialiased=False``.

Also demonstrates using the LinearLocator and custom formatting for the
Also demonstrates using the `.LinearLocator` and custom formatting for the
z axis tick labels.
"""

Expand Down
8 changes: 4 additions & 4 deletions examples/mplot3d/text3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@

Functionality shown:

- Using the text function with three types of 'zdir' values: None, an axis
name (ex. 'x'), or a direction tuple (ex. (1, 1, 0)).
- Using the text function with the color keyword.
- Using the text2D function to place text on a fixed position on the ax
- Using the `~.Axes3D.text` function with three types of *zdir* values: None,
an axis name (ex. 'x'), or a direction tuple (ex. (1, 1, 0)).
- Using the `~.Axes3D.text` function with the color keyword.
- Using the `.text2D` function to place text on a fixed position on the ax
object.
"""

Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/trisurf3d_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
Two additional examples of plotting surfaces with triangular mesh.

The first demonstrates use of plot_trisurf's triangles argument, and the
second sets a Triangulation object's mask and passes the object directly
second sets a `.Triangulation` object's mask and passes the object directly
to plot_trisurf.
"""

Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/voxels_numpy_logo.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
===============================
3D voxel plot of the numpy logo
3D voxel plot of the NumPy logo
===============================

Demonstrates using `.Axes3D.voxels` with uneven coordinates.
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/voxels_rgb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""
==========================================
3D voxel / volumetric plot with rgb colors
3D voxel / volumetric plot with RGB colors
==========================================

Demonstrates using `.Axes3D.voxels` to visualize parts of a color space.
Expand Down
6 changes: 3 additions & 3 deletions examples/mplot3d/wire3d_animation_sgskip.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
=============================
Animating a 3D wireframe plot
=============================
===========================
Animate a 3D wireframe plot
===========================

A very simple "animation" of a 3D plot. See also :doc:`rotate_axes3d_sgskip`.

Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/wire3d_zero_stride.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
3D wireframe plots in one direction
===================================

Demonstrates that setting rstride or cstride to 0 causes wires to not be
Demonstrates that setting *rstride* or *cstride* to 0 causes wires to not be
generated in the corresponding direction.
"""

Expand Down