/MplColormapsCpp

Simple header-only library allowing to generate Matplotlib colormaps

Primary LanguageC++Creative Commons Zero v1.0 UniversalCC0-1.0

MplColormapsCpp

MplColormapsCpp offers easy access to use the infamous Matplotlib Colormaps.

The functionality is implemented in C++17 as header only lib.

Available colormaps are:

  • Viridis
  • Inferno
  • Magma
  • Plasma

The colormaps may be used as follows:

#include <mpl_colormaps/mpl_colormaps.hpp>

void Example()
{
  std::array<float, 3> rgb_viridis = mpl_colormaps::MapViridis(0.5F);
  std::array<float, 3> rgb_inferno = mpl_colormaps::MapInferno(1.F);
  /*...*/
}

License

The same as the colormaps themselves, CC0 Public Domain.