nixtla icon indicating copy to clipboard operation
nixtla copied to clipboard

No plot display

Open Matgn34 opened this issue 1 year ago • 2 comments

In the quickstart guide vhen I use the exemple nixtla_client.plot(df, timegpt_fcst_df, time_col='timestamp', target_col='value')

No plot is showing on my screen, is this normal ? How can I resolve this ? Thanks

Matgn34 avatar May 27 '24 12:05 Matgn34

Thanks for using TimeGPT! I need a bit more details to be able to help you:

  • Please provide all code that you have run so that I can also run it as a standalone example, showcasing the issue on my pc. Did you just run the quickstart code in Google Colab?
  • Please provide details on how/where you have run this code. E.g. in Google Colab?
  • Do you have a TimeGPT API key?

elephaint avatar May 28 '24 20:05 elephaint

Thanks for your answer. I have a an API key and it runs in a IDE. I simply test your study cases provided in installation. import pandas as pd import os from nixtla import NixtlaClient

Configurez les variables d'environnement pour le proxy

os.environ['HTTP_PROXY'] = '' os.environ['HTTPS_PROXY'] = ''

nixtla_client = NixtlaClient( api_key = '' ) nixtla_client.validate_api_key()

df = pd.read_csv('https://raw.githubusercontent.com/Nixtla/transfer-learning-time-series/main/datasets/air_passengers.csv') df.head() nixtla_client.plot(df, time_col='timestamp', target_col='value') timegpt_fcst_df = nixtla_client.forecast(df=df, h=12, freq='MS', time_col='timestamp', target_col='value') timegpt_fcst_df.head() nixtla_client.plot(df, timegpt_fcst_df, time_col='timestamp', target_col='value')

Matgn34 avatar May 30 '24 07:05 Matgn34

You should probably respond to this. It is unclear in the documentation that the library is working in colab. It does not work in many other environments.

NicholasFry avatar Jul 21 '24 22:07 NicholasFry

The output from the plot method is a matplotlib figure, which is displayed when working with notebooks but needs to be saved when using a script. How are you using this?

jmoralez avatar Jul 22 '24 16:07 jmoralez

I have also just stumbled across the documentation. It looked very extensive at first, but has since proved to be of little use. For your specific question:

nixtla_client.plot(df, time_col='timestamp', target_col='value').savefig('test.png') when using in a plain python script.

StefanAtUeber avatar Aug 01 '24 12:08 StefanAtUeber

@StefanAtUeber What can we do to improve the documentation?

elephaint avatar Aug 01 '24 17:08 elephaint

This issue has been automatically closed because it has been awaiting a response for too long. When you have time to to work with the maintainers to resolve this issue, please post a new comment and it will be re-opened. If the issue has been locked for editing by the time you return to it, please open a new issue and reference this one.

github-actions[bot] avatar Aug 22 '24 04:08 github-actions[bot]