Comments (11)
This is the expected result, as the default drawing direction is from bottom left going up, then going right.
The starting location could be changed through parameter starting_location, and the direction could be changed through vertical. You can find more examples here https://pywaffle.readthedocs.io/en/latest/examples/block_shape_distance_location_and_direction.html
from pywaffle.
Hi @gyli. Thanks for your package.
Those examples do not address the question of keeping colours contiguous. You can consider this a feature request rather than a bug if you like, but I'm saying currently the output doesn't look good. It would look much better if the yellow blocks were contiguous, and I think your code could be fixed to ensure that --- or to give it as another option.
from pywaffle.
I'm sorry that I din't get your point of keeping colors contiguous. If you take a look of the similar example in the README page, it is drawing from upper left to bottom right, while it does not avoid yellow blocks being separated, since there's just not enough blocks.
So in this case, what do you suggest to make yellow blocks being together? Making a new option to force each color starting from a new column maybe?
https://github.com/gyli/PyWaffle/raw/master/examples/readme/title_and_legend.svg
from pywaffle.
That's not necessary.
But it should draw down the first column, then up the next column, then down the next column, etc.
Then colours would never be broken up.
from pywaffle.
OK, that's also what I mean. I think we can do an option allowing this.
from pywaffle.
Just to confirm, is this what you thought? Every color starts from a new column so blocks with same color could be together. I am working on a new option to allow this.
from pywaffle.
No. That is painted top to bottom on every column.
My suggestion is to alternate directions on each column.
from pywaffle.
The point is never to jump from the top to the bottom, or bottom to top, when you're painting. Lay down squares by snaking back and forth.
Look at my first example at the top of this Issue.
The last two yellow squares should be at the top of their column, right next to the last yellow square painted in the previous column.
from pywaffle.
I see. That is a good point!
from pywaffle.
@cpbl The feature is added in the latest version 0.6.0. Use parameter block_arranging_style='snake' to enable it.
Doc could be found here https://pywaffle.readthedocs.io/en/latest/examples/block_shape_distance_location_and_direction.html#where-to-start-each-category
Thanks again for this great idea!
from pywaffle.
Nice work, and thank you for this addition and for the project.
from pywaffle.
Related Issues (20)
- block present when value is 0 HOT 1
- Vertical orientation? HOT 1
- cant specify columns HOT 3
- characters argument and plt.savefig HOT 7
- Font awesome license HOT 2
- width problems with a thousand blocks HOT 2
- missing corner squares with automatic scaling HOT 3
- How to arrange the filling order as from top to bottom when using new-line? HOT 1
- Request: ability to use system-packaged Fontawesome if found? HOT 3
- Fractional blocks HOT 1
- Add the ability to create chart on axis HOT 1
- Add Font Awesome through Python package
- Problem with Font awesome on VsCode HOT 8
- Feature request
- Feature request
- Font file not found when using FontAwesome icons HOT 2
- ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). HOT 3
- KeyError: 'rows' in waffle.py HOT 2
- Update to FontAwesome v5 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pywaffle.