Hi,

I wanted to create a chart showing scatter plot of data along with a line graph ( similar to the image). Can’t find a way to plot it?

What should I do?

Hi,

I wanted to create a chart showing scatter plot of data along with a line graph ( similar to the image). Can’t find a way to plot it?

What should I do?

1 Like

At the moment, the most flexible way would be to use a Python/R/JavaScript script to plot a scatter plot along with a line graph. In addition, if your particular use case is a linear regression, you can use the Linear Regression Learner node. Here you will find the “Linear Regression Scatterplot View” which displays the input data along with the regression line in a scatter plot.

2 Likes

Hello everyone. Currently we can only add the straight line to the correlation graph by Python/R/JavaScript script?

1 Like

Hello @Marcelo_Linero,

and welcome to KNIME Community!

Correct. There’s a ticket in the system for it (AP-15096). I’ve added a +1 from you.

Br,

Ivan

1 Like

And another +1 if it helps

Kindly add a +1 for me.

Thanks!

1 Like

I have often the same issue.

I end up adding a line of fake points (colored in different color) calculated with the regression coefficients.

The workflow looks like this:

- Create a table of many x values for the range you want to plot
- Use regression predictor to predict the points of the regression line
- Append a column to label the regression line points “Line”

On the main data table

- Add a column to label the data “Data”
- Concatenate “Data” and “Line”
- Assign different colors and plot…

If one adds a lot of points… they look like a line. But it’s a very poor solution.

Hope it helps

Ludovico

1 Like

Done @zioludo.

Care to share workflow @zioludo? Maybe someone (or you if you want) can make a generic Component out of it and share it so others can benefit from it until proper solution is available…

Ivan

I will do! But please add +1 for me as well!

1 Like

I have developed a simple component that does the trick… with minimal configuration.

You can find it here:

(Can I upload the component only?)

1 Like

Hello @zioludo,

nice one!

Yes you can. See here for more on sharing Components:

https://docs.knime.com/latest/analytics_platform_components_guide/index.html#sharing-components

Br,

Ivan

Done!

1 Like

This new component converts the dots in a line.

1 Like