# How to built a simple hystogram in KNIME

**URL:** <https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725>\
**Category:** KNIME Analytics Platform\
**Created:** [July 3, 2022, 11:03am UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725 "2022-07-03T11:03:54Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Guglielmo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@Guglielmo](https://forum.knime.com/u/Guglielmo)\
**Post date:** [July 3, 2022, 11:03am UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/1 "2022-07-03T11:03:54Z")

</div>

Some time simple things seems to be complicate, surely for my inexperience with KNIME.  
I would build an hystogram with following data:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/5/9/59ffdb48ed421297c05d327aad5ad029edc8614e.png)  
like this one:  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/2/02dde61c62a10f910aa31be8c58004ee7315f94e.png)

I tried in KNIME in different way but in all cases it seems that there are problem to bin in some way the data!  
Below the original excel data.  
[Sample Data.xlsx](https://forum.knime.com/uploads/short-url/9ozcvv5ZYyXFNWcNpbbz17iI9sd.xlsx) (11.4 KB)

---

<div class="post-metadata">

**Author:** ![ArjenEX](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@ArjenEX](https://forum.knime.com/u/ArjenEX)\
**Post date:** [July 3, 2022, 11:57am UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/2 "2022-07-03T11:57:51Z")

</div>

Hi @Guglielmo,

What have you tried exactly so far? I have imported your data set into KNIME, connected the Histogram node it and got the following result:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/e/4ef89e32ff75457d80da5bb7b79f7daf6ed0db7c.png)

Is this something similar to what you are looking for? I used the following bin settings:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/1/6/16072a42585f1bbb0b283516a3d911f2857f681c.png)

Also have a look on the KNIME Hub to find some inspiration for Histrograms, there are a lot of example workflows listed there where people have used it → [Histogram – KNIME Hub](https://hub.knime.com/knime/extensions/org.knime.features.js.views/latest/org.knime.dynamic.js.v30.DynamicJSNodeFactory:f822b045)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![Guglielmo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@Guglielmo](https://forum.knime.com/u/Guglielmo)\
**Post date:** [July 3, 2022, 5:35pm UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/3 "2022-07-03T17:35:13Z")

</div>

Bah I’m not able to understand!!!  
If i read the data directly from workflow (same data!!) the result is the following one:

![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/1/d1873b97efa84b1d3322a41dcde4e7590a7a2304.png)

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/4/a/4ac09718191ebe83ab4dec72eb5d6b4c8446c4d5.png)  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/f/4/f4731aa1c7722ce40e981c6eb95d060b4afd6ae8.png)  
 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/2/a2c68e05798d0b3b9e8360fed3eea76413c304f4.png)

If I export the data in excel and successively I read the data from excel file the result is same of yours with same node settigs!! Which is the difference? Data set is the same!! Why in the first case the workflow return anomalous results?!

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/9/2/92a6362249fe29a712bf1e401657142391a16398.png)

---

<div class="post-metadata">

**Author:** ![ArjenEX](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/a/97f17d/32.png) [@ArjenEX](https://forum.knime.com/u/ArjenEX)\
**Post date:** [July 3, 2022, 8:00pm UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/4 "2022-07-03T20:00:46Z")

</div>

I don’t see any obvious that quickly. I’m afraid we’ll need to see your actual workflow to see what’s going on.

---

<div class="post-metadata">

**Author:** ![HansS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/hanss/32/6979_2.png) [@HansS](https://forum.knime.com/u/HansS)\
**Post date:** [July 3, 2022, 8:04pm UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/5 "2022-07-03T20:04:06Z")

</div>

Hi @Guglielmo

Try to add the [Domain Calculator](https://nodepit.com/node/org.knime.base.node.preproc.domain.dialog2.DomainNodeFactory) before the Histogram node.  
gr. Hans

---

<div class="post-metadata">

**Author:** ![Guglielmo](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/e79b87/32.png) [@Guglielmo](https://forum.knime.com/u/Guglielmo)\
**Post date:** [July 4, 2022, 3:48pm UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/6 "2022-07-04T15:48:36Z")

</div>

Hi Hans,  
your solution works, but I don’t fully unerstand the exact function of this node, the data set before and after the node seem the same apart for the column specification. This is before the Domain Calculator:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/4/045b7995c2d5d9cde4bd22971ebb42234ff0ebdf.png)

and these are after the the suggested node:

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/7/6/76b1b95b4199de1265f0d7a4971bf5d3b4f40e4d.png)

which are the right uper e lower bound.  
Thanks … I always learn something new!!

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [July 11, 2022, 3:49pm UTC](https://forum.knime.com/t/how-to-built-a-simple-hystogram-in-knime/44725/7 "2022-07-11T15:49:15Z")

</div>

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