Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Update _legend.py#581

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
youcann wants to merge1 commit intonschloe:main
base:main
Choose a base branch
Loading
fromyoucann:patch-1
Open

Update _legend.py#581

youcann wants to merge1 commit intonschloe:mainfromyoucann:patch-1

Conversation

@youcann
Copy link

Possible typo:_ncol instead ofn_cols.
With_ncol callingtikzplotlib.save() on a plot containing legends results in the error:

Traceback (most recent call last):  File "/home/marvin/phd_scripts/2023_04_14 picoscope/analyzepicoscope_class.py", line 36, in <module>    tikzplotlib.save("picoscope.tikz")  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 262, in save    code = get_tikz_code(*args, filepath=filepath, **kwargs)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 213, in get_tikz_code    data, content = _recurse(data, figure)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 352, in _recurse    data, children_content = _recurse(data, child)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 380, in _recurse    data = _legend.draw_legend(data, child)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_legend.py", line 81, in draw_legend    if obj._ncol != 1:AttributeError: 'Legend' object has no attribute '_ncol'. Did you mean: '_ncols'?

Possible typo: `_ncol` instead of `n_cols`.With `_ncol` calling `tikzplotlib.save()` on a plot containing legends results in the error:```Traceback (most recent call last):  File "/home/marvin/phd_scripts/2023_04_14 picoscope/analyzepicoscope_class.py", line 36, in <module>    tikzplotlib.save("picoscope.tikz")  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 262, in save    code = get_tikz_code(*args, filepath=filepath, **kwargs)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 213, in get_tikz_code    data, content = _recurse(data, figure)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 352, in _recurse    data, children_content = _recurse(data, child)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_save.py", line 380, in _recurse    data = _legend.draw_legend(data, child)  File "/home/marvin/.local/lib/python3.10/site-packages/tikzplotlib/_legend.py", line 81, in draw_legend    if obj._ncol != 1:AttributeError: 'Legend' object has no attribute '_ncol'. Did you mean: '_ncols'?```
@FriedrichFroebel
Copy link

This duplicates (at least)#574,#565,#558 and#579 and just has not been merged yet, see#574 (comment) as well. This is no typo, but a change frommatplotlib 3.6.0.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@youcann@FriedrichFroebel

[8]ページ先頭

©2009-2025 Movatter.jp