We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm making 50×20 grids, so each block is 0.1%. I've found that with some data, the top right corner ends up empty. Here's a real-world example:
#!/usr/bin/python3 import matplotlib as m m.use("Agg") import matplotlib.pyplot as plt import matplotlib.dates as dates from pywaffle import Waffle m.style.use('seaborn-whitegrid') m.rcParams['font.size'] = 12 fig = plt.figure( FigureClass=Waffle, rows=20, columns=50, values={'32': 192,'33': 76,'34':59}, figsize=[16, 9], ) fig.savefig('test.png',dpi=300) plt.close()
This results in:
... with an empty square in the top right -- a total of 999 squares instead of 1000.
I assume this is because all values are getting rounded down.
The text was updated successfully, but these errors were encountered:
You are right, the numbers are rounded.
Two options here:
Sorry, something went wrong.
Ah, perfect. rounding_rule='ceil' is perfect for my purposes. Thanks!
rounding_rule='ceil'
Result, for completeness:
No branches or pull requests
I'm making 50×20 grids, so each block is 0.1%. I've found that with some data, the top right corner ends up empty. Here's a real-world example:
This results in:
... with an empty square in the top right -- a total of 999 squares instead of 1000.
I assume this is because all values are getting rounded down.
The text was updated successfully, but these errors were encountered: