Histogram help

Hello folks,

I have a large table with approx. 250K molecules and a number of calculated Lipinski-type properties in columns. Now I want to generate some histograms to inspect the distributions of the properties.

With the Histogram Chart (JFreeChart) Node this is straightforward: select column(s) of interest and the number of bins, and voila, Bob’s your uncle (see image). However, the results are visually not very appealing.

Hence I try to accomplish the same thing with the Histogram node (from the Views → JavaScript branch) but can’t for the life of me work out how to do it…ideally I would like to be able to define the bin boundaries myself (say, starting at 0 with 50 Da intervals for molecular weight).

Any pointers appreciated!



Hi Evert

AFAIK none the Histogram nodes allow you the set the bin boundaries, but you can define the bins yourself and then use the Bar Chart javascript node with the “occurrence count” option to plot the histogram. For example:


The workflow: KNIME_project4.knwf (18.8 KB)

Hope you find this useful.



Hello @evert.homan_scilifelab.se and @Aswin,

there’s a Binning tab in Histogram (JavaScript) node which offers more options than Histogram Chart (JFreeChart) node which you say does what you want. Am I missing something?


Hi, I have seen these settings and tried to tweak them but to no aveil, I cannot get it to produce the same output as the JFreeChart

Hello @evert.homan_scilifelab.se,

might be that bins are calculated differently but don’t know that. If you share workflow example can try to tweak it :wink:


Please find attached an example with molecular weights on 10K molecules, where JFreeChart gives the desired result very easily.


Mw_histogram.knwf (161.9 KB)

Hello @evert.homan_scilifelab.se,

this looks pretty same to me except for labels on both axes.
Mw_histogram¸_ipazin.knwf (162.1 KB)


Yes, this is close to what I wanted (and I am a bit at a loss why I couldn’t get this myself).

Even so, it would be an enhancement if one could specify the bin size and starting value (say 50 and 0) to get bins with intuitive intervals. I will put in an enhancement request.

Thank you,


1 Like

@evert.homan_scilifelab.se glad to hear that and I agree with you.

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