diff --git a/doc/getting_started/index.rst b/doc/getting_started/index.rst index 1ea125b..ad64008 100644 --- a/doc/getting_started/index.rst +++ b/doc/getting_started/index.rst @@ -27,14 +27,28 @@ in two formats: ..., \[1.0,1.0,1.0\] \], 256) Import colorcet and use the new colormaps anywhere you would use a -regular colormap. For instance:: +regular colormap. + +**Matplotlib**:: import numpy as np - import matplotlib.pyplot as plt import colorcet as cc + import matplotlib.pyplot as plt + xs, _ = np.meshgrid(np.linspace(0, 1, 80), np.linspace(0, 1, 10)) plt.imshow(xs, cmap=cc.cm.colorwheel); # use tab completion to choose +**Bokeh**:: + + import numpy as np + import colorcet as cc + from bokeh.plotting import figure, show + + xs, _ = np.meshgrid(np.linspace(0, 1, 80), np.linspace(0, 1, 10)) + p = figure(x_range=(0, 80), y_range=(0, 10), height=100, width=400) + + p.image(image=[xs], x=0, y=0, dw=80, dh=10, palette=cc.fire) # use tab completion to choose + show(p) If you have any questions, please refer to the `User Guide <../user_guide/index>`_ and if that doesn't help, feel free to post an issue on GitHub, question on stackoverflow, diff --git a/examples/assets/images/fire.png b/examples/assets/images/fire.png new file mode 100644 index 0000000..ff23409 Binary files /dev/null and b/examples/assets/images/fire.png differ diff --git a/examples/assets/images/fire_rainbow.png b/examples/assets/images/fire_rainbow.png deleted file mode 100644 index 56576c8..0000000 Binary files a/examples/assets/images/fire_rainbow.png and /dev/null differ diff --git a/examples/assets/images/hot.png b/examples/assets/images/hot.png new file mode 100644 index 0000000..cae4c14 Binary files /dev/null and b/examples/assets/images/hot.png differ diff --git a/examples/assets/images/hot_jet.png b/examples/assets/images/hot_jet.png deleted file mode 100644 index 8791200..0000000 Binary files a/examples/assets/images/hot_jet.png and /dev/null differ diff --git a/examples/assets/images/jet.png b/examples/assets/images/jet.png new file mode 100644 index 0000000..3c4e8b1 Binary files /dev/null and b/examples/assets/images/jet.png differ diff --git a/examples/assets/images/rainbow.png b/examples/assets/images/rainbow.png new file mode 100644 index 0000000..cae0371 Binary files /dev/null and b/examples/assets/images/rainbow.png differ diff --git a/examples/index.ipynb b/examples/index.ipynb index fa7acac..a76c5be 100644 --- a/examples/index.ipynb +++ b/examples/index.ipynb @@ -19,7 +19,7 @@ "## Background\n", "Apart from the four [uniform colormaps now provided with\n", "matplotlib](http://matplotlib.org/users/colormaps.html), most\n", - "colormaps shipping with Python plotting Python programs are highly\n", + "colormaps shipping with Python plotting programs are highly\n", "perceptually nonuniform. That is, small changes in data values\n", "result in large changes in the perceptual appearance of the\n", "corresponding colors, or vice versa. For instance, the popular matplotlib\n", @@ -27,7 +27,7 @@ "colors change imperceptibly, such as the yellow region in \"hot\" and\n", "the cyan/green region in \"jet\":\n", "\n", - "![hot/jet](assets/images/hot_jet.png) \n", + "![hot](assets/images/hot.png) ![jet](assets/images/jet.png)\n", "\n", "When colormaps are used for visualizing scientific datasets, these\n", "perceptual nonlinearities can make interpretation of this data very\n", @@ -44,7 +44,7 @@ "perceptually uniform versions of the above colormaps are called \"fire\"\n", "and \"rainbow\" in this package:\n", "\n", - "![fire/rainbow](assets/images/fire_rainbow.png)\n", + "![fire](assets/images/fire.png) ![rainbow](assets/images/rainbow.png)\n", "\n", "You should be able to see the differences right away, revealing more\n", "detail, more faithfully than if you use non-uniform maps. For\n",