Skip to content
Snippets Groups Projects
user avatar
Rene Brun authored
     virtual void       SetShowProjectionX() = 0;
     virtual void       SetShowProjectionY() = 0;
  by one single function working for TH2 and TH3
    virtual void       SetShowProjection(const char *option) = 0;

-In THistPainter add the following functions:
    virtual void       SetShowProjection(const char *option);
    virtual void       ShowProjectionX(Int_t px, Int_t py);
    virtual void       ShowProjectionY(Int_t px, Int_t py);
    virtual void       ShowProjection3(Int_t px, Int_t py);

-In THistPainter.cxx implement the new function
    void THistPainter::ShowProjection3(Int_t px, Int_t py)
        // Show projection (specified by fShowProjection) of a TH3
        // The drawing option for the projection is in fShowOption.

-In TH3, add the new function:
    void TH3::SetShowProjection(const char *option)
      // When the mouse is moved in a pad containing a 3-d view of this histogram
      // a second canvas shows a projection type given as option.
      // To stop the generation of the projections, delete the canvas
      // containing the projection.
      // option may contain a combination of the characters x,y,z,e
      // option = "x" return the x projection into a TH1D histogram
      // option = "y" return the y projection into a TH1D histogram
      // option = "z" return the z projection into a TH1D histogram
      // option = "xy" return the x versus y projection into a TH2D histogram
      // option = "yx" return the y versus x projection into a TH2D histogram
      // option = "xz" return the x versus z projection into a TH2D histogram
      // option = "zx" return the z versus x projection into a TH2D histogram
      // option = "yz" return the y versus z projection into a TH2D histogram
      // option = "zy" return the z versus y projection into a TH2D histogram
      // option can also include the drawing option for the projection, eg to draw
      // the xy projection using the draw option "box" do
      //   myhist.SetShowProjection("xy box");
      // This function is typically called from the context menu.

 Note that this function is only partially implemented. It works only for the option "xy".
 It is included in CVS as a framework for additional developments. see
       http://root.cern.ch/phpBB2/viewtopic.php?t=3289


git-svn-id: http://root.cern.ch/svn/root/trunk@14609 27541ba8-7e3a-0410-8455-c3a389f83636
5b71196f
History
Name Last commit Last update
..