JSROOT drawing with Log X option different from that of ROOT

Hello, ROOT developers

JSROOT drawing with Log X option is different from that of ROOT
If possible, could you fix it?


Thanks in advance

Hi,

This problem is fixed now. Result you can see here:

http://web-docs.gsi.de/~linev/js/3.1/index.htm?file=…/files/fillrandom.root+&item=h1f;1&opt=hist;logx

Later today code will be in ROOT repository (there are some other changes).

Thank you for reporting it.

Regards,
Sergey

Hi,
Thank you for a quick fix.

My intention was to monitor FADC pulse and its FFT using JSROOT.

I thought that everyting would go well if Log X drawing issue were solved.
After I applied your fix, I compared ROOTJS drawing to ROOT like this




I suspect too fine binning might cause the difference.

What do you think the difference come from?

I attach root files
fft.root (144 KB)
pulse.root (27.3 KB)

Hi,
I found zooming in shows the exact same drawing as to pulse.


Best regards
Hyunok

Dear Hyunok,

You hit problem with drawing optimization in JSROOT.
Fact is that SVG graphic in browsers extremely slow when drawing line with several thousands points.
Therefore in JSROOT I try to reduce number of drawn points to approx number of pixels.
And my implementation was not perfect, especially for the case of double-log scales.
Now it should work better - please try this:

http://web-docs.gsi.de/~linev/js/3.1/?file=http://root.cern.ch/phpBB3/download/file.php?id=9846+&item=pCh01;1

http://web-docs.gsi.de/~linev/js/3.1/?file=http://root.cern.ch/phpBB3/download/file.php?id=9847+&item=fCh01;1&opt=hist;logx;logy

You could compare performance without optimization:

http://web-docs.gsi.de/~linev/js/3.1/?file=http://root.cern.ch/phpBB3/download/file.php?id=9846+&item=pCh01;1&optimize=0

http://web-docs.gsi.de/~linev/js/3.1/?file=http://root.cern.ch/phpBB3/download/file.php?id=9847+&item=fCh01;1&opt=hist;logx;logy&optimize=0

And when you zoom in, optimization is no longer necessary.
JSROOT just shows all visible points as they are.

Later I will provide fixes in ROOT repository.

Regards,
Sergey

Dear Sergey

I will apply your fix to my daq program afterwards.
Thank you for your quick response again

I have another issue.
I can’t draw histogram with option “p” or “p0”.


I think you can fix the issue easily because drawing with option ‘e’ works well.
I attach macro file used for marker test.

Best regards
httpserver.C (2.67 KB)

Dear Hyunok,

Now ‘P’ and ‘P0’ should work with TH1 class. Like:

http://web-docs.gsi.de/~linev/js/3.1/index.htm?nobrowser&file=…/files/fillrandom.root+&item=h1f;1&opt=P0

Regards,
Sergey

Dear Sergey

Thank you for your sincere replies again.
I think your fixes are absolutely helpful to implement my daq program.

Best regards