microsoft / lida

Automatic Generation of Visualizations and Infographics using Large Language Models
https://microsoft.github.io/lida/
MIT License
2.57k stars 260 forks source link

Truncated X-Labels on plot #92

Open Omotade-MY opened 5 months ago

Omotade-MY commented 5 months ago

LIDA truncated the labels on the x-axis of plots.

The plots generated by LIDA was truncated and the X-axis labels did not display completely.

Here is the code to reproduce it:


import pandas as pd
import numpy as np
data_path = 
[Uploading sample_financial_data.csv…]()

api_key = os.environ['OPENAI_API_KEY']

lida = Manager(text_gen = llm(provider="openai", api_key=api_key)) 
textgen_config = TextGenerationConfig(n=1, temperature=0.5,
                                        model="gpt-3.5-turbo-0125", use_cache=False)

summary = lida.summarize(data_path, summary_method="default", textgen_config=textgen_config)  

persona = "Give a Barchart of industry against revenue"

goals = lida.goals(summary, n=1, persona=persona, textgen_config=textgen_config)

library = "matplotlib"
plots = lida.visualize(summary=summary, goal=goals[0], textgen_config=textgen_config, library=library)

plots[0]`````
Omotade-MY commented 4 months ago

output

PyroShade commented 3 months ago

Same issue !

vishalsingh-11 commented 2 months ago

Facing the same issue, is there any fix ?