diff --git a/examples/color/named_colors.py b/examples/color/named_colors.py index 5a8e3667689a..7f7b4fc6db3c 100644 --- a/examples/color/named_colors.py +++ b/examples/color/named_colors.py @@ -41,14 +41,14 @@ def plot_colortable(colors, *, ncols=4, sort_colors=True): n = len(names) nrows = math.ceil(n / ncols) - width = cell_width * 4 + 2 * margin + width = cell_width * ncols + 2 * margin height = cell_height * nrows + 2 * margin dpi = 72 fig, ax = plt.subplots(figsize=(width / dpi, height / dpi), dpi=dpi) fig.subplots_adjust(margin/width, margin/height, (width-margin)/width, (height-margin)/height) - ax.set_xlim(0, cell_width * 4) + ax.set_xlim(0, cell_width * ncols) ax.set_ylim(cell_height * (nrows-0.5), -cell_height/2.) ax.yaxis.set_visible(False) ax.xaxis.set_visible(False)
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: