Reputation: 4473
I'm trying to create a scatterplot with about 10k points:
from random import shuffle
import matplotlib.pyplot as plt
# Dataset of numbers up to 10k
numbers = range(10000)
shuffle(numbers)
xvalues, yvalues = zip(*list(enumerate(numbers)))
plt.scatter(yvalues, xvalues)
plt.xscale("log")
plt.show()
But I get the error:
Assertion failed: (transform_is_valid(m)), function CGMutablePathRef CGPathCreateMutableCopyByTransformingPath(CGPathRef, const CGAffineTransform *), file Paths/CGPath.cc, line 168. Abort trap: 6
If I reduce the number of points to around 7284 it works though!
xvalues, yvalues = zip(*list(enumerate(numbers[:7284])))
Why?
Upvotes: 1
Views: 52