Installation ################### Prerequisites =============== You will need to install `Python `_ (linux and mac users should have it installed already). We recommend also to install `ipython `_, which provides a more flexible shell alternative to the python shell itself. **colormap** requires **matplotlib** and **easydev**, which are available on pypi and installed automatically with this package. Installation ================ Since **colormap** is available on `PyPi `_, the following command should install the package and its dependencies automatically:: pip install colormap Examples ########## Using the :class`~colormap.colors.Colormap` class ===================================================== Create your own colormap from red to green colors with intermediate color as whitish (diverging map from red to green): .. plot:: :include-source: :width: 60% from colormap import Colormap c = Colormap() mycmap = c.cmap_linear('red', 'white', 'green(w3c)') c.test_colormap(mycmap) Using the aliases ===================================================== Without creating an instance of **Colormap**, you can use these functions: .. plot:: :include-source: :width: 60% from colormap import cmap_builder, test_cmap mycm = cmap_builder('red', 'black', 'yellow') test_cmap(mycm) Visualise set of colormap ============================= Another convenient feature is to look at a set of colormaps altogether:: c = Colormap() c.plot_colormap('diverging') .. image:: ../images/colormaps.png :width: 40% :align: center Other set names are: - sequentials2, - misc - diverging - diverging_black - qualitative See user guide for details. User guide ################## .. toctree:: :maxdepth: 2 :numbered: quickstart.rst Reference Guide ################## .. toctree:: :maxdepth: 2 :numbered: references