-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for TProfile and TProfile2D projectionX and projectionXY options in JSROOT #15851
Comments
Different kinds of projections are implemented for JSROOT. Like: http://root.cern/js/latest/examples.htm#th2_projx1 It is functionality which is similar to In principle, it also works with That kind of functionality you are missing? |
For example, we are missing the functionality that would show the following histogram:
Where OPT and DRAWOPT are somehow to be determined. OPT can be one of: "" |
Do I understand you correctly - you want to have new Main question - do you want to have such projections only for visualization or it make sense implementing them in If methods have to be implemented in C++ classes - probably this should be done first and then |
The use case is that in ATLAS experiment we use JSROOT for display of detector monitoring plots, which include things like efficiency plots that exist as TProfile or TProfile2D. It would be nice to have a way in JSROOT to view the denominator distribution for such a plot, which is obtained from the ProjectionX or ProjectionXY method with the "B" option. I think this is about visualization in JSROOT. If we had a C++ or python prompt we know what we need to do to view the projection. I just want to have a way to do that just with a JSROOT draw option |
Now I found I need to think how graphically implement it. |
Since it's a 2d projection, I would have said you could either view it side-by-side with the original, or you could just this as a different draw option that's unique to tprofile2d. I was imagining the latter, where I see you have the "proj" submenu already, and I would have added options there for each of the options of "projectionxy". And similarly for TProfile::ProjectionX. But then there is the question of how you would control the option that THAT histogram displays with. Here I can see the benefit of what you propose that it displays the "projection" side-by-side with the original plot. Then you can use the context menu of the projection to change the draw style of it. |
I implement several new draw options for Example: https://jsroot.gsi.de/dev/examples.htm#tprofile2d_projxyb I only skipped option 'e' while it makes no big sense - error just remain as is. JSROOT does not modify histogram but just manipulates internally Same kind of projection I will provide for |
Many thanks, this looks super helpful for us because it will save us having to save the bin entries as a separate histogram for our monitoring framework (which displays monitoring plots with JSROOT). |
I add https://jsroot.gsi.de/dev/examples.htm#tprofile_projxb and special 'b' draw option for https://jsroot.gsi.de/dev/examples.htm#tefficiency_b |
Thank you! For the TEfficiency, is it possible to add that draw option to the context menu of the TEfficiency? I note at the moment there is in fact no context menu for TEfficiency (if I select it from the list of drawn primitives, no menu is displayed). Adding a way to switch between the different draw options of TEfficiency through such a context menu is what we ultimately would prefer. Is that possible to do? |
|
I made first prototype of redrawing https://jsroot.gsi.de/dev/examples.htm#tefficiency_docu1 You can access |
1. TProfile and TProfile2D projections root-project#15851 2. Draw total histogram from TEfficiency when draw option starts with 'b' 3. Let redraw TEfficiency, THStack and TMultiGraph with different draw options via hist context menu 4. Support 'pads' draw options for TMultiGraph, support context menu for it 5. Internals - do not select pad (aka gPad) for objects drawing, always use assigned pad painter 6. Fix - properly save zoomed ranges in drawingJSON() 7. Fix - properly redraw TMultuGraph
1. TProfile and TProfile2D projections #15851 2. Draw total histogram from TEfficiency when draw option starts with 'b' 3. Let redraw TEfficiency, THStack and TMultiGraph with different draw options via hist context menu 4. Support 'pads' draw options for TMultiGraph, support context menu for it 5. Internals - do not select pad (aka gPad) for objects drawing, always use assigned pad painter 6. Fix - properly save zoomed ranges in drawingJSON() 7. Fix - properly redraw TMultuGraph
Now functionality in JSROOT and ROOT master |
This works really nicely! Thanks for adding all this functionality, I'm looking forward to rolling it out to our monitoring framework |
Hi @linev, It appears this issue is closed, but wasn't yet added to a project. Please add upcoming versions that will include the fix, or 'not applicable' otherwise. Sincerely, |
1. TProfile and TProfile2D projections root-project#15851 2. Draw total histogram from TEfficiency when draw option starts with 'b' 3. Let redraw TEfficiency, THStack and TMultiGraph with different draw options via hist context menu 4. Support 'pads' draw options for TMultiGraph, support context menu for it 5. Internals - do not select pad (aka gPad) for objects drawing, always use assigned pad painter 6. Fix - properly save zoomed ranges in drawingJSON() 7. Fix - properly redraw TMultuGraph
Feature description
The projection methods of profile plots (TProfile::ProjectionX and TProfile2D::ProjectionXY) have a bunch of useful options that allow us to visualize useful features like the RMS in each bin, or the sum of weights, or the number of entries in each bin.
I would like to propose that a new context submenu be added to JSROOT for profile plots, or at least a lot more options appear under the "proj" submenu for these plot types. All the different options from these two methods should be available (the options are the same between TProfile and TProfile2D). I actually dont know what the existing options under the "proj" submenu even do, to be honest?
Alternatives considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: