Comments (5)
Actually, having zlim
as well would be awesome, so that we can easily control the absolute scale without specifying breaks - I'll have a closer look at how this might fit in colourvalues
from colourvalues.
I see now that it's a colourvalues-like function, but maybe only the addition of the breaks argument and control to colour_values()?
In the absence of directly supporting a breaks
argument, you can supply the "cuts" directly
colourvalues::colour_values( cut(1:20, breaks = 3) )
[1] "#440154FF" "#440154FF" "#440154FF" "#440154FF" "#440154FF" "#440154FF" "#440154FF" "#21908CFF" "#21908CFF"
[10] "#21908CFF" "#21908CFF" "#21908CFF" "#21908CFF" "#FDE725FF" "#FDE725FF" "#FDE725FF" "#FDE725FF" "#FDE725FF"
[19] "#FDE725FF" "#FDE725FF"
colourvalues::colour_values_rgb( cut(1:20, breaks = 3) )
[,1] [,2] [,3] [,4]
[1,] 68 1 84 255
[2,] 68 1 84 255
[3,] 68 1 84 255
[4,] 68 1 84 255
[5,] 68 1 84 255
[6,] 68 1 84 255
[7,] 68 1 84 255
[8,] 33 144 140 255
[9,] 33 144 140 255
[10,] 33 144 140 255
[11,] 33 144 140 255
[12,] 33 144 140 255
[13,] 33 144 140 255
[14,] 253 231 37 255
[15,] 253 231 37 255
[16,] 253 231 37 255
[17,] 253 231 37 255
[18,] 253 231 37 255
[19,] 253 231 37 255
[20,] 253 231 37 255
Is this along the lines of what you're after?
from colourvalues.
Gee didn't think of that, colour the factor index - need to explore 👍
from colourvalues.
@mdsumner I haven't looked at this issue since my last comment; is this still relevant for you?
from colourvalues.
oh no, I built it into palr which is a better fit I think, can just close
from colourvalues.
Related Issues (20)
- get_palette() - return hex HOT 3
- IntegerVector vs NumericVector
- color_values() modifying global environment? HOT 3
- update to cardinal_cubic_b_spline.hpp
- normalise colours
- remove Boost HOT 2
- size_t -> R_xlen_t
- interleaved RGBA vector
- remove local interpolation .hpp file
- support interleave
- List input - n_summaries
- include_alpha = FALSE still returns alpha for NA values HOT 4
- validate na_colour hex input
- interleaved - matrix palettes HOT 1
- ASAN memory leak HOT 2
- Issue generating colors for some palettes HOT 5
- integer64 support
- templates
- Compatibility with older versions of boost HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from colourvalues.