# Drawing THStack with "pfc" option appears differently on server

**URL:** <https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469>\
**Category:** Newbie\
**Created:** [July 16, 2020, 3:52pm UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469 "2020-07-16T15:52:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jemarq04](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jemarq04](https://root-forum.cern.ch/u/jemarq04)\
**Post date:** [July 16, 2020, 3:52pm UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469/1 "2020-07-16T15:52:03Z")

</div>

I am trying to draw a THStack on a server I’m working on, but when I use the “pfc” command it just smooths out the histogram and does not use any colors of any sort. However, when I draw the same stack on my local machine, it draws exactly as it shows on the THStack Class Reference page. Is there some sort of options that the server has that I’m not aware of? If so, how do I change it for my code?

Below is the code and the relevant files. (The file out.pdf was created on my mac, while out\_server.pdf was created on the server.) Thank you very much for your help!

```auto
void DrawStack(){
	TCanvas *c = new TCanvas("c", "Histogram Canvas");
	c->cd();
	
	TFile *out = new TFile("in.root");
	THStack *hists = (THStack*)out->Get("hists");
	hists->Draw("pfc nostack");
	c->BuildLegend();
	
	c->SaveAs("out.pdf");
	out->Close();
}

```

[out\_server.pdf](https://root-forum.cern.ch/uploads/short-url/uilf5o2mHumBbsplUjbOxLHDZuG.pdf) (31.1 KB) [out.pdf](https://root-forum.cern.ch/uploads/short-url/1Oq3ehc90M7Pp8vVRaglgF639mm.pdf) (17.5 KB)  
[in.root](https://root-forum.cern.ch/uploads/short-url/oA2cIvKxfjSPy7Zhjpw0tbaKB6d.root) (4.8 KB)

* * *

_ROOT Version:_ Local: 6.22/00; Server: 6.02/05  
_Platform:_ Local: macOS; Server: Linux  
_Compiler:_ g++

* * *

---

<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:** [July 17, 2020, 11:17am UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469/2 "2020-07-17T11:17:09Z")

</div>

Actually, the server is not doing anything extra, it is doing what you asked in the Draw line: by default, the histos are not filled with colour (you have to call SetFillColor), while the options “p” and “c” stand for “marker” and “curve” (and I don’t think “f” is a valid option here); see the [documentation](https://root.cern/root/html606/classTHistPainter.html).  
So your machine is the one doing extra formatting. Maybe you have a .rootrc file (check your home, and the folder with the macro), or there’s another part in your code (not shown in your post) that changes the formatting style.

---

<div class="post-metadata">

**Author:** ![jemarq04](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jemarq04](https://root-forum.cern.ch/u/jemarq04)\
**Post date:** [July 17, 2020, 2:31pm UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469/3 "2020-07-17T14:31:04Z")

</div>

I was following the directions from an earlier forum topic that pointed here [https://root.cern/doc/master/thstackpalettecolor\_8C.html](https://root.cern/doc/master/thstackpalettecolor_8C.html) for drawing THStacks with automatic color palettes and used the “pfc nostack” option when drawing.

I did try to omit the “f” option while running on my local machine, and oddly enough it makes it look exactly like the one on the server. Is there a way to find out when these features were added to ROOT? It may be possible that since the server has a slightly older version that this option is not yet added.  
Edit: I forgot to mention, I also do not have a .rootrc file in my home directory or with the macro.

---

<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:** [July 18, 2020, 5:28am UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469/4 "2020-07-18T05:28:49Z")

</div>

Ah, right. The “pfc” option was [introduced](https://root.cern.ch/doc/master/classTHistPainter.html#HP061) in 6.09/01. So the version on the server is older than that. You will need to update it, or do the formatting manually (using SetFillColor for each histogram, as I mentioned before).

---

<div class="post-metadata">

**Author:** ![jemarq04](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/cc9497/32.png) [@jemarq04](https://root-forum.cern.ch/u/jemarq04)\
**Post date:** [July 18, 2020, 4:13pm UTC](https://root-forum.cern.ch/t/drawing-thstack-with-pfc-option-appears-differently-on-server/40469/5 "2020-07-18T16:13:36Z")

</div>

Ahh, gotcha. Thank you very much for your help!
