Generating and Exporting Multiple Scatter Plots in a Nested Loop in KNIME

Hello,

I am working on a project where I need to generate multiple scatter plots within a nested loop structure. Specifically, I want to:

Use the loop to vary some parameters (e.g., different ships).
I need to save each scatter plot as an image (PNG, JPG, etc.).
Once the loops are finished, I want to display or export all of the plots, either individually or in a compiled format (e.g., PDF).

I’ve tried using the Group Loop Start, Scatter Plot, and Image Writer nodes, but I’m running into issues saving and displaying the generated images after each iteration, and there is no output for the nodes generating my scatter plot.

In the Scatter Plot node I’ve selected Generate Image and still don’t see an output. I found it much easier to use the Generic Echarts View node instead of Scatter Plot.


1 Like

Hi @Adrien_2

I’m not entirely clear on what the intention is, but maybe this example will help. It shows how you can generate multiple scatterplots in a loop and store them in a table. And how you make them visible again. scatterplot_in_loop.knwf (374.3 KB)

gr. Hans

5 Likes

I’m facing two issues with my current workflow:

  1. Graph Creation:
    I want to create a graph with a line connecting the dots. The scatter plot node doesn’t support this. I’m using the Generic Echarts View node, but it only outputs data in a specific way, as shown in the second screenshot. This setup comes from a tutorial I found on the forums. The issue is that after I run a loop to generate multiple graphs, it stops after each iteration, and I have to manually press “execute” to continue.

  2. Compiling Graphs:
    I’m also trying to compile all my graphs into one document using the Report PDF Writer. However, the node only has options to either overwrite or fail, not to append. This means that each new graph replaces the previous one, which is not what I want. I need a way to add all the graphs to a single document without replacing them.


This is the tutorial on the node: ECharts views: What are they & how to use them with in-built AI | KNIME


This is a screenshot of the example workflow they had and I just copied one of the meta nodes.

@Adrien_2 one idea could be to employ a Python script. The most important Python graphics packages are already inside the KNIME Python extension.

I had some promising results using ChatGPT (or similar) to create code and populate it with Flow Variables.

3 Likes