Plotting multiple data to one chart

Hi all,

I did a PCA analysis over 2 data set. One is a controlled cell and the other is a treated cell. Now I would love to plot two PCA analysis into one scatter plot. I explain better:

  1. First PCA -> Scatter plot with X = pca0 and Y=pca1
  2. Second PCA -> Scatter plot with X = pca0 and Y = pca1

All the PCA analysis needs to be into the same scatter plot to see the difference between one and the other one.

I am using a report made by some people and they did it. Unlucky I can not have the workflow.
Do you know how can I reach this plot?

controllovsrotenone

Hi @GiulioFerrari -

Let’s say you have both your datasets in the same table, with an associated label. In my example below, I generated some random data with cluster names. I then assign colors using the Color Manager node by cluster, and use the Scatter Plot node for viz:

2019-11-14%2011_14_58-KNIME%20Analytics%20Platform

2019-11-14%2011_14_42-Random%20data%20with%20cluster%20ID%20-%202_1%20-%20Data%20Generator

2 Likes

Hi there @GiulioFerrari,

as @ScottF said you need to have results from two PCA nodes in one table. Probably Concatenate node should do the trick.

Br,
Ivan

2 Likes

I did not understand how can i create cluster name. After i Joined the two table I got this:


As you can see I want to plot PCAdim 0,1 with a color and PCAdim0,1 #1 with antoher color. How can i say to Knime to do that? It is a bit different from your example.
The scatterplot makes me choose only 2 data set…:

My workflow:
image

I’ve Found the solution. I guess is a bit tricky but it works…:
image
Results:


Thansk you all for your help!!

P.s.: the attention said only about column length. Explanation: create cluster column, filter it and append with your concatenated data. Then just managed the color and plot data. Cluster will plot the two different concatenated data set togheter.

1 Like

Hi there @GiulioFerrari,

glad you managed to do it.

One note: You don’t need Data Generator node to create identifiers Cluster_0 and Cluster_1 (it adds complexity as you noticed). You can use Rule Engine or Constant Value Column node prior to Concatenate node to add this information :wink:

Br,
Ivan

2 Likes

Thanks! I am new to Knime and I have to learn all available nodes :slight_smile: Thanks again!

1 Like