Icon

04_​Image_​Output

Image Output with Python Script

This workflow shows how to use the Python Visualization packages to output images using the Python Script node.

In this workflow, a scatter plot between 'Sepal Width vs Sepal Length' for the Iris dataset is visualized using the Seaborn package, a Sine Wave is visualized using the Matplotlib package and PIL package is used to load pre-existing image from the workflow data folder.


Configure Python Script node for image outputThe Python Script node can be provided with input table or object and it can output a table, object or an imagebased on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Click on the three dots on the node to add an image output portStep 3: Write your script in the "Script" tab and press "execute script" to check if the execution was successful. Seaborn Package Matplotlib Package PIL Package Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflowuses a node from KNIME Python Integration, which installs Python and a number of pre-defined packages onyour system. Supported on KNIME Analytics Platform 4.7 or higher. Create Scatter Plot usingSeaborn packageCreate Sine Wave usingMatplotlib packageView the ImageView the ImageIris DataLoad Image from data folderView the Image Python Script Python Script Image Output Widget Image Output Widget CSV Reader Python Script Image Output Widget Configure Python Script node for image outputThe Python Script node can be provided with input table or object and it can output a table, object or an imagebased on the user's selection of portsStep 1: Drag the Python Script node to KNIME Analytics PlatformStep 2: Click on the three dots on the node to add an image output portStep 3: Write your script in the "Script" tab and press "execute script" to check if the execution was successful. Seaborn Package Matplotlib Package PIL Package Adopting Python Bundled Packages : Download and open this workflow to auto-install requirements and execute the Python scripts. This workflowuses a node from KNIME Python Integration, which installs Python and a number of pre-defined packages onyour system. Supported on KNIME Analytics Platform 4.7 or higher. Create Scatter Plot usingSeaborn packageCreate Sine Wave usingMatplotlib packageView the ImageView the ImageIris DataLoad Image from data folderView the Image Python Script Python Script Image Output Widget Image Output Widget CSV Reader Python Script Image Output Widget

Nodes

Extensions

Links