Colored 2D histograms in pdf output

OK, I get it. But somehow the fAlpha=1 bins look bigger than the fAlpha < 1 ones.
I thought that this was due to the stroke…
Can you see this?
And yes, there is not this “smooth” option present in Preview.app anymore.
And yes, previewing with “space” directly from finder did not show the issue.

You mean that without the stroke they still looks bigger ?
Btw how do you check they looks bigger ? with the example you send it is hard to tell …

Yes, after implementing your changes, recompiling and re-drawing this is what I get:



You can see that directly from the pdf that I posted by zooming into this area.

Hi Alberto,

Sorry I am a bit lost now … are you saying that the fix I provided introduces a new problem ???

Hi Alberto,

I understand the artefact when you change w to 0.2.
Doing you remove two characters compare t the previous version and the first parameter
should be changed also. If you do:

      if (fAlpha == 1) PrintFast(15," q 0.2 w [] 0 d");

(15 instead of 17 as 1st parameter) then the artefacts go away.
Can you try in your example if that is fine for you ?
if yes we can try to find what is the smallest working value and we do the change.

Hi Olivier,

That’s right, thanks! I only understood later that the number in PrintFast(15," q 0.4 w [] 0 d"); made reference to the number of characters in the string…
Now, with a value of 0.4 w, and the correct number of characters, the plots look good with no strange artefacts.
palettes.pdf (181 KB)
Summarising: For the new Preview.app (is MAC OS X Sierra) the stroke width has to be increased from 0.002 to 0.4 to recover the previous behaviour. The change does not seem to have an impact when using other viewers (e.g. Adobe reader). So at least for myself I will change these values in my local root.

We still have the problem of visualising 2D “col” histograms when there is a transparency defined (fAlpha <1).
In this case the stroke is not drawn (it breaks transparency) and therefore, the white lines appear in Preview.app.

By the way I wrote this post in the apple community forums:
discussions.apple.com/message/30887060#30887060

I would suggest that any of you concerned about this rendering problem visit the post and click on “I have this question too”.
Let’s see if can have some response from Apple and other mac users.
Cheers!

HI Alberto,

So I will put the stoke width equal to 0.4
Yes transparent a palette is still an issue and I have no solution for that.
Note that it is ok when the bins are not as small as yours…
Thanks for the report to Apple. I clicked on “I have this question too”

Cheers,

Thanks!
The white lines are equally visible when the size of the bin is bigger.
It is only that there are less lines because there are less bins…
Check the example with the black rectangles in the post to apple:
desycloud.desy.de/index.php/s/1dFkHkCo9JqGF1S
There are only 3 rectangles there and the “bins” are pretty big. :wink:

Fix committed. Thanks.