Skip to content
New issue

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

AttributeError: 'AxesSubplot' object has no attribute 'get_axis_bgcolor' #24

Closed
FlorianWetschoreck opened this issue Sep 25, 2018 · 1 comment

Comments

@FlorianWetschoreck
Copy link

When trying to run the sample code from the documentation

import numpy as np; np.random.seed(sum(map(ord, 'calmap')))
import pandas as pd
import calmap

all_days = pd.date_range('1/15/2014', periods=700, freq='D')
days = np.random.choice(all_days, 500)
events = pd.Series(np.random.randn(len(days)), index=days)

calmap.yearplot(events, year=2015)

I get the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-14-48f9d523cd2f> in <module>()
----> 1 calmap.yearplot(events, year=2014)

~/anaconda3/lib/python3.6/site-packages/calmap/__init__.py in yearplot(data, year, how, vmin, vmax, cmap, fillcolor, linewidth, linecolor, daylabels, dayticks, monthlabels, monthticks, ax, **kwargs)
    144         # background so in that case we default to white which will usually be
    145         # the figure or canvas background color.
--> 146         linecolor = ax.get_axis_bgcolor()
    147         if ColorConverter().to_rgba(linecolor)[-1] == 0:
    148             linecolor = 'white'

AttributeError: 'AxesSubplot' object has no attribute 'get_axis_bgcolor'
@FlorianWetschoreck
Copy link
Author

I just saw that it is the same issue as #19 and there already exists a PR for it #22
However, I propose to keep the issue for better search engine visibility

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant