I’ve been using THStacks without problems before, however I’ve found a behaviour that is confusing me. I want to plot a THStack with the “nostack” option but also the “c” option; that is, the visual result I want is several superimposed lines (not data point markers), and the histograms not added together.
So I tried:
but that didn’t work. I got the “nostack” option, but I have data markers and no lines.
If however I try the following:
I get what the command asks for; that is, summed histograms with a smooth line per histogram. In other words, the “c” option appears to work with “same” but not “nostack” for a THStack.
I’ve had a couple of people look at my code and there doesn’t appear to be anything I am doing to cause this behaviour. I’m afraid I’ve not got a very minimal example, but the code can be found here. I compile and run it with:
Of course if this does turn out to be some stupid error of mine I apologise, but if not my questions are:
is this behaviour known?
is this a feature or a bug?
either way, can I override this behaviour?
As for a solution to my visual problem, I believe I can draw the individual histograms with the “same” option to get the desired effect which I will do. However, that is going to be somewhat inconvenient as it involves changing a lot of code.
I’ve reduced my code to a minimum and I still can’t figure out what on Earth I am doing wrong. As you can see, producing a plot with the “hist c” option works, but “nostack c” does not.
Code and plots can be found here. For convenience here’s the code, followed by the two plots that it makes: