Create multiple plots from one input tabel


I would like to create multiple plots from data in one input table, which could look something like this:


Object     x value     y value

A     3     5

A     10    17

A     30     21

A     100     23

B     3     16

B     10     42

B     30     48

B     100     50


I don't want to plot curves for object A and B in the same plot, but in separate ones that ideally would be arranged in a grid, and where each plot would be labeled by Object. I suspect that this might require some form of looping, but would appreciate suggestions.



PS: I tried to use the table widget for the table above but the preview looked strange. Is that browser-dependent?

I don't exactly understand this problem: are you looking for a Scatter Matrix, probably not since you only have two dimensions. KNIME has a Line Plot and a Line Chart node available in the JFreeChart integration, something you might want to check out.



you need the group by loop start (the group column is your object column)

than the jfreechart scatter plot. You can change the title via a flowvariable which in your case would be the object name.

than connect the outport of the jfreechart node to the image to table node and finally to a loop end.

The outport of the loop end will contain an image column containing one scatterplot for each of your objects.

Cheers, Iris

Many thanks for your answer, Iris, you solved my problem!

One question regarding JFreeChart: is it possible to change the grey background color to white?


Currently no, but we have this already in our developer version and it will be public availabe with the 2.7 release.

With the new version you will be able to change the background color and the plot background color, as well as changing the fontsizes.

That's great news! When is 2.7 scheduled for release?


I used the same workflow for my data but I am getting only the first curve in all the images. It is like it is ignoring the other files in my list of files. Could you give some help?

@ChakibO which workflow did you use?
Did you already see our loop section in our training, there we have an example about reading many files:

That is alright Iris, I managed to find a solution. Thank you.
I have another question:
I have for each file 2 columns: col 1 and col2. Let’s suppose I have 10 files. And I have a reference column of 10 values. I would like to do for each file col2-ref1 for the first file and and append it to a new column and col2-ref2 for the second file and so on… Do you know how can I do that?
Thank you,

Hi :slightly_smiling_face: I want to do the same thing but the JFreechart (scatterplot) does not take datetime value on x-axis. Is their anyother solution for this?

Thank you!

@Iris Hi :slightly_smiling_face: I want to do the same thing but the JFreechart (scatterplot) does not take datetime value on x-axis. Is their anyother solution for this?