Hi there,
I have some spectrum data that I want to analyze in a 3D surface plot.
The data has 3 parameters: Time (X), Frequency derived from FFT (Y) and Amplitude (Z) and at least 100k+ data points. There are 3 options that I’ve tried now: TH3, TGraph2D, TH2.
TH3: Drawing is restricted to a single draw option (“A cloud of points is drawn.”) -> doesn’t work in my case
TGraph2D: Only works with less data points, 100k-1000k is too much (histogram instead of graph is necessary, as I don’t want to see every single frequency from 1-1000Hz anyways)
TH2: Works, but I need to fill the TH2F proportional to the Amplitude because I only have 2 parameters in TH2. -> E.g. Amplitude for data point X/Y = 50 -> Fill 50 times with the same X/Y values. Works for my data, but it isn’t satisfying and takes ~15s (for 100k data points). Plot with surf1.
Now I’ve read in this thread (TH1 Weighted Fill. Problem with errors and draw) that a TH1::FillN( double x, int n) option isn’t implemented, so I guess there’s no other way. Maybe using weights could work, but I’m not sure? My code with the TH2 work-around is working fine (few minutes of runtime at max, doesn’t matter that much), but faster is always better
Thanks for your help.