Plot multiple series of data on one plot

Hello everyone,

I have multiple values series I would like to draw on the same plot but the information on which serie the values is from is in a line.

My input data are the following format :

Probe Param A Param B Time Probes state
2 0 0 0 0
2 5.587641994 0.676904557 0.5 0
2 2.201407269 0.312587442 1 0
2 0.456207061 0.101925172 1.5 0
3 0 0 0 0
3 4.339078206 0.482884258 0.5 0
3 3.488354199 0.771082107 1 0
3 1.740710898 0.042079133 1.5 0
5 0 0 0 0
5 0.869201874 0.246838368 0.5 0
5 0.585464537 0.124907482 1 0
5 2.22687224 0.081106812 1.5 0

Here is what I want to obtain, for each probe the values of Param 2 vs time :
image

There is an additional difficulty as the number of probes is not set and may vary based on the input database.

I tried with “transpose” and “sortby” to create new columns for Param A for each probe for the “Line Plot” module (I think I already saw something like this work) but the data transformation wasn’t successfull.

Do you have any idea on how I can do this ?

Thank you.

These days I use Generic Echarts View in combination with the build in K-AI assistant for any visualization.

With simple prompts you can solve many problems and it’s free!

Here’s what I did to get to the WF at the bottom:

  1. Ask for line plot and describe what I want to see where:

  2. Second Prompt to add legend

  3. Final outcome:

Here’s a prototype
LineGraphProbeData.knwf (73.5 KB)

3 Likes

Wow, that’s fantastic, thanks.
I did some tries and it works really well. But I did not find how to export the image or insert it in a report like a traditional Line Plot. Do you know if it is possible to do it ?

eCharts Generic View does not have that image output port as far as I know, but you can use the KNIME Reporting Extension to output it as PDF or HTML.

I’ve update the example workflow with a prototype.

There’s a good article on how to use it on KNIME Blog.

On a very high level - assuming you have installed the extension linked above:

  • wrap your view into a component:
  • Go into the component and click on Open Layout Editor
    image
  • Check the box Enable Reporting
  • connect the Report Template Creator to the Component Input and either the Report HTML or PDF Writer to the output node and edit the configuration to define where the file is to be saved to:
    image
2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.