jsROOT data points not displayed

Hi all

We are observing a situation where a data point is not displayed in jsROOT canvas. In this link (https://narayan.web.cern.ch/narayan/jsroot/) you can a PNG version as well as jsROOT version of the same canvas. One of the point on bottom left (which can be clearly seen in PNG plot) is not displayed in the jsROOT display. Can this be fixed

Cheers

Rohin

@linev can help you with this.

Hi Rohin,

Can you provide your data as separate file - JSON or ROOT?

Regards,
Sergey

Hi Sergey

I can provide a json file https://narayan.web.cern.ch/narayan/jsroot/test.json

Cheers

Rohin

Hi Rohin,

If you just zoom inside the range with missing point it will appear.

It is side effect of drawing optimization.
Not all points of histogram or profile are drawn when there are many of them.
Actually, this optimization algorithm is not correct when markers are drawn - same TProfile drawn with “hist” option looks reasonable.

I will check that can be done.

Regards,
Sergey

Hi Sergey

It would be great if the optimization algorithm can handle the point as well correctly. Often (not in this particular case) we compare a nominal as well as a reference in these kind of plots, where the reference is draw with “HIST” option and the nominal is drawn as points. If we miss out the points, that would raise false alarm. We would really like the optimization algorithm to create an exception for these kind of situations

Cheers

Rohin

I understand the error now and will try to fix it

1 Like

Hi Rohin,

I fix problem in dev and master branch:

http://jsroot.gsi.de/dev/?json=../files/tmp/test.json.gz

I keep optimization, but show maximal and minimal bin for each display pixel.
I will try to make bugfix release next week - once @bellenot is back.

Regards,
Sergey

Hi Sergey

Thanks so much for this quick fix. May I ask If you could propagate the changes to root https://root.cern.ch/js/dev/ as well

Cheers

Rohin

Hi Rohin,

This only can be done by @bellenot
He will be back next week.

Regards,
Sergey

@bellenot Could you please cherry pick these fixes to the root.cern.ch dev branch

cheers

Rohin

Hi,

Done. Sorry for the delay

Cheers, Bertrand.

Thanks Bertrand

Cheers

Rohin

1 Like

Hi @linev

We see another issue after this fix. The points separate into bands depending on the zoom level of the plot. For example. These are the screenshots of the same plot at different Canvas Zoom level.


  1. 2)

Cheers

Rohin

Hi Rohin,

This is kind of intended behavior - JSROOT detects min/max values for each screen pixel and draw them.
All other points are discarded. Therefore displayed points depends from zooming factor.

Probably, I need to provide method to draw all points.

Regards,
Sergey

Hi Rohin,

I made more logic in the code.
Now optimization will be used only when more than 50000 bins need to be drawn,
otherwise all markers and all error bars will be shown as is.

Regards,
Sergey

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.