# Why histogram not displayed automatically

**URL:** <https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464>\
**Category:** ROOT\
**Tags:** hist, root\
**Created:** [March 10, 2024, 4:58pm UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464 "2024-03-10T16:58:35Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![thowrabbit](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/thowrabbit/32/35886_2.png) [@thowrabbit](https://root-forum.cern.ch/u/thowrabbit)\
**Post date:** [March 10, 2024, 4:58pm UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/1 "2024-03-10T16:58:35Z")

</div>

Hi guy,

I ran a data collection program and the output I have a histogram with ROOT. I can save the histogram and open it. But the histogram is not displayed automatically. Any ideas why or how to solve this?

---

<div class="post-metadata">

**Author:** ![Danilo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/danilo/32/34528_2.png) [@Danilo](https://root-forum.cern.ch/u/Danilo)\
**Post date:** [March 10, 2024, 4:59pm UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/2 "2024-03-10T16:59:51Z")

</div>

Hello,

Welcome to the ROOT community!

It’s hard to figure out from the context given what is really happening. Allow me a follow up question…  
Are you drawing the histogram? How?

Cheers,  
D

---

<div class="post-metadata">

**Author:** ![thowrabbit](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/thowrabbit/32/35886_2.png) [@thowrabbit](https://root-forum.cern.ch/u/thowrabbit)\
**Post date:** [March 11, 2024, 6:38am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/3 "2024-03-11T06:38:14Z")

</div>

Hi Danilo,  
This is my working display

 ![t2k](https://root-forum.cern.ch/uploads/default/original/3X/c/c/cccb33d6bb21f6dec358d25c3b1a2a49e94699b9.png)  
Even when running at 100%, the still does not appear automatically, I’m afraid it’s my computer

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [March 11, 2024, 6:41am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/4 "2024-03-11T06:41:45Z")

</div>

So you are running linux on Windows (WSL)? Check this, maybe it helps:

> [@Histogram not displaying after program finishes running](https://root-forum.cern.ch/t/histogram-not-displaying-after-program-finishes-running/58453/5):
>
> Are you running an Xserver? Try this: (the X server has to be running before you open a WSL terminal). More here:

---

<div class="post-metadata">

**Author:** ![thowrabbit](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/thowrabbit/32/35886_2.png) [@thowrabbit](https://root-forum.cern.ch/u/thowrabbit)\
**Post date:** [March 11, 2024, 8:49am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/5 "2024-03-11T08:49:08Z")

</div>

Oh Thank dastudillo, I did it but it was like adding another virtual machine. Sorry, but can you explain more clearly to me? I’m just a student

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [March 11, 2024, 9:02am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/6 "2024-03-11T09:02:05Z")

</div>

In which OS are you running ROOT? and how are you running it, exactly?

---

<div class="post-metadata">

**Author:** ![thowrabbit](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/thowrabbit/32/35886_2.png) [@thowrabbit](https://root-forum.cern.ch/u/thowrabbit)\
**Post date:** [March 13, 2024, 7:40am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/7 "2024-03-13T07:40:46Z")

</div>

Dear dastudillo,  
I turned on the X server before with the command startxfce4 and the histogram appeared, Is this the right way?

 ![sgs](https://root-forum.cern.ch/uploads/default/original/3X/5/a/5ae8ee95f02dc6eb2a59651fbef86afb548a29ae.png)

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [March 13, 2024, 7:56am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/8 "2024-03-13T07:56:03Z")

</div>

How are you running linux (and what linux distro)? Is this a virtual machine on Windows (Vmware? virtualbox? other?), or WSL?  
If it’s a virtual machine, you should not need an Xserver on Windows --of course, your linux distro should have its own desktop environment (like XFCE) if you want graphics like this, but this is independent of Windows.  
If it’s WSL, I don’t know if it’s a very good idea to run xfce or any desktop environment like that; I’d just run the terminal and the Xserver on Windows for the ROOT graphical stuff. For a full graphical environment, I think a virtual machine is perhaps a better option (other than dual booting to a “real” linux 🙂). But again, this is just me; if it works for you, and you are happy with it, why not 😉

---

<div class="post-metadata">

**Author:** ![thowrabbit](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/thowrabbit/32/35886_2.png) [@thowrabbit](https://root-forum.cern.ch/u/thowrabbit)\
**Post date:** [March 13, 2024, 8:22am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/9 "2024-03-13T08:22:26Z")

</div>

this my linux distro and WSL 🥲  
 ![ditro](https://root-forum.cern.ch/uploads/default/original/3X/7/6/76992d0c3d4b0843e1e6746249e7acc1b80338eb.png)

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [March 27, 2024, 8:23am UTC](https://root-forum.cern.ch/t/why-histogram-not-displayed-automatically/58464/10 "2024-03-27T08:23:05Z")

</div>

Closed on March 27, 2024, 8:23am UTC

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