Removing bin borders when using POL draw option

Hi,

I am trying to plot a TH2 using as options "COLZ POL".
I am adding the cartesian axes by hand (as the documentation suggest) and everything works fine.

I am wondering if there’s a way to avoid plotting the black bin borders, since they are hiding the bin content color (I potentially have small bins, an example below).

I haven’t found a way to remove them. Any suggestion? Is it possible?

Thanks,
Simone


ROOT Version: 6.26/04
Built for linuxx8664gcc
From tags/v6-26-04@v6-26-04


I’m not sure that option has been implemented (SetLineWidth and SetLineColor are ignored with POL), but one workaround could be to make and save the canvas or pad (and all text, etc) very big, so that the bin borders are relatively thin, then when you resize down the image it may look better (but I haven’t tested it).

I need to check.

Good point. This PR fixes it: The line color for "COL POL" can be changed by couet · Pull Request #11638 · root-project/root · GitHub
This PR will allows you to do:

hpxpy->SetLineColorAlpha(10, 0.)
hpxpy->Draw("colz pol")

And you will get:

1 Like

@dastudillo Indeed it’s a nice workaround! It works decently, thank you!

@couet Thanks for having fixed the issue and quickly submitting this PR!

1 Like
hpxpy->SetLineColorWidth( 0.)

Does the same and is better in case you save the histogram in the root file.

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