Giter Club home page Giter Club logo

Comments (4)

gha3mi avatar gha3mi commented on June 14, 2024 1

@vmagnin
I have added a Lagrange interpolation function to the Colormap class in a branch. It is recommended to use it for lower orders (i.e., not many control colors) due to the presence of Runge's phenomenon.

from forcolormap.

gha3mi avatar gha3mi commented on June 14, 2024 1

I fixed a bug within the interpolation functions. Now, it ensures that the results are between 0 and 255.

Take a look at this example: I applied interpolation to the bam10 colormap (first colormap) to generate 256 levels using both Bezier (second colormap) and Lagrange (third colormap) methods. The original bam256 is displayed as the last one:

bam10
custom_colorbar_bezier
custom_colorbar_lagrange
bam

The results are not identical, and I did not expect them to be. Both interpolation functions are useful for creating custom colormaps rather than achieving exact matches.

from forcolormap.

vmagnin avatar vmagnin commented on June 14, 2024

The results are not identical, and I did not expect them to be. Both interpolation functions are useful for creating custom colormaps rather than achieving exact matches.

Yes, very close, although by switching between two tabs I can see that in the last one the green is darker at the right extremity.

from forcolormap.

gha3mi avatar gha3mi commented on June 14, 2024

Maybe 10 colors are not sufficient. It might be more accurate if additional colors are employed.

from forcolormap.

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.