Skip to content

'LinePlotAdapter' object has not attribute 'custom' #46

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
PeBoch opened this issue Oct 7, 2022 · 3 comments
Closed

'LinePlotAdapter' object has not attribute 'custom' #46

PeBoch opened this issue Oct 7, 2022 · 3 comments

Comments

@PeBoch
Copy link
Contributor

PeBoch commented Oct 7, 2022

Hi,
I think I noted a bug when running the plotnuclideheat.py with ppa.TimeZone.BOTH (irradiation and decay) resulting in an AttributeError: 'LinePlotAdapter' object has not attribute 'custom'. Checking in plotadapter.py in the LinePlotAdapter class there is indeed no attribute 'custom'.
For now, i just comment out the lines and the script works.
Regards, Peter.

@github-actions
Copy link

github-actions bot commented Oct 7, 2022

Congratulations for submitting your first issue on pypact. Thanks for contributing!

@PeBoch
Copy link
Contributor Author

PeBoch commented Oct 7, 2022

I added to plotadapter.py to class LinePlotAdapter the following attribute

def custom (self, x, **kwargs):
self.engine.axvline(x, **kwargs)

Which draws that vertical line as it seems to have been foreseen by your code initially

Example figure from plotnuclideheat.py with TimeZone.BOTH
example

@thomasms
Copy link
Member

thomasms commented Oct 7, 2022

Thanks for catching this. Indeed it is a bug - custom is not in the interface for the plotter.
For me, I had to add this:
image

Feel free to open a PR to fix this.

PeBoch added a commit to PeBoch/pypact that referenced this issue Oct 11, 2022
thomasms added a commit that referenced this issue Oct 11, 2022
Lineplotter attr custom resolving issue #46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants