Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hplot: properly handle hstacks with bands and log-y #750

Merged
merged 1 commit into from
Jun 5, 2020

Conversation

sbinet
Copy link
Member

@sbinet sbinet commented Jun 5, 2020

Fixes #749.

@sbinet
Copy link
Member Author

sbinet commented Jun 5, 2020

@rmadar this fixes your issue.
but uncovers a new one: notice the gray band over the empty bin, on the lower left tile plot (around -6)?

it would seem we may need to change how we draw H1D.Band.
instead of reusing hplot.Band, we may need to introduce a dedicated plotter (probably one that is just a bunch of polygons)

@codecov
Copy link

codecov bot commented Jun 5, 2020

Codecov Report

Merging #750 into master will increase coverage by 0.02%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #750      +/-   ##
==========================================
+ Coverage   71.55%   71.58%   +0.02%     
==========================================
  Files         384      384              
  Lines       49103    49111       +8     
==========================================
+ Hits        35135    35155      +20     
+ Misses      11709    11699      -10     
+ Partials     2259     2257       -2     
Impacted Files Coverage Δ
hplot/h1d.go 93.37% <100.00%> (+0.12%) ⬆️
hplot/hstack.go 80.50% <100.00%> (+7.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4cf183c...24781f7. Read the comment docs.

@rmadar
Copy link
Member

rmadar commented Jun 5, 2020

OK I noticed the problem around -6, indeed. You mean that error band of histograms would need to be a different type than hplot.Band, at least for the plotting side?

Since we are about modifying error band of histograms, I had a suggestion in mind for a while (I might open a new issue if that's tricky): would it be possible to have hatched areas instead of full colored area? This looks way nicer for such a band:
image

@sbinet
Copy link
Member Author

sbinet commented Jun 5, 2020

OK I noticed the problem around -6, indeed. You mean that error band of histograms would need to be a different type than hplot.Band, at least for the plotting side?

yep.
hplot.ErrBand ? with, at its core, a []plotter.Polygon.

Since we are about modifying error band of histograms, I had a suggestion in mind for a while (I might open a new issue if that's tricky): would it be possible to have hatched areas instead of full colored area? This looks way nicer for such a band:

that's gonum/plot#564

@sbinet sbinet merged commit 24781f7 into go-hep:master Jun 5, 2020
@sbinet sbinet deleted the issue-749 branch June 5, 2020 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

hplot/hstack: possible issue with LogY hstack
2 participants