GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — incomplete data in mpl_toolkits.mplot3d.art3d.Path3DCollection · Issue #7243 · matplotlib/matplotlib

incomplete data in mpl_toolkits.mplot3d.art3d.Path3DCollection #7243

New issue
Copy link
New issue
Copy link
Open
Open
incomplete data in mpl_toolkits.mplot3d.art3d.Path3DCollection#7243
Copy link
Labels
API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Consistency of the matplotlib API, including naming, behavior, defaults, …keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: mplot3d
Milestone
future releases

Description

@nschloe
nschloe
opened on Oct 9, 2016
Issue body actions

After creating a mpl_toolkits.mplot3d.art3d.Path3DCollection, e.g.,

from matplotlib import pyplot as plt
from mpl_toolkits.mplot3d.art3d import Path3DCollection
import numpy as np

pos = np.random.rand(3, 6)
print(pos.T)
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
ax.scatter(pos[0], pos[1], pos[2], c=np.arange(pos.shape[1]))

I'd like to retrieve pos from the figure. As in 2D, I expected get_offsets to retrieve the data, but

for c in ax.get_children():
    if isinstance(c, Path3DCollection):
        print(c.get_offsets())

only returns the first two colums of pos.

Reacted by Leander Claes

Activity

  1. WeatherGod commented on Oct 10, 2016

    @WeatherGod
    WeatherGod
    on Oct 10, 2016
    Member
    More actions

    The problem is that these methods are used by the backends, which all
    expect 2D data, so it can't return 3D data. Perhaps a get_3doffsets()
    method should be created?

    On Sun, Oct 9, 2016 at 6:37 PM, Nico Schlömer [email protected]
    wrote:

    After creating a mpl_toolkits.mplot3d.art3d.Path3DCollection, e.g.,

    from matplotlib import pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dfrom mpl_toolkits.mplot3d.art3d import Path3DCollectionimport numpy as np

    pos = np.random.rand(3, 6)print(pos)
    fig = plt.figure()
    ax = plt.gca(projection='3d')
    ax.scatter(pos[0], pos[1], pos[2], c=np.arange(pos.shape[1]))

    I'd like to retrieve pos from the figure. As in 2D, I expected get_offsets
    to retrieve the data, but

    for c in ax.get_children():
    if isinstance(c, Path3DCollection):
    print
    print(c.get_offsets())

    only returns the first two colums of pos.

    —
    You are receiving this because you are subscribed to this thread.
    Reply to this email directly, view it on GitHub
    #7243, or mute the thread
    https://github.com/notifications/unsubscribe-auth/AARy-J9Dq7H6wxJKS-5HVTxjmAm-VFfWks5qyWyVgaJpZM4KSIqR
    .

  2. nschloe commented on Oct 10, 2016

    @nschloe
    nschloe
    on Oct 10, 2016
    ContributorAuthor
    More actions

    If there is no other method for extracting the data, I'd vote for it.

  3. tacaswell
    added
    topic: mplot3d
    on Oct 10, 2016
  4. tacaswell
    added this to the This milestone has been deleted milestone on Oct 10, 2016
  5. nschloe commented on May 26, 2017

    @nschloe
    nschloe
    on May 26, 2017
    ContributorAuthor
    More actions

    Any chance of this happening?

  6. WeatherGod commented on May 26, 2017

    @WeatherGod
    WeatherGod
    on May 26, 2017 via email
    Member
    More actions
    Anything is possible. It is just a question of someone putting their mind to implementing it. What if we came up with a name for a method that would act as the "get_data()" for any artist? So, for 2D path collections, it would be get_offsets(), for images, it would be the image data, for 3d paths, it would be the untransformed 3d offsets? (note, get_data() is already taken). This is a MEP-worthy task, and once a MEP is made, it makes it much more likely it'll get implemented.
    …
    On Fri, May 26, 2017 at 9:15 AM, Nico Schlömer ***@***.***> wrote: Any chance of this happening? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#7243 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AARy-OiU8-pJfDTMND3lqeMEXIlFUXg9ks5r9tB9gaJpZM4KSIqR> .
  7. nschloe commented on Jun 2, 2017

    @nschloe
    nschloe
    on Jun 2, 2017
    ContributorAuthor
    More actions

    What does MEP mean?

    I like the idea of a unifying get_data method. Perhaps get_raw_data would be appropriate.

  8. WeatherGod commented on Jun 5, 2017

    @WeatherGod
    WeatherGod
    on Jun 5, 2017 via email
    Member
    More actions
    MEP == "Matplotlib Enhancement Proposal" http://matplotlib.org/devel/MEP/index.html
    …
    On Fri, Jun 2, 2017 at 6:15 PM, Nico Schlömer ***@***.***> wrote: What does MEP mean? I like the idea of a unifying get_data method. Perhaps get_raw_data would be appropriate. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#7243 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AARy-CpuCsRmnh8AdT-oUXKlixJSsjRWks5sAIl6gaJpZM4KSIqR> .
  9. tacaswell
    modified the milestones: This milestone has been deleted, This milestone has been deleted on Sep 24, 2017
  10. tacaswell
    added
    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Consistency of the matplotlib API, including naming, behavior, defaults, …
    on Sep 24, 2017
  11. cherry-ball commented on Nov 7, 2017

    @cherry-ball
    cherry-ball
    on Nov 7, 2017
    More actions

    I have the same problem and I want to know how to achieve it eventually? Would you please tell me? Thank you very much

  12. theRealSuperMario commented on Feb 1, 2020

    @theRealSuperMario
    theRealSuperMario
    on Feb 1, 2020
    More actions

    I had the same issue and simply used the property _offsets3d as a workaround, see here

  13. github-actions commented on Mar 31, 2023

    @github-actions
    github-actionsBot
    on Mar 31, 2023
    More actions

    This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

  14. github-actions
    added
    status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
    on Mar 31, 2023
  15. nschloe commented on Mar 31, 2023

    @nschloe
    nschloe
    on Mar 31, 2023
    ContributorAuthor
    More actions

    Still present, feature still requested.

    Reacted by Paulo, Alberto Fabbri, Marijn, brechtevens, Samuel, Roberto Hueso, Thomas Storek and Leander Claes
  16. oscargus
    added
    keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Action
    and removed
    status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
    on Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    API: consistencyConsistency of the matplotlib API, including naming, behavior, defaults, …Consistency of the matplotlib API, including naming, behavior, defaults, …keepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: mplot3d

    Type

    No type

    Projects

    No projects

      Milestone

      • future releasesNo due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.