Projection of a TH2F along a rotated axis

I’m familiar with TH2F::ProjectionX(), etc. Is it possible to project a TH2F along an axis that is not X or Y, or is this relegated to the user? Seems like there might be some interesting binning issues involved, but nonetheless…

I need this, as I histogram one quantity versus the next, and would like to be able to project the histogram along the diagonal, including cuts (see attached gif, for an example of the data I’m trying to project).

A projection with transformation is not implemented. However the solution is to start from a ntuple/Tree and generate directly the scatter-plot with the right variables.
If you have a TTree T with variables x,y,z, you can do, eg

T.Draw("y:x","z<0"); T.Draw("cos(pi/4)*x+sin(pi/4)*y:-sin(pi/4)*x+cos(pi/4)*y");
Rene

right, that works great, and it’s simple. thanks