Skip to content

Conversation

harshanavkis
Copy link

@harshanavkis harshanavkis commented Sep 14, 2019

PR Summary

Closes #15066.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

This commit introduces the stem3D function. It is similar to the stem3
function from Matab.

Resolves Issue matplotlib#15066.

Signed-off-by: harshanavkis <harshanavkis@gmail.com>
This commit provides an example on generating 3d stem plots.

Resolves Issue matplotlib#15066.

Signed-off-by: harshanavkis <harshanavkis@gmail.com>
@QuLogic QuLogic changed the title Stem3d example Feature: stem3D to generate 3D stem plots Sep 14, 2019
Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

As of master, this doesn't work:

$ python examples/mplot3d/stem3d.py                                                                                                                                         [19-09-14 13:03:44]
examples/mplot3d/stem3d.py:35: UserWarning: In Matplotlib 3.3 individual lines on a stem plot will be added as a LineCollection instead of individual lines. This significantly improves the performance of a stem plot. To remove this warning and switch to the new behaviour, set the "use_line_collection" keyword argument to True.
  use_line_collection=False)
Traceback (most recent call last):
  File "examples/mplot3d/stem3d.py", line 35, in <module>
    use_line_collection=False)
  File ".../matplotlib/lib/mpl_toolkits/mplot3d/axes3d.py", line 1456, in stem
    art3d.line_2d_to_3d(line, zs=zs, zdir=zdir)
  File ".../matplotlib/lib/mpl_toolkits/mplot3d/art3d.py", line 211, in line_2d_to_3d
    line.__class__ = Line3D
TypeError: __class__ assignment only supported for heap types or ModuleType subclasses

@QuLogic
Copy link
Member

QuLogic commented Jan 7, 2021

This has been implemented in #18310. Thanks for your contribution; sorry it did not get merged.

@QuLogic QuLogic closed this Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: stem3
5 participants