Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Matplotlib "eats" points when zeros present on logscaled scatter plot #2872

Copy link
Copy link
Closed
@andrewcollette

Description

@andrewcollette
Issue body actions

The following script demonstrates the issue with Matplotlib 1.3.1:

import pylab as plt

X = 5  # set X = 0 and matplotlib drops all later points

data1 = [1,2,3,4,5,6,7,8]
data2 = [1,2,3,4,X,6,7,8]

f = plt.figure(0)
plt.scatter(data1, data2)
plt.xscale('log')
plt.yscale('log')
plt.show()

The problem occurs when using a scatter plot with logscaled axes; if zeros are present in the data, a substantial fraction of the points are discarded. Obviously zeros can't be displayed on a log plot, but I would have expected those points (and only those points) to be silently dropped, or at worst an exception be raised.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.