liyangbit / PyDataLab

open source for wechat-official-account (ID: PyDataLab)
http://liyangbit.com/
381 stars 237 forks source link

cmap usage of Top-50-Matplotlib-Visualizations is inaccurate #4

Open yf-yang opened 5 years ago

yf-yang commented 5 years ago

Your modification (c -> cmap) of the original passage does remove the error, but it is not working as expected since cmap should not be used like that. For example, take a look at block [2] and print colors, you will find that last 2 color (for LHR, LHU) are exactly the same because the color map tab10 has only 10 colors. However, when you assign the tuple to the argument cmap, the argument doesn't recognize the float tuple. As a result, it is actually using a predefined color map.

yf-yang commented 5 years ago

Please review #5