internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: bokeh/bokeh

Issue:
Simplify brewer.py example
stacked area chart example - https://bokeh.pydata.org/en/latest/docs/gallery/brewer.html can be simplified in 2 parts.

1. Generation of data
2. `stacked` function

This example can be refactored to.

```python
N = 20
cats = 10
df = pd.DataFrame(np.random.randint(10, 100, size=(N, cats))).add_prefix('y')

def  stacked(df):
    df_top = df.cumsum(axis=1)
    df_bottom = df_top.shift(axis=1).fillna({'y0': 0})[::-1]
    df_stack = pd.concat([df_bottom, df_top], ignore_index=True)
    return df_stack

areas = stacked(df)
colors = brewer['Spectral'][areas.shape[1]]
x2 = np.hstack((df.index[::-1], df.index))

p = figure(x_range=(0, N-1), y_range=(0, 800))
p.grid.minor_grid_line_color = '#eeeeee'

p.patches([x2] * areas.shape[1], [areas[c].values for c in areas],
          color=colors, alpha=0.8, line_color=None)

output_file('brewer_.html', title='brewer.py example')

show(p)
```
If the devteam is good with this change, will send a PR.


Discussion:

Resolving patch:
diff --git a/examples/plotting/file/brewer.py b/examples/plotting/file/brewer.py
--- a/examples/plotting/file/brewer.py
+++ b/examples/plotting/file/brewer.py
@@ -5,36 +5,25 @@
 from bokeh.palettes import brewer
 
 N = 20
-categories = ['y' + str(x) for x in range(10)]
-data = {}
-data['x'] = np.arange(N)
-for cat in categories:
-    data[cat] = np.random.randint(10, 100, size=N)
+cats = 10
+df = pd.DataFrame(np.random.randint(10, 100, size=(N, cats))).add_prefix('y')
 
-df = pd.DataFrame(data)
-df = df.set_index(['x'])
+def  stacked(df):
+    df_top = df.cumsum(axis=1)
+    df_bottom = df_top.shift(axis=1).fillna({'y0': 0})[::-1]
+    df_stack = pd.concat([df_bottom, df_top], ignore_index=True)
+    return df_stack
 
-def stacked(df, categories):
-    areas = dict()
-    last = np.zeros(len(df))
-    for cat in categories:
-        next = last + df[cat]
-        areas[cat] = np.hstack((last[::-1], next))
-        last = next
-    return areas
+areas = stacked(df)
+colors = brewer['Spectral'][areas.shape[1]]
+x2 = np.hstack((df.index[::-1], df.index))
 
-areas = stacked(df, categories)
-
-colors = brewer["Spectral"][len(areas)]
-
-x2 = np.hstack((data['x'][::-1], data['x']))
-
-p = figure(x_range=(0, 19), y_range=(0, 800))
+p = figure(x_range=(0, N-1), y_range=(0, 800))
 p.grid.minor_grid_line_color = '#eeeeee'
 
-p.patches([x2] * len(areas), [areas[cat] for cat in categories],
+p.patches([x2] * areas.shape[1], [areas[c].values for c in areas],
           color=colors, alpha=0.8, line_color=None)
 
-output_file("brewer.html", title="brewer.py example")
+output_file('brewer.html', title='brewer.py example')
 
 show(p)


Test patch:
Repository: bokeh/bokeh

Issue:
Unclear Exception when BOKEH_LOG_LEVEL env variable is set to a wrong value
I was developing a bokeh server application, and my application was using the BOKEH_LOG_LEVEL env variable to control the log level. Apparently the same env variable is being used by bokeh server itself, and is expected to be something in `['trace', 'debug', 'info', 'warn', 'error', 'fatal']`. As I was passing something different as an env variable ("DEBUG" for the record) bokeh server was failing with the following error:

```
ValueError: ("Uknown log level '%s', valid levels are :%s:, "['trace', 'debug', 'info', 'warn', 'error', 'fatal']'")
```
It would be easier if I could see the wrong value which was supplied and caused the error. e.g I would expect the ValueError as:

```
ValueError: ("Uknown log level 'DEBUG', valid levels are ['trace', 'debug', 'info', 'warn', 'error', 'fatal']")
```


Discussion:

Resolving patch:
diff --git a/bokeh/resources.py b/bokeh/resources.py
--- a/bokeh/resources.py
+++ b/bokeh/resources.py
@@ -193,7 +193,7 @@ def log_level(self, level):
             "trace", "debug", "info", "warn", "error", "fatal"
         ]
         if not (level is None or level in valid_levels):
