TH2D Contour Plot undesired 'white lines' grid overlay

Dear ROOTers,

I am trying to draw a contour plot for inclusion in a LaTeX document. The plot looks fine in ROOT and when saved as a GIF, but when I save as an EPS, a fine uneven grid of white lines appears. There are also these lines in the palette scale.

This is visible both in evince and adobe PDF 8.

I have attached the figure as an example.

Is there any way to avoid this? Alternatively, is there a way to avoid blurring the text when I put it into my LaTeX document in GIF or some other form?

As a side note, (using a logarithmic scale) when I set the scale manually (SetRangeUser) of any graph, I can’t get the scale to go from `0’ as it would appear to if I had not set the scale. Is there any way to get the behavior that ROOT has for the lower end of the scale by default, whilst setting the upper scale manually?

This is relevant because I wanted to set the top end of the scale of the attached picture manually so that it may be compared to other graphs, but by setting the bottom end, the entire plot becomes purple, instead of the white that it was before modifying the scale.


I see the thin lines you are talking about when I visualize your file using gv with the antialiasing turned on. Antiliasing in gv is buggy, turn it off typing typing “a” in the gv window. Then the image is correct.

It seems to be a problem with faulty renderers. It did in fact print perfectly.

I did on my way save to SVG and open it up in inkscape, where the same problem is observable. I was curious that the picture is formed of lots of squares, which seems quite inefficient in the context of SVG where you could have arbitrary polygons. I wonder if such polygons are possible in EPS and whether they would reduce the file size?


  • Peter

In PS we have already a special clase to save images (bitmap) but that’s not use in the color plots case because not all the boxes are paint (empty bins are not painted), so boxes are painted one by one. It is the same with SVG.