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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

The graph getting generated in Jupyter is fine, but the image getting saved as a .png file is getting distorted where portions of the image from the left & right are not present and a distorted image is getting saved #1142

Open
sambit-ai opened this issue May 2, 2024 · 1 comment

Comments

@sambit-ai
Copy link

System Info

pandasai==2.0.26, python =3.9.7, OS = Windows

馃悰 Describe the bug

The graph getting generated is fine when it shows automatically in Jupyter, but when I save it using
a = Agent(data, config={"llm": llm,"save_charts": True,
"save_charts_path": user_defined_path})
Then it is getting saved as a ".png" file but the information present in left of the grapgh & right are lost. But the complete graph is available in the image displayed in Jupyter.

@nehcneb
Copy link
Contributor

nehcneb commented May 16, 2024

Saving the figure as follows works for me: plt.savefig(your file, bbox_inches='tight', format = 'png'), where plt denotes matplotlib.pyplot.

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

2 participants