-            raise ValueError("Unknown log level '%s', valid levels are: %s", str(valid_levels))
+            raise ValueError("Unknown log level '{}', valid levels are: {}".format(level, str(valid_levels)))
         self._log_level = level
 
     @property


Test patch:
Repository: bokeh/bokeh

Issue:
Sort application names in index page
When I create a Bokeh server application I provide a dictionary of named applications:

```python
Server({'foo': ..., 'bar': ...})
```

When I go to the index.html page of my bokeh server it would be convenient to have these sorted alphabetically.  That does not appear to currently be the case.

![image](https://user-images.githubusercontent.com/306380/33723780-8eb6aeb6-db3b-11e7-948a-df4caa506e7a.png)

Is there a way to acheive this? 


Discussion:
Not AFAIK. If you'd like to make a tiny PR this is probably the place:

https://github.com/bokeh/bokeh/blob/master/bokeh/server/views/root_handler.py#L32

Resolving patch:
diff --git a/bokeh/server/views/root_handler.py b/bokeh/server/views/root_handler.py
--- a/bokeh/server/views/root_handler.py
+++ b/bokeh/server/views/root_handler.py
@@ -29,4 +29,4 @@ def get(self, *args, **kwargs):
             redirect_to = prefix + app_names[0]
             self.redirect(redirect_to)
         else:
-            self.render("app_index.html", prefix=prefix, items=self.applications.keys())
+            self.render("app_index.html", prefix=prefix, items=sorted(self.applications.keys()))


Test patch:
Repository: bokeh/bokeh

Issue:
Remove ResetTool.reset_size
This is defunct leftover after removal of `ResizeTool`.



Discussion:

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -243,10 +243,7 @@ class ResetTool(Action):
 
     '''
 
-    reset_size = Bool(default=True, help="""
-    Whether activating the Reset tool should also reset the plot's canvas
-    dimensions to their original size.
-    """)
+    pass
 
 
 class TapTool(Tap):


Test patch:
Repository: bokeh/bokeh

Issue:
Remove attrs from HasProps.initialize()
There is only one case where `attrs` are actually used, and it can be rewritten differently. Given this, I think, that they aren't necessary anymore. Removing them would also greatly simplify typing of models.


Discussion:

Resolving patch:
diff --git a/bokeh/models/tickers.py b/bokeh/models/tickers.py
--- a/bokeh/models/tickers.py
+++ b/bokeh/models/tickers.py
@@ -116,6 +116,8 @@ class DaysTicker(SingleIntervalTicker):
     The intervals of days to use.
     """)
 
+    num_minor_ticks = Override(default=0)
+
 class MonthsTicker(SingleIntervalTicker):
     ''' Generate ticks spaced apart by specific, even multiples of months.
 


Test patch:
Repository: bokeh/bokeh

Issue:
Update version number in package-lock.json



Discussion:

Resolving patch:
diff --git a/scripts/deploy.py b/scripts/deploy.py
--- a/scripts/deploy.py
+++ b/scripts/deploy.py
@@ -309,6 +309,7 @@ def update_bokehjs_versions():
     filenames = [
         'bokehjs/src/coffee/version.ts',
         'bokehjs/package.json',
+        'bokehjs/package-lock.json',
     ]
 
     pat = r"(release|version)([\" ][:=] [\"\'])" + CONFIG.last_any_version + "([\"\'])"


Test patch:
Repository: bokeh/bokeh

Issue:
PolyDrawTool does not emit event on double-click
When using the new PolyDrawTool it seems events are not emitted when you finish drawing a polygon with a double tap. This is something I didn't catch in my last minute refactoring. I'll have a fix shortly.


Discussion:

Resolving patch:
diff --git a/bokeh/models/tools.py b/bokeh/models/tools.py
--- a/bokeh/models/tools.py
+++ b/bokeh/models/tools.py
@@ -893,7 +893,7 @@ class EditTool(Tool):
     """)
 
 class BoxEditTool(EditTool, Drag, Tap):
-    ''' *toolbar icon*: |box_draw_icon|
+    ''' *toolbar icon*: |box_edit_icon|
 
     The BoxEditTool allows drawing, dragging and deleting ``Rect``
     glyphs on one or more renderers by editing the underlying
@@ -927,7 +927,7 @@ class BoxEditTool(EditTool, Drag, Tap):
       selection tool) then press <<backspace>> while the mouse is
       within the plot area.
 
-    .. |box_draw_icon| image:: /_images/icons/BoxEdit.png
+    .. |box_edit_icon| image:: /_images/icons/BoxEdit.png
         :height: 18pt
     '''
 


Test patch:
Repository: bokeh/bokeh

Issue:
Selection and nonselection glyph properties ignored
When setting style properties on the selection and nonselection glyphs these options are now ignored on latest master. It doesn't matter whether these options are set through the constructor or directly on the (non)selection glyphs.

Here is a simple example using the circle and line glyph but as far as I can tell all glyphs are affected:

```python
from bokeh.plotting import figure, show, output_file

output_file('glyph_properties.html')

p = figure(x_range=(0, 10), y_range=(0, 10), width=600, height=600, tools=['tap'])
rc1 = p.circle([1, 2, 3], [1, 2, 3], color='green', selection_color='red',
               selection_alpha=0.2, nonselection_color='blue', size=20)
rc2 = p.line([3, 4, 5], [3, 4, 5], line_width=5, selection_color='red')

print(rc1.selection_glyph.fill_color)
print(rc1.nonselection_glyph.fill_color)
show(p)
```

As far as I can tell this regression was introduced in https://github.com/bokeh/bokeh/commit/264a1d31fdc1903c739d455ad17662ee034e45d6.



Discussion:

Resolving patch:
diff --git a/examples/integration/glyphs/selection_nonselection.py b/examples/integration/glyphs/selection_nonselection.py
new file mode 100644
--- /dev/null
+++ b/examples/integration/glyphs/selection_nonselection.py
@@ -0,0 +1,22 @@
+from __future__ import absolute_import
+
+from bokeh.io import save
+from bokeh.plotting import figure
+
+p = figure(x_range=(0, 6), y_range=(0, 7), width=600, height=600, toolbar_location=None)
+
+def mkglyph(x, y, selection):
+    r = p.circle(
+        x, y,
+        color='green',
+        size=40,
+        selection_color='red',
+        selection_alpha=0.2,
+        nonselection_color='black')
+    r.data_source.selected['1d'] = dict(indices=selection)
+    return r
+
+mkglyph([1, 2, 3, 4, 5], [1, 2, 3, 4, 5], selection=[1, 3, 4])
+mkglyph([1, 2, 3, 4, 5], [2, 3, 4, 5, 6], selection=[])
+
+save(p)


Test patch:
Repository: bokeh/bokeh

Issue:
JSONEncoder warning when using latest NumPy
When using the latest version of NumPy (1.14.0) the JSON encoder generates warnings during the serialization of float arrays.

```
/Users/philippjfr/miniconda/envs/intake/lib/python3.6/site-packages/bokeh/core/json_encoder.py:80: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  elif np.issubdtype(type(obj), np.float):
```

The fix should be simple, replacing ``np.float`` with ``np.floating``.


Discussion:
Traveling/moving all week, PR appreciated

Resolving patch:
diff --git a/bokeh/core/json_encoder.py b/bokeh/core/json_encoder.py
--- a/bokeh/core/json_encoder.py
+++ b/bokeh/core/json_encoder.py
@@ -77,7 +77,7 @@ def transform_python_types(self, obj):
             return dict(start=obj.start, stop=obj.stop, step=obj.step)
 
         # NumPy scalars
-        elif np.issubdtype(type(obj), np.float):
+        elif np.issubdtype(type(obj), np.floating):
             return float(obj)
         elif np.issubdtype(type(obj), np.integer):
             return int(obj)


Test patch:
Repository: bokeh/bokeh

Issue:
Fail travis ci tests when there are TS compilation errors
For developer's convenience allow to run all tests, but fail the entire run at the end.


Discussion:

Resolving patch:
diff --git a/_setup_support.py b/_setup_support.py
--- a/_setup_support.py
+++ b/_setup_support.py
@@ -275,10 +275,8 @@ def build_js():
     sys.stdout.flush()
     os.chdir('bokehjs')
 
-    if sys.platform != "win32":
-        cmd = [join('node_modules', '.bin', 'gulp'), 'build']
-    else:
-        cmd = [join('node_modules', '.bin', 'gulp.cmd'), 'build']
+    gulp = 'gulp' if sys.platform != "win32" else 'gulp.cmd'
+    cmd = [join('node_modules', '.bin', gulp), 'build', '--emit-error']
 
     t0 = time.time()
     try:


Test patch:
Repository: bokeh/bokeh

Issue:
Regression when plotting images with non-binary array types
Using bokeh master and the most recent dev releases there appears to be a regression plotting array types which cannot be serialized as binary data, i.e. the list of lists image format and dtypes that are not supported in JS (such as int64) are affected:

```
VM30002:100 Uncaught DOMException: Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0.
```

Here is a small reproducible example:

```python
import numpy as np
from bokeh.plotting import figure, show, output_file

N = 500
x = np.linspace(0, 10, N)
y = np.linspace(0, 10, N)
xx, yy = np.meshgrid(x, y)
d = (np.sin(xx)*np.cos(yy)*100).astype('int64')
# Also reproducible using list-of-lists format
# d = [[0, 1, 2, 3], [4, 5, 6, 7]]

p = figure(x_range=(0, 10), y_range=(0, 10))

# must give a vector of image data for image parameter
p.image(image=[d], x=0, y=0, dw=10, dh=10, palette="Spectral11")

output_file("image.html", title="image.py example")

show(p)  # open a browser
```

My guess is that some change was made to image rendering in JS, which didn't take into account the fact that the image data can be a 1D typed array or a 2D regular array type. If I had to guess I think the changes to global alpha could be causing this but I haven't yet had time to do a bisection.


Discussion:
> If I had to guess I think the changes to global alpha could be causing this but I haven't yet had time to do a bisection.

That would be surprising to me but I've certainly been wrong before. 
This is likely a regression after PR #7610.

Resolving patch:
diff --git a/examples/integration/glyphs/image_non_binary_arrays.py b/examples/integration/glyphs/image_non_binary_arrays.py
new file mode 100644
--- /dev/null
+++ b/examples/integration/glyphs/image_non_binary_arrays.py
@@ -0,0 +1,19 @@
+from __future__ import absolute_import
+
+import numpy as np
+
+from bokeh.io import save
+from bokeh.plotting import figure
+
+N = 500
+x = np.linspace(0, 10, N)
+y = np.linspace(0, 10, N)
+xx, yy = np.meshgrid(x, y)
+d1 = (np.sin(xx)*np.cos(yy)*100).astype('int64')
+d2 = [[0, 1, 2, 3], [4, 5, 6, 7]]
+
+p = figure(x_range=(0, 10), y_range=(0, 10))
+
+p.image(image=[d1, d2], x=[0, 5], y=[0, 5], dw=5, dh=5, palette="Spectral11")
+
+save(p)


Test patch:
Repository: bokeh/bokeh

Issue:
Enable image diff testing for User's Guide source example
ref: #2625 

Would be good to activate image diff testing for all the source examples for the user's guide, and potentially enable overall test pass/failure for this subset as well. 



Discussion:

Resolving patch:
diff --git a/bokeh/io/saving.py b/bokeh/io/saving.py
--- a/bokeh/io/saving.py
+++ b/bokeh/io/saving.py
@@ -31,6 +31,7 @@
 # External imports
 
 # Bokeh imports
+from ..settings import settings
 from ..util.string import decode_utf8
 from .state import curstate
 from .util import default_filename
@@ -109,7 +110,7 @@ def _get_save_filename(state, filename):
     if filename is not None:
         return filename, False
 
-    if state.file:
+    if state.file and not settings.ignore_filename():
         return state.file['filename'], False
 
     return default_filename("html"), True
diff --git a/bokeh/settings.py b/bokeh/settings.py
--- a/bokeh/settings.py
+++ b/bokeh/settings.py
@@ -233,6 +233,9 @@ def nodejs_path(self, default=None):
     def phantomjs_path(self, default=None):
         return self._get_str("PHANTOMJS_PATH", default)
 
+    def ignore_filename(self):
+        return self._get_bool("IGNORE_FILENAME", False)
+
 #: A global settings object that other parts of Bokeh can refer to.
 #:
 #:
diff --git a/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py b/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
--- a/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
+++ b/sphinx/source/docs/user_guide/examples/extensions_example_wrapping.py
@@ -157,6 +157,6 @@ class Surface3d(LayoutDOM):
 
 source = ColumnDataSource(data=dict(x=xx, y=yy, z=value, color=value))
 
-surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source)
+surface = Surface3d(x="x", y="y", z="z", color="color", data_source=source, width=600, height=600)
 
 show(surface)


Test patch:
diff --git a/tests/examples/examples_report_plugin.py b/tests/examples/examples_report_plugin.py
--- a/tests/examples/examples_report_plugin.py
+++ b/tests/examples/examples_report_plugin.py
@@ -40,9 +40,7 @@ def get_all_examples(config):
     if _examples is None:
         base_dir = abspath(join(dirname(__file__), pardir, pardir))
 
-        _examples = []
-        _examples.extend(collect_examples(join(base_dir, "examples", "examples.yaml")))
-        _examples.extend(collect_examples(join(base_dir, "bokehjs", "examples", "examples.yaml")))
+        _examples = collect_examples(join(base_dir, "examples.yaml"))
 
         for example in _examples:
             example._diff_ref = config.option.diff_ref
diff --git a/tests/examples/test_examples.py b/tests/examples/test_examples.py
--- a/tests/examples/test_examples.py
+++ b/tests/examples/test_examples.py
@@ -202,6 +202,7 @@ def _run_example(example):
     cwd = dirname(example.path)
 
     env = os.environ.copy()
+    env['BOKEH_IGNORE_FILENAME'] = 'true'
     env['BOKEH_RESOURCES'] = 'relative'
     env['BOKEH_MINIFIED'] = 'false'
     env['BOKEH_BROWSER'] = 'none'
Repository: bokeh/bokeh

Issue:
Propagate settings to tornado application from bokeh server
`examples/howto/server_embed/tornado_embed.py` suggests using bokeh server for serving web requests for other requests that don't involve bokeh. The upside is that you have to allocate only one port and specifying `allow_websocket_origin` is unneeded. The downside is that it's impossible to alter default tornado app settings.
E.g. I need to use `static_url` in my tornado template, and that requires `static_path` setting.

There's `tornado_server_kwargs` kwargs in `bokeh.server.server.Server.__init__`.
Does adding `tornado_application_settings` to the server kwargs and passing it through `bokeh.server.tornado.BokehTornado` make sense?


Discussion:
I'm not sure offhand, @p-himik did you find a solution or workaround in the mean time?
@bryevdv In Python a workaround is always possible. :) In this case, I called `server._tornado.settings.update` with relevant arguments. But there were some other cases that I can't recall right away where this approach doesn't work and basically, a rewrite of Bokeh Server was needed to pass the arguments.
@p-himik I would be happy to accept a PR that did this. 

Resolving patch:
diff --git a/bokeh/server/tornado.py b/bokeh/server/tornado.py
--- a/bokeh/server/tornado.py
+++ b/bokeh/server/tornado.py
@@ -124,6 +124,7 @@ class BokehTornado(TornadoApplication):
             If there are multiple Bokeh applications configured, this option
             has no effect.
 
+    Any additional keyword arguments are passed to ``tornado.web.Application``.
     '''
 
     def __init__(self,
@@ -140,7 +141,8 @@ def __init__(self,
                  stats_log_frequency_milliseconds=DEFAULT_STATS_LOG_FREQ_MS,
                  mem_log_frequency_milliseconds=DEFAULT_MEM_LOG_FREQ_MS,
                  use_index=True,
-                 redirect_root=True):
+                 redirect_root=True,
+                 **kwargs):
 
         # This will be set when initialize is called
         self._loop = None
@@ -258,7 +260,7 @@ def __init__(self,
         for line in pformat(all_patterns, width=60).split("\n"):
             log.debug("  " + line)
 
-        super(BokehTornado, self).__init__(all_patterns)
+        super(BokehTornado, self).__init__(all_patterns, **kwargs)
 
     def initialize(self, io_loop):
         ''' Start a Bokeh Server Tornado Application on a given Tornado IOLoop.


Test patch:
Repository: bokeh/bokeh

Issue:
WebGL initialization broken after PR #7637
If multiple figures have webgl enabled, only the first will actually have working webgl.



Discussion:

Resolving patch:
diff --git a/examples/integration/webgl/multiple_webgl_plots.py b/examples/integration/webgl/multiple_webgl_plots.py
new file mode 100644
--- /dev/null
+++ b/examples/integration/webgl/multiple_webgl_plots.py
@@ -0,0 +1,25 @@
+import numpy as np
+from bokeh.plotting import figure, save
+from bokeh.layouts import gridplot
+
+N = 10000
+
+x = np.random.normal(0, np.pi, N)
+y = np.sin(x) + np.random.normal(0, 0.2, N)
+
+p1 = figure(output_backend="webgl")
+p1.circle(x, y, fill_alpha=0.1)
+
+p2 = figure(output_backend="webgl")
+p2.circle(x, y, fill_alpha=0.1)
+
+x = np.linspace(0, 10*np.pi, N)
+y = np.cos(x) + np.sin(2*x+1.25) + np.random.normal(0, 0.001, (N, ))
+
+p3 = figure(output_backend="webgl")
+p3.line(x, y, color="#22aa22", line_width=3)
+
+p4 = figure(output_backend="webgl")
+p4.line(x, y, color="#22aa22", line_width=3)
+
+save(gridplot([[p1, p2], [p3, p4]]))


Test patch:
Repository: bokeh/bokeh

Issue:
examples/howto/{js_events,events_app} contain bad CSS
* https://github.com/bokeh/bokeh/blob/master/examples/howto/js_events.py#L19
* https://github.com/bokeh/bokeh/blob/master/examples/howto/events_app.py#L21
* the same in user_guide


Discussion:

Resolving patch:
diff --git a/examples/howto/events_app.py b/examples/howto/events_app.py
--- a/examples/howto/events_app.py
+++ b/examples/howto/events_app.py
@@ -18,7 +18,7 @@ def display_event(div, attributes=[]):
     Function to build a suitable CustomJS to display the current event
     in the div model.
     """
-    style = 'float:left;clear:left;font_size=0.5pt'
+    style = 'float: left; clear: left; font-size: 0.5pt'
     return CustomJS(args=dict(div=div), code="""
         var attrs = %s;
         var args = [];
diff --git a/examples/howto/js_events.py b/examples/howto/js_events.py
--- a/examples/howto/js_events.py
+++ b/examples/howto/js_events.py
@@ -16,7 +16,7 @@ def display_event(div, attributes=[]):
     Function to build a suitable CustomJS to display the current event
     in the div model.
     """
-    style = 'float:left;clear:left;font_size=0.5pt'
+    style = 'float: left; clear: left; font-size: 0.5pt'
     return CustomJS(args=dict(div=div), code="""
         var attrs = %s;
         var args = [];


Test patch:
Repository: bokeh/bokeh

Issue:
Typos on palettes page
The docs at https://bokeh.pydata.org/en/latest/docs/reference/palettes.html have a few typos.  PR to follow.


Discussion:

Resolving patch:
diff --git a/bokeh/palettes.py b/bokeh/palettes.py
--- a/bokeh/palettes.py
+++ b/bokeh/palettes.py
@@ -97,7 +97,7 @@
 ~~~~~~~~~~~~~~~~~~~
 
 Bokeh includes the `Matplotlib`_ palettes Magma, Inferno, Plasma, and
-Viridis. This section shows the pre-defined small palettes in this groups.
+Viridis. This section shows the pre-defined small palettes in this group.
 There are also large 256-color versions of these palettes, shown below
 in the `Large Palettes`_ section.
 
@@ -121,9 +121,7 @@
 ~~~~~~~~~~~~~~~~~~
 
 Bokeh includes some palettes that are useful for addressing color
-deficiencies. These are shown below. Additional, several 256-color
-perceptually uniform palettes are available in the external
-`colorcet`_ package.
+deficiencies. These are shown below.
 
 .. bokeh-palette-group:: colorblind
 
@@ -144,6 +142,10 @@
 
 :Viridis256: :bokeh-palette:`viridis(256)` (mpl)
 
+
+Many other 256-color perceptually uniform palettes are
+available in the external `colorcet`_ package.
+
 Other Attributes
 ----------------
 
@@ -152,11 +154,10 @@
 
 .. data:: __palettes__
 
-    A alphabetical list of the names of all individual palettes in this
+    An alphabetical list of the names of all individual palettes in this
     module.
 
-    For example, a the lists of the first eight palette names is given
-    by:
+    For example, the first eight palette names are:
 
     .. code-block:: python
 


Test patch: