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

Fixing AttributeError in drawLineColored function #152

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

Luftalian
Copy link
Contributor

Hi scikit-tda team,

I hope this message finds you well. I've encountered an issue while using the drawLineColored function in the ripser.py file. Specifically, the error "AttributeError: Line2D.set() got an unexpected keyword argument 'lineWidth'" is raised when trying to run the code from the Representative Cocycles notebook available at https://ripser.scikit-tda.org/en/latest/notebooks/Representative%20Cocycles.html.

After investigating, I found that the issue stems from the use of 'lineWidth' with an uppercase 'W' in the drawLineColored function:

def drawLineColored(X, C):
    for i in range(X.shape[0]-1):
        plt.plot(X[i:i+2, 0], X[i:i+2, 1], c=C[i, :], lineWidth=3)

The correct keyword argument is 'linewidth' with a lowercase 'w'. To address this, I have made the necessary changes to the drawLineColored function, replacing 'lineWidth' with 'linewidth'.

I have created a pull request with these changes. Please review it at your earliest convenience.

Thank you for your time and consideration.

@ctralie
Copy link
Member

ctralie commented Jan 3, 2024 via email

@catanzaromj catanzaromj self-assigned this Jul 9, 2024
@catanzaromj catanzaromj merged commit 119daf4 into scikit-tda:master Jul 20, 2024
0 of 12 checks passed
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

Successfully merging this pull request may close these issues.

3 participants