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

Can't set marker fillstyle · Issue #4073 · matplotlib/matplotlib · GitHub

Repository navigation

Can't set marker fillstyle #4073

Closed
Closed

Description

On windows, I can't seem to set the marker using a MarkerStyle instance (should this be possible?). If I am doing this wrong, how DO I set the fillstyle?

import matplotlib.pyplot as plt
from matplotlib.markers import MarkerStyle
plt.scatter([1,2,3], [1,4,9], marker = MarkerStyle('o', fillstyle = 'top'))
plt.show()

yields

Traceback (most recent call last):
  File "markers.py", line 4, in <module>
    plt.scatter([1,2,3], [1,4,9], marker = MarkerStyle('o', fillstyle = 'top'))
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\matplotlib\pyplot.py", line 3200, in scatter
    linewidths=linewidths, verts=verts, **kwargs)
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\matplotlib\axes\_axes.py", line 3632, in scatter
    marker_obj = mmarkers.MarkerStyle(marker)
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\matplotlib\markers.py", line 169, in __init__
    self.set_marker(marker)
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\matplotlib\markers.py", line 244, in set_marker
    Path(marker)
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\matplotlib\path.py", line 137, in __init__
    vertices = np.asarray(vertices, np.float_)
  File "C:\Users\ihb\AppData\Local\Continuum\Miniconda\lib\site-packages\numpy\core\numeric.py", line 462, in asarray
    return array(a, dtype, copy=False, order=order)
TypeError: float() argument must be a string or a number

Me:

C:\Users\ihb>ipython
Python 2.7.8 |Continuum Analytics, Inc.| (default, Jul  2 2014, 15:12:11) [MSC v.1500 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 2.3.1 -- An enhanced Interactive Python.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import matplotlib

In [2]: matplotlib.__version__
Out[2]: '1.4.2'

Activity

  1. added this to the milestone on Feb 7, 2015
  2. tacaswell commented on Feb 7, 2015

    Member

    I think this has come up before #3895 but not yet fixed. The issue seems to be that scatter does not check that marker input is makerstyle objects and then does a bunch of internal magic to extract the path that is then passed to the underlying PathCollection.

  3. self-assigned this
    on Feb 8, 2015
  4. added a commit that references this issue on Feb 8, 2015
    4cc5c39
  5. added 2 commits that reference this issue on Feb 8, 2015
    a501621
    18cc8bf
  6. ibell commented on Feb 19, 2015

    Author

    Thanks!

    On Wed, Feb 18, 2015 at 8:48 PM, Eric Firing notifications@github.com
    wrote:

    Closed #4073 #4073 via
    18cc8bf
    18cc8bf
    .

    —
    Reply to this email directly or view it on GitHub
    #4073 (comment).

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


    Back | FazBrowse Home | New Git URL