Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

PYTHON TOOL - Graphic Outputs

WSDATA
7 - Meteor

We are feeding data from Alteryx into the Python tool for modeling and evaluation.

 

There are several libraries that generate fantastic plots/graphics that we would like to output to an anchor and utilize later in the workflow.

 

We need help understanding how to get charts / plots that are generated within the Python notebook to output back into the workflow.

 

If that is not possible then is there a workaround where we can save plots / graphics to disk and then reimport them later in the workflow?

 

Thanks in advance for any help!

5 REPLIES 5
IraWatt
17 - Castor
17 - Castor

Hey @WSDATA, currently I believe you can only output data frames from the Python output. The two options I can see are:

One save the charts as PNG or some other format depending on what libraries your using to make the plots.

Or two convert the plots to a HTML format and output them in a data frame to the Alteryx workflow for later use. 

CarliE
Alteryx Alumni (Retired)

Hi @WSDATA,

 

Take a look at this post, it may be helpful for what you are trying to do!

https://community.alteryx.com/t5/Data-Science/Plot-Twist-Using-the-Python-Tool-for-Plotting/ba-p/584...

 

If you found this solved your issue, please mark this as a solution. 

 

Thanks!

Carli
WSDATA
7 - Meteor

Thank you both for the feedback!  Ended up using a mix of images and HTML exported from Python to local folder.   

TimPowers
6 - Meteoroid

I'm curious about yours (or anyone's) success with doing this.

 

I followed the method of saving .PNGs to a temp folder then using the Image tool to bring them into the workflow as images. However I'm finding that my x-axis is getting cut off (I have it rotated -30 degrees) and if I render the images the output is complete garbage.

Does anyone have a suggestion on how to not have my image be cut off on the bottom? I'm using the [fig, ax = plt.subplots()] paradigm.

 

python toolpython toolfrom browsefrom browsefrom renderfrom render

TimPowers
6 - Meteoroid

I tried using 'plt.tight_layout()' which helped the axis problem.

 

The render problem can probably be fixed by using the .PNG directly in a layout.

Labels