Skip to content

Commit

Permalink
Fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
cokelaer committed Oct 10, 2023
1 parent e426eb3 commit c4a6068
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 25 deletions.
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Example
mycmap = c.cmap_linear('red', 'white', 'green(w3c)')
cmap = c.test_colormap(mycmap)

.. image:: http://colormap.readthedocs.io/en/latest/_images/index-1.png
.. image:: https://colormap.readthedocs.io/en/latest/_images/quickstart-6.png
:width: 50%
:align: center

Expand All @@ -64,7 +64,7 @@ Example
c = Colormap()
c.plot_colormap('diverging')

.. image:: http://colormap.readthedocs.io/en/latest/_images/colormaps.png
.. image:: https://colormap.readthedocs.io/en/latest/_images/quickstart-4.png
:width: 50%
:align: center

Expand Down
16 changes: 1 addition & 15 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,31 +1,17 @@


|version|, |today|

.. include:: ../README.rst


.. include:: ../../README.rst




User Guide
##################


.. toctree::
:maxdepth: 2
:numbered:

quickstart.rst

Reference Guide
##################


.. toctree::
:maxdepth: 2
:numbered:

references

15 changes: 11 additions & 4 deletions doc/source/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,11 +159,18 @@ Create a linear colormap

The simplest colormap are linear with 3 colors. In such case, we provide a
method that is easy to use. Imagine you want a colormap from red to green with
white color in between::
white color in between:

.. plot::
:include-source:
:width: 80%

from colormap import Colormap
c = Colormap()
cmap = c.cmap_linear('red', 'white', 'green')
cmap = c.test_colormap(cmap)


c = Colormap()
cmap = cmap_linear('red', 'white', 'green')
c.test_colormap(cmap)

Here, we use color names, which are the xfree86 names. However, you could have
used any format accepted by :class:`~colormap.Colors`::
Expand Down
8 changes: 4 additions & 4 deletions doc/source/references.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Reference guide
#################
===================


.. contents::


colors
==========
------------

.. automodule:: colormap.colors
:members:
Expand All @@ -15,10 +15,10 @@ colors


cmap module
==============
---------------
.. automodule:: colormap.get_cmap

xfree86 module
==============
----------------

.. automodule:: colormap.xfree86

0 comments on commit c4a6068

Please sign in to comment.