martijnvermaat / calmap

Calendar heatmaps from Pandas time series data -- See https://github.com/MarvinT/calmap/ for the maintained version
https://pythonhosted.org/calmap
MIT License
211 stars 61 forks source link

Adds a month separator feature (#14) #17

Closed ma-schmidt closed 3 years ago

ma-schmidt commented 7 years ago

To draw the lines, I had to modify some part of the code:

  1. Added a "month" column to the dataframe.
  2. If the first days of the year are part of last year's week (would be week 52), offset every week by 1 so they are now week 1, the previous week 1 is now week 2, etc. This is so that we know where to draw the lines.
  3. I have added a small padding to the axes (0.3 of one cell) in order to avoid the outside lines being cut by the axes limit.
  4. The month ticks position has been slightly pushed to the left so that their center now lines up with the center of the average week number.

This PR will break the tests because the output images are going to be different. This is not due to the month separator per se but to the slight esthetic changes (more margin and tick labels more centered). Would need to regenerate the baseline images.

MarvinT commented 5 years ago

I've taken over maintaining this package, please submit a PR to my dev branch: https://github.com/MarvinT/calmap/tree/dev Thanks!

MarvinT commented 3 years ago

Hi, if this problem still exists and you'd like to create a PR to fix it please direct it to https://github.com/MarvinT/calmap/ That is the version that gets published to pypi and has received several updates to fix some existing issues.

martijnvermaat commented 3 years ago

Thank you for your contribution. Unfortunately I don't have the time to maintain this project. As per @MarvinT 's comment, please see https://github.com/MarvinT/calmap/ instead.