https://github.com/objectprofile/numericscales
Numerical scales for Pharo
https://github.com/objectprofile/numericscales
Last synced: 3 months ago
JSON representation
Numerical scales for Pharo
- Host: GitHub
- URL: https://github.com/objectprofile/numericscales
- Owner: ObjectProfile
- License: mit
- Created: 2019-08-18T22:25:56.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-12T11:59:41.000Z (almost 2 years ago)
- Last Synced: 2025-01-19T14:22:03.106Z (5 months ago)
- Language: Smalltalk
- Homepage:
- Size: 140 KB
- Stars: 5
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Numeric Scales
[](https://github.com/ObjectProfile/NumericScales/actions/workflows/runTests.yml)Simple scales for numbers, points and colors.
NumericScales is an essential component used by [Roassal3](https://github.com/ObjectProfile/Roassal3).- [Installation](#installation)
- [Quick start](#quick-start)
- [Contact](#contact)## Installation
Execute the following incantation in a Playground:
```Smalltalk
Metacello new
baseline: 'NumericScales';
repository: 'github://ObjectProfile/NumericScales/src';
load.
```To add NumericScales to your baseline:
```Smalltalk
spec package: 'NumericScales'with: [
spec repository: 'github://ObjectProfile/NumericScales/src' ].
```## Quick start
The entry point is `NSScale` the package `NumericScales` contains a collection of Scales that you can use to your project, like: linear, log, pow, ordinal and polylinear.
```Smalltalk
scale := NSScale linear
domain: { 0. 100};
range: { 'red'. 'blue' }.
scale scale: 100.
"Color blue"scale scale: 0.
"Color red"scale scale: 50.
"Half way between red and blue"
```## Documentation
You can find more information here
* [User documentation](documentation/UserGuide.md)
## ContactIf you have any questions or problems do not hesitate to open an issue.