FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

mplotlib 1.0svn: alpha parameter doesn't work in 3d scatter · Issue #158 · matplotlib/matplotlib · GitHub

Repository navigation

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

Closed

Description

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

    Member

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL