AutoViML / AutoViz

Automatically Visualize any dataset, any size with a single line of code. Created by Ram Seshadri. Collaborators Welcome. Permission Granted upon Request.
Apache License 2.0
1.71k stars 197 forks source link

Verbose = 2 does not save images #25

Closed Metalkiler closed 3 years ago

Metalkiler commented 4 years ago

Running verbose = 2 does not save the images anywhere! Can you please see this issue?

AutoViML commented 4 years ago

It saves the images in the AutoViz_Class which has been initialized as AV. You need to just use the dot notation to find the properties of AV to find all the plots it has saved. Ram

On Mon, Aug 10, 2020 at 12:09 PM Luís Miguel Matos notifications@github.com wrote:

Running verbose = 2 does not save the images anywhere! Can you please see this issue?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AutoViML/AutoViz/issues/25, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKBH6BCL6MQIFZELDHM4WDSAALTZANCNFSM4P2DS4JQ .

Metalkiler commented 4 years ago

But you could save each plot into a png or something with an option like verbose Instead I have to convert each xml to a png manually

Metalkiler commented 4 years ago

Also, it only works on Jupyter notebook if I want to run this code in a single script it gives an error (related to an in-line issue with ipython)

AutoViML commented 4 years ago

Let me change that and see if it works when I run it as a script. That’s a good point you bring up. Thanks for letting me know Ram

On Mon, Aug 10, 2020 at 3:46 PM Luís Miguel Matos notifications@github.com wrote:

Also, it only works on Jupyter notebook if I want to run this code in a single script it gives an error (related to an in-line issue with ipython)

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/AutoViML/AutoViz/issues/25#issuecomment-671552205, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKBH6EDCZFJQ4WOQF4HVJTSABFBPANCNFSM4P2DS4JQ .

Metalkiler commented 4 years ago

And sorry again to bother you, but another question, if you run this package with a small dataset (e.g., iris) it does not give plots Is it normal?

AutoViML commented 4 years ago

That is not normal. In fact what you may find is that your data file is missing or your target is missing or incorrectly spelled out. Please take a screenshot and send it to me Via email at rsesha2001@yahoo.com

Thx Ram

On Mon, Aug 10, 2020 at 4:29 PM Luís Miguel Matos notifications@github.com wrote:

And sorry again to bother you, but another question, if you run this package with a small dataset (e.g., iris) it does not give plots Is it normal?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/AutoViML/AutoViz/issues/25#issuecomment-671573627, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMKBH6EFECEIAIP6HDAMLL3SABKB3ANCNFSM4P2DS4JQ .

Metalkiler commented 4 years ago

Morning, I sent an email with that information

Also, how can you convert each stringIO plot you saved into several arrays into a single image Cause the solution I made was to gather the string (e.g., AV.barplots["plots"][0]) as presented in the image annexed and then saved into a pdf using pdfkit

However this is not an optimal solution (doing the way im doing) as presented in the pdf "out.pdf" . Is there a way to gather all plots into a Single xml file and save that pdf or png instead of saving into a class variable Only? That could be an Great addition to your package 😄

PS: Check prints:

Captura de ecrã 2020-08-11, às 12 27 57 image image
AutoViML commented 3 years ago

If you can modify the save_image_data module in AutoViz_Class to do what you wanted, then I can easily merge the changes into Autoviz. For example, here is the code that saves image data in AutoViz_Class.py file: `` ######## This is where we store the image data in a dictionary with a list of images ######### def save_image_data(fig, image_count, chart_format): if chart_format == 'svg':

You have to add these lines to each function that creates charts currently
    imgdata = io.StringIO()
    fig.savefig(imgdata, format=chart_format)
    imgdata.seek(0)
    svg_data = imgdata.getvalue()
    return svg_data
else:
    ### You have to do it slightly differently for PNG and JPEG formats
    imgdata = BytesIO()
    fig.savefig(imgdata, format=chart_format, bbox_inches='tight', pad_inches=0.0)
    imgdata.seek(0)
    figdata_png = base64.b64encode(imgdata.getvalue())
    return figdata_png

`` Can you try modifying it to do what you want? Thanks Ram

AutoViML commented 3 years ago

This issue has now been fixed with the latest version 0.0.72 which saves images to your local disk '/plots' folder if you use verbose=1 option for PNG and JPG images. However, SVG images are returned in AV_Class if you use verbose=2 option.

Metalkiler commented 3 years ago

Great addition! Gonna test it soon!