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 — mplotlib 1.0svn: alpha parameter doesn't work in 3d scatter · Issue #158 · matplotlib/matplotlib

mplotlib 1.0svn: alpha parameter doesn't work in 3d scatter #158

New issue
Copy link
New issue
Copy link
Closed
Closed
mplotlib 1.0svn: alpha parameter doesn't work in 3d scatter#158
Copy link
Labels
topic: mplot3d

Description

@ddale
ddale
opened on Jun 20, 2011
Issue body actions

Original report at SourceForge, opened Tue Jun 15 22:10:00 2010

The alpha parameter in mpl_tookits.mplot3d.Axes3D doesn't have effect. It's always displayed as alpha=1.

SourceForge Comments

On Fri Jul 23 05:41:32 2010, antiw wrote:

Sorry for replying late.
I mean, there's no 3D effect in 3D scatter. (The value of alpha doesn't affect the displaying in 3D scatter.)

Here's my code:

def visualize_fdist(self):
    xx, yy, zz = (self.fdist > 0).nonzero()
    if len(xx) == 0:
        print "nothing to display"
        return

    vals = sp.array(self.fdist[xx, yy, zz], sp.int16)

    fig = plt.figure()

    ax = Axes3D(fig)
    ax.scatter3D(yy, zz, zs=xx, marker='s', c=vals, alpha=0.50, s=sp.power(2, vals + 2), cmap=plt.cm.jet)
    ax.set_xlabel('width')
    ax.set_ylabel('time')
    ax.set_zlabel('height')
    ax.set_xlim3d((0, self.vwidth))
    ax.set_ylim3d((0, self.vdepth))
    ax.set_zlim3d((0, self.vheight))
    ax.invert_yaxis()
    ax.grid(True)

    plt.show()

Thank you

On Sat Jun 19 20:49:56 2010, efiring wrote:

Collections have a set_alpha method that accepts None.

Antiw: I don't understand what the problem is. Please provide a tiny script to illustrate it. What is it that you want to do but can't?

Note that alpha for each scatter point is being manipulated to indicate the 3rd dimension. It would be easy enough to have the collection alpha value applied as a multiplier. I suspect this would not have any ill effects, although it would be inconsistent with the way alpha is handled in 2-D.

On Wed Jun 16 23:07:11 2010, antiw wrote:

matplotlib 1.0svn
In: /usr/local/lib/python2.6/dist-packages/mpl_toolkits/mplot3d/art3d.py
Line 303, 304:
303 #FIXME: mpl allows us no way to unset the collection alpha value
304 self._alpha = None

On Wed Jun 16 22:49:20 2010, antiw wrote:

Correct: The scatter is always displayed as alpha is None (in version 1.0, they set the default value of alpha None)

SourceForge History

  • On Sat Jun 19 20:49:56 2010, by efiring: assigned_to: 100

Activity

  1. WeatherGod commented on Jun 21, 2011

    @WeatherGod
    WeatherGod
    on Jun 21, 2011
    Member
    More actions

    This was (inadvertantly) fixed in the past year. While the alphas are still impacted by the depth in the field of vision, the input alpha values are still used as the basis.

  2. WeatherGod
    closed this as completedon Jun 21, 2011
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

    topic: mplot3d

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      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.