I have problems with negative values in 2D histograms as well with TGraph2D. I am using ROOT5 on a Redhat 8 Linux-intel box.
I would like to see negative values under the z=0 plane but couldn’t manage to do that.
For example, in 2D histograms, positive values should be drawn upwards and negative values downwards. This is the way Mathematica does it for instance.
Does anybody know how to do this in ROOT and even if it is possible?
I wouldn’t find any answer in the manual.
Thanks for your help
You did not tell what kind of representation you are using. Is it LEGO SURF BOX COL … ?
We have recently introduced the option BOX1 making the difference between + and - values. Can you give an example showing what you are doing ?
[quote=“couet”]You did not tell what kind of representation you are using. Is it LEGO SURF BOX COL … ?
We have recently introduced the option BOX1 making the difference between + and - values. Can you give an example showing what you are doing ?[/quote]
Sorry about the lack of picture last time. I have attached one that shows you what I would like to do (similar to Lego plot) with positive and negative values.
Ok, that’s LEGO plots. ROOT lego plots do not allow such representations. But surface plots do. (option SURF suite)
Too bad! Having an histogram view is somehow "niceré to look than with the surface plot. Do you know if there is a plan to have the view I would like? It seems to be commonly used in matlab, mathematica and excel.
We have plans to use openGL to render legos and surfaces. That kind of option can be included. I do not know how difficult/easy it is to do it with the current implementation of LEGOs. I should have a close look to evaluate.
The fix was easy. Now (in the CVS head) the LEGO optionS behave as you wish.
I checked the CVS head and tried the changes you made. That is exactly what I wanted, thanks.
This feature does not work with ROOT_5.16 anymore.
I reinstalled ROOT_5.14, it works !
TH2D *h =new TH2D ("h","h",2,0,2,2,0,2)
Thanks for patching.
Olivier will investigate this problem once he will be back
TH2D *h =new TH2D ("h","h",2,0,2,2,0,2);
In order to be compatible with the 1D histograms representation, the kind of plot you want is now obtained when you set the option:
Next time I’ll have a look to the release notes first