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

Proposal: allow also absolute spot scaling for AreaSpots? #212

Open
mpilgrem opened this issue Aug 22, 2019 · 0 comments
Open

Proposal: allow also absolute spot scaling for AreaSpots? #212

mpilgrem opened this issue Aug 22, 2019 · 0 comments

Comments

@mpilgrem
Copy link

Currently, AreaSpots allows the relative scaling of the size of spots through:

 _area_spots_max_radius :: Double  -- the largest size of spot

I found myself needing to scale the size of spots in absolute terms (so that the size of spots in different plots was consistent). I have done that in a fork, with a change to the API. Would that be of interest? If yes, I'll make a pull request.

I introduce:

_area_spots_scale :: [z] -> z -> Double -- a function that maps a z value to the radius of the spot

and two functions:

areaSpotsScaleMaxRadius :: PlotValue z
                        => Double  -- the largest radius of spot
                        -> [z] -> z -> Double

(which replicates what _area_spots_max_radius provides) and:

areaSpotsScale :: PlotValue z
               => Double  -- the scaling factor from toValue z to the radius of spot
               -> [z] -> z -> Double

(where the first argument is an absolute scaling factor).

The default of 'areaSpotsScaleMaxRadius 20.0' is retained.

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

No branches or pull requests

1 participant