-
Notifications
You must be signed in to change notification settings - Fork 32
Feature: HeatMap, Histogram2D and ColorScales #142
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
Conversation
|
Hi @vokimon, thanks for contributing this, it looks very good. As far as testing the graphical output, there aren't any tests yet. But testing the purely numerical parts is a good idea. Usually during development what I do is |
|
I am trying the instructions in the sample repository to build the example but gradle takes the published version of the library without heatMap and even without AxisContent. How do you force gradle to use the local version of the library? |
|
Since 0.11.0-dev.1 has been published to Maven Central, there are 3 steps to take:
Now when you build koalaplot-samples, it'll pick up your unreleased local version from your local maven repository. |
ae3b14d to
bb2bc2e
Compare
bb2bc2e to
b249928
Compare
|
@gsteckman I just pushed the example into the samples repo. KoalaPlot/koalaplot-samples#7 I also did some changes to this PR:
Being generic you could use lerp/normalize on other parts of the library doing linear projections. So now, on my part, the PR is ready, unless you point me out things to fix. |
b249928 to
7944f25
Compare
src/commonMain/kotlin/io/github/koalaplot/core/heatmap/HeatMapPlot.kt
Outdated
Show resolved
Hide resolved
This generic implemantation centralizes domain mapping logic.
Histogram2D: make 2 parameters optional to fullfill <6 mandatory arguments Supress Magic numbers Supress multiple continue ktlint Formatting
It avoids multiple continue linter error by turning them into returns in the extracted function.
24a8085 to
e5521ac
Compare
gsteckman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution!
This PR adds:
HeatMapPlot: a new XY plot that displays Z values in color for evenly X and Y spaced objects.generateHistogram2D: A data preparation functionwhich takes X,Y samples and aggregates the count in discrete X, Y bins.discreteColorScale,linearColorScale,divergentColorScale: A set of convenience color scales to map from values to color and can be used with HeatMapPlotBefore integration i would like to ask you for guidance to adhere to standards in the project and other issues being new to the project but also to kotlin.
Color scales and the histogram are TDD'ed, so they have full testing coverage. HeatMapPlot has no test yet. I would need some help with that if they are required.
The branch currently includes a commit with an example and modifications in the
build.gradlethat are not intended to be in the final PR but have been useful to user test the whole thing. Indeed it could be nice to have something like that example in the samples repository. How to proceed?