GithubHelp home page GithubHelp logo

Comments (5)

mdsumner avatar mdsumner commented on July 28, 2024

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.

 avatar commented on July 28, 2024

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.

mdsumner avatar mdsumner commented on July 28, 2024

Gee didn't think of that, colour the factor index - need to explore 👍

from colourvalues.

 avatar commented on July 28, 2024

@mdsumner I haven't looked at this issue since my last comment; is this still relevant for you?

from colourvalues.

mdsumner avatar mdsumner commented on July 28, 2024

oh no, I built it into palr which is a better fit I think, can just close

from colourvalues.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.