Inspired by

http://stackoverflow.com/questions/20044359/punchcard-plot-in-r

and

http://stackoverflow.com/questions/42820823/r-plotly-preserving-appearance-of-two-legends-when-converting-ggplot2-with-ggpl

I wrote a Python function which can create similar plots, e.g.

https://plot.ly/~MaxPeters/358/

https://plot.ly/~MaxPeters/360/

https://plot.ly/~MaxPeters/362/

e.g. the last plot is created by

`y_len = 28 data = dict(x=[i for i in range(1, y_len + 1)], y=['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'], value = [random.randrange(-5,10) for i in range(7 * y_len)] ) d, l = punch_card(data['x'], data['y'], data['value'], max_size=20, marker_symbol='square', equal_size_markers=True) plotly.offline.iplot(d, l)`

Two questions:

a) is there any interest in adding it to Plotlyโs FigureFactory?

b) if yes, how do you write tests for such a function?