Density on the 2D plot


is there any tool for visualization that could display density of the population on the 2d plot?
I have 2d principal components space for a table of molecules (2 millions of structures), and it's almost impossible to visualize all of them as dots just because of picture resolution and rounded pc values (so, there can be 1 molecule per pixel and 100 molecules per pixel). So, if there are any tricks to 

  1. split colours of dots by column value and
  2. distinguish abovementioned pixels hiding 1 and 100 dots by, for example, different brightness/intensity,

I would be grateful if anyone revealed them to me.


Thanks in advance and have a nice day,



Hi Lana,

given the use case and the number of points I would go with a R View (Table) node and use ggplot2 in it.

If you have no experience with R/ggplot2, you can always switch to the Templates tab in the node configuration. There is a pre-made template called Colored Scatter Plot which seems to fit your needs. You may want to add some transparency (alpha) to the dots to have a higher intensity where they overlap.

As an alternative, still using ggplot2, you can opt for a geom_raster surface plot. Have a look here:


Hi Lana,

I doubt KNIME views are capable to visualize 2 million rows efficiently (maybe those that does not support HiLiting). As for density: in case you specify partially-transparent colour for the points, those that are covering the same pixel will be darker. There is also the RapidMiner View which has a density plot, though that is probably also incapable of visualizing so much data. I would use R or Python for this task as was already suggested.

Cheers, gabor