# Histogram fill transparency not working (EPEL7 package)

**URL:** <https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416>\
**Category:** ROOT\
**Tags:** graphics, hist\
**Created:** [June 19, 2018, 10:09am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416 "2018-06-19T10:09:15Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 10:09am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/1 "2018-06-19T10:09:16Z")

</div>

* * *

_ROOT Version:_ 6.12.06  
_Platform:_ CentOS7  
_Compiler:_ precompiled EPEL7 binary

* * *

Maybe I’m stupid and, as usual, I’m missing something trivial but… The following macro does not produce any transparent fill color in my histogram:

```auto
    gStyle->SetCanvasPreferGL(true);
    TH1D * h = new TH1D("h", "h", 10, 0, 1);
    h->FillRandom("gaus", 100);
    h->SetFillColorAlpha(kBlue, 0.5);
    h->Draw();

```

any clue? Missing compile time option?

PS: Also, in the GUI editor, the "opacity’ parameter is not available…

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 19, 2018, 10:53am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/2 "2018-06-19T10:53:11Z")

</div>

It works for me. I get the attached picture.  
Also notice the opacity slider in the GUI.

I tried with the ROOT version 6.12.05 and with the master version on mac.

 ![19](https://root-forum.cern.ch/uploads/default/original/3X/1/5/1576da9b8fe58c06124c26c1eff79cd41af4942f.jpg)

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 12:19pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/3 "2018-06-19T12:19:58Z")

</div>

I know, it works fine also on my mac, but here’s the output on Linux:

 ![Screenshot%20from%202018-06-19%2014-17-52](https://root-forum.cern.ch/uploads/default/original/3X/1/d/1de7a90b8297c778f4da24300ab66714acb81147.png)

As you see the slider is unusable 😕

PS: you didn’t select the histogram in the GUI editor

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 19, 2018, 12:38pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/4 "2018-06-19T12:38:17Z")

</div>

I tried [ROOT 6.12/06 (binaries provided by the ROOT Team)](https://root.cern.ch/content/release-61206) on Ubuntu 14 (ran locally) and CentOS 7 (ran via “ssh -X -Y”) and I get it fine.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 19, 2018, 12:39pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/5 "2018-06-19T12:39:46Z")

</div>

> [@luigipertoldi](#):
>
> As you see the slider is unusable

Yes and the blue is fully blue, not half tone blue as it should be.

> [@luigipertoldi](#):
>
> PS: you didn’t select the histogram in the GUI editor

It does not matter if it works for one objet it works for all. If I click on the histogram the slider is active also.

We just tried on a CENTOS 7 machine with ROOT 6.13 and it works fine.

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 1:10pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/6 "2018-06-19T13:10:17Z")

</div>

I can reproduce the issue in the following Docker container:

```auto
FROM centos:7

USER root

RUN yum install -q -y epel-release && \
    yum install -q -y root

CMD /bin/bash

```

with the usual `sudo docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix` command. Could you check? (you’ll see OpenGL errors, I don’t have them on my pc…)

Interesting feature: if I save the canvas as PDF the transparency is drawn correctly

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [June 19, 2018, 1:18pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/7 "2018-06-19T13:18:54Z")

</div>

> [@luigipertoldi](#):
>
> you’ll see OpenGL errors, I don’t have them on my pc…

Ah ! that’s why it does not work. OpenGL is mandatory in that case.

> [@luigipertoldi](#):
>
> Interesting feature: if I save the canvas as PDF the transparency is drawn correctly

Yes PDF output is an independent module I implemented in ROOT as the TPDF class. It is completely disconnected from the screen display. I implemented transparency in that class.

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 19, 2018, 1:23pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/8 "2018-06-19T13:23:36Z")

</div>

What “OpenGL errors” are you talikng about?  
If you just get something like this, then it is still fine:

```auto
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600

```

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 1:30pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/9 "2018-06-19T13:30:28Z")

</div>

These are the errors you’ll get in the container when starting ROOT:

```auto
libGL error: MESA-LOADER: failed to retrieve device information
libGL error: unable to load driver: i915_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: i915
libGL error: failed to open drm device: No such file or directory
libGL error: failed to load driver: i965
libGL error: unable to load driver: swrast_dri.so
libGL error: failed to load driver: swrast

```

And I’ve always had them within my CentOS containers, I remember struggling a lot in the past to get rid of them but never succeeded (all the OpenGL stuff is correctly installed as a dependency of the EPEL7 ROOT rpm)… Also, as I said, I don’t get any of those errors in my CentOS7 physical machine.

Moreover, despite of the errors, I’ve never encountered any kind of issue by running ROOT graphics from containers (maybe until now…?)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 19, 2018, 1:44pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/10 "2018-06-19T13:44:54Z")

</div>

Maybe, instead of the “docker”, you could try the “[Singularity](https://www.sylabs.io/)” (which is claimed to work flawlessly with X11).

In any case, of course, your “X display server” needs to have OpenGL support built in (and the “container” with ROOT, too, of course).

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 1:58pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/11 "2018-06-19T13:58:10Z")

</div>

Sure, I use Singularity too, but unfortunately the situation is the same, e.g. with the following recipe file:

```auto
Bootstrap: docker
From: centos:7

%post
    yum -y -q install epel-release
    yum -y -q install root

```

I get the same errors. The fact that I don’t have them on my pc, where X11 and ROOT are installed in the same way, still puzzles me.

However, you could be right, maybe the Xorg distribution for CentOS7 does not have OpenGL support, I have to check…

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 19, 2018, 2:06pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/12 "2018-06-19T14:06:32Z")

