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

Problem to export tikz code with a legend #568

Open
bilepeng opened this issue Jan 25, 2023 · 2 comments
Open

Problem to export tikz code with a legend #568

bilepeng opened this issue Jan 25, 2023 · 2 comments

Comments

@bilepeng
Copy link

bilepeng commented Jan 25, 2023

Hi, Thanks for developing such a great tool! I experienced a bug today, which is easy to fix.
In _legend.py, line 81 and 82, obj._ncol should be obj._ncols. Then the figure with a legend can be exported.

@FriedrichFroebel
Copy link

This appears to be a duplicate of #557 and has an unmerged fix in #558.

@2sn
Copy link

2sn commented Mar 2, 2023

I encounter the same issue:

File ~/Python/lib/python3.11/site-packages/tikzplotlib/_legend.py:81, in draw_legend(data, obj)
     78 if alignment:
     79     data["current axes"].axis_options.append(f"legend cell align={{{alignment}}}")
---> 81 if obj._ncol != 1:
     82     data["current axes"].axis_options.append(f"legend columns={obj._ncol}")
     84 # Write styles to data

AttributeError: 'Legend' object has no attribute '_ncol'

Repository owner deleted a comment from st-- May 6, 2023
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

3 participants