Skip to content

[BUG] plt.scatter giving ValueError when trying to set marker option #18291

Closed
@mmcky

Description

@mmcky

Bug report

Bug summary

Setting maker in a scatter plot is causing ValueError

Code for reproduction

import matplotlib.pyplot as plt
f = plt.figure()
s = plt.scatter([1, 2, 3], [4, 5, 6], marker="")

removing the marker option plots the scatter graph. I refered to the docs for valid marker options text shorthand and it seems none of them work.

Actual outcome

<matplotlib.collections.PathCollection at 0x7f9d2bd8cee0>
...
ValueError: zero-size array to reduction operation minimum which has no identity

<Figure size 432x288 with 1 Axes>

Expected outcome

Matplotlib version

  • Operating system: OS X
  • Matplotlib version: 3.3.1
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.8
  • Jupyter version (if applicable):
  • Other libraries: 1.19.1

used conda with the following environment.yml file

name: qe-lectures
channels:
  - default
  - conda-forge
dependencies:
  - pip
  - python
  - jupyter
  - jupyterlab
  - nbconvert
  - pandoc
  - pandas
  - numba
  - numpy
  - matplotlib
  - networkx
  - sphinx=2.4.4
  - scikit-learn
  - statsmodels
  - seaborn
  - scipy
  - sympy
  - pip:
    - interpolation
    - sphinxcontrib-jupyter
    - sphinxcontrib-bibtex
    - joblib

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