</div>

[On your “container”, before you start ROOT or another OpenGL (GLX) application (e.g. “glxinfo” and/or “glxgears”), try:  
[bash]$ export LIBGL\_ALWAYS\_INDIRECT=1  
[tcsh]$ setenv LIBGL\_ALWAYS\_INDIRECT 1](https://root-forum.cern.ch/t/sl-6-x-slc-6-x-centos-6-x-rhel-6-x/15248)

See also:  
[CMSPublic -\> OpenGL and X11 problems](https://twiki.cern.ch/twiki/bin/view/CMSPublic/WorkBookFireworksHowToFix#OpenGL_and_X11_problems)

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 2:13pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/13 "2018-06-19T14:13:13Z")

</div>

Oh, nice, no more libGL errors… Thanks!

However, as suspected, this has nothing to do with the transparency issue… have to check the OpenGL support thing

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 19, 2018, 2:28pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/14 "2018-06-19T14:28:40Z")

</div>

Maybe, instead of executing “yum -y -q install root”, you could try to download and unpack the [ROOT 6.12/06 binary distribution provided by the ROOT Team](https://root.cern.ch/content/release-61206).

BTW. Have you checked that you have the “root-graf3d-gl” package installed? Maybe it is an optional package which you need to manually add using yum.

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 19, 2018, 2:35pm UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/15 "2018-06-19T14:35:50Z")

</div>

> [@Wile\_E\_Coyote](#):
>
> Maybe, instead of executing “yum -y -q install root”, you could try to download and unpack the [ROOT 6.12/06 binary distribution provided by the ROOT Team](https://root.cern.ch/content/release-61206).

I’ll try!

> [@Wile\_E\_Coyote](#):
>
> BTW. Have you checked that you have the “root-graf3d-gl” package installed? Maybe it is an optional package which you need to manually add using yum.

I didn’t have it, but after installing it the issue was still there…

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 25, 2018, 10:11am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/16 "2018-06-25T10:11:03Z")

</div>

Update: the problem remains also with the official binary distribution, so it shouldn’t be a ROOT issue

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 25, 2018, 10:12am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/17 "2018-06-25T10:12:28Z")

</div>

Try maybe:

> [@Problems with libGL libraries and ROOT - swrast driver](https://root-forum.cern.ch/t/problems-with-libgl-libraries-and-root-swrast-driver/29496/6):
>
> Good then! I think I got the solution. On mac OSX one should just kill the X server (go to activity monitor, look for the xquartz processes and kill them all), then open a shell and give defaults write org.macosforge.xquartz.X11 enable\_iglx -bool true which would set the -iglx option (whatever it means). Then restart the ssh -XY session, and run any GL-based application (such as glxgears). Thank you all for your patience, suggestions and useful help! Cheers! Guido

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 25, 2018, 10:19am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/18 "2018-06-25T10:19:44Z")

</div>

I already tried to add e.g.

```auto
Section "ServerFlags"
    Option "AllowIndirectGLX" "on"
    Option "IndirectGLX" "on"
EndSection

```

to `/etc/X11/xorg.conf`!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [June 25, 2018, 10:28am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/19 "2018-06-25T10:28:39Z")

</div>

I think you need to “enable\_iglx” on your mac (using the “magic” command shown in the link).

---

<div class="post-metadata">

**Author:** ![luigipertoldi](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/luigipertoldi/32/12374_2.png) [@luigipertoldi](https://root-forum.cern.ch/u/luigipertoldi)\
**Post date:** [June 25, 2018, 10:30am UTC](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/20 "2018-06-25T10:30:15Z")

</div>

But I am working on a CentOS7 machine since the beginning…

> [@Histogram fill transparency not working (EPEL7 package)](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416/3):
>
> I know, it works fine also on my mac, but here’s the output on Linux: As you see the slider is unusable confused PS: you didn’t select the histogram in the GUI editor

[Next page](https://root-forum.cern.ch/t/histogram-fill-transparency-not-working-epel7-package/29416.md?page=2)
