diff --git a/upsetplot/plotting.py b/upsetplot/plotting.py
index 3645595..6578ac5 100644
--- a/upsetplot/plotting.py
+++ b/upsetplot/plotting.py
@@ -1,10 +1,10 @@
-import warnings
 import itertools
 
 import numpy as np
 import pandas as pd
 import matplotlib
 from matplotlib import pyplot as plt
+from matplotlib.tight_layout import get_renderer
 
 
 def _process_data(data, order, order_categories):
@@ -119,11 +119,7 @@ class UpSetPlot:
     def _calculate_text_ncols(self, fig):
         if fig is None:
             fig = plt.gcf()
-        try:
-            r = fig.canvas.get_renderer()
-        except Exception:
-            warnings.warn('Could not get current renderer')
-            r = None
+        r = get_renderer(fig)
         t = fig.text(0, 0, '\n'.join(self.totals.index.values))
         textw = t.get_window_extent(renderer=r).width
         figw = fig.get_window_extent(renderer=r).width
@@ -141,8 +137,10 @@ class UpSetPlot:
         n_categories = data.index.nlevels
 
         # alternating row shading (XXX: use add_patch(Rectangle)?)
-        ax.barh(np.arange(0, n_categories, 2), len(data) + 1, left=-1,
-                color='#f5f5f5', zorder=0)
+        alternating = np.arange(0, n_categories, 2)
+        ax.barh(alternating, np.full(len(alternating), len(data) + 1),
+                left=-1, color='#f5f5f5', zorder=0, linewidth=0,
+                align='center')
 
         idx = np.flatnonzero(data.index.to_frame()[data.index.names].values)
         c = np.array(['lightgrey'] * len(data) * n_categories, dtype='O')
@@ -150,7 +148,7 @@ class UpSetPlot:
         x = np.repeat(np.arange(len(data)), n_categories)
         y = np.tile(np.arange(n_categories), len(data))
         # TODO: make s relative to colw
-        ax.scatter(x, y, c=c, s=200)
+        ax.scatter(x, y, c=c.tolist(), linewidth=0, s=200)
 
         if self._with_lines:
             line_data = (pd.Series(y[idx], index=x[idx])
@@ -170,7 +168,7 @@ class UpSetPlot:
         """Plot bars indicating intersection size
         """
         ax.bar(np.arange(len(self.intersections)), self.intersections,
-               width=.5, color=self._forecolor, zorder=10)
+               width=.5, color=self._forecolor, zorder=10, align='center')
         ax.xaxis.set_visible(False)
         for x in ['top', 'bottom', 'right']:
             ax.spines[x].set_visible(False)
@@ -182,12 +180,13 @@ class UpSetPlot:
         """Plot bars indicating total set size
         """
         ax.barh(np.arange(len(self.totals.index.values)), self.totals,
-                height=.5, color=self._forecolor)
+                height=.5, color=self._forecolor, align='center')
         max_total = self.totals.max()
         ax.set_xlim(max_total, 0)
         for x in ['top', 'left', 'right']:
             ax.spines[x].set_visible(False)
         ax.yaxis.set_visible(False)
+        ax.xaxis.grid(True)
         ax.ticklabel_format(axis='x')
 
     def plot(self, fig=None):

 Smoke test plotting
Make sure plots can run in all environments.
diff --git a/upsetplot/tests/test_upsetplot.py b/upsetplot/tests/test_upsetplot.py
index 85d1b94..94edca7 100644
--- a/upsetplot/tests/test_upsetplot.py
+++ b/upsetplot/tests/test_upsetplot.py
@@ -1,9 +1,13 @@
+import io
+
 import pytest
 from pandas.util.testing import assert_series_equal
 import numpy as np
+import matplotlib.figure
 
+from upsetplot import plot
+from upsetplot import generate_data
 from upsetplot.plotting import _process_data
-from upsetplot.data import generate_data
 
 
 def is_ascending(seq):
@@ -53,3 +57,10 @@ def test_not_aggregated(order, order_categories):
     assert_series_equal(intersections1, intersections2,
                         check_dtype=False)
     assert_series_equal(totals1, totals2, check_dtype=False)
+
+
+@pytest.mark.parametrize('kw', [{}])
+def test_plot_smoke_test(kw):
+    fig = matplotlib.figure.Figure()
+    plot(generate_data(n_samples=100), fig)
+    fig.savefig(io.BytesIO(), format='png')

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov flake8 python-coveralls numpydoc sphinx-gallery sphinx-issues
apt-get update apt-get install -y gcc
3.6
test_requirements.txt doc/requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
attrs==22.2.0
Babel==2.11.0
certifi==2021.5.30
charset-normalizer==2.0.12
coverage==6.2
cycler==0.11.0
docutils==0.17.1
flake8==5.0.4
idna==3.10
imagesize==1.4.1
importlib-metadata==4.2.0
iniconfig==1.1.1
Jinja2==3.0.3
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
mccabe==0.7.0
numpy==1.19.5
numpydoc==1.1.0
packaging==21.3
pandas==1.1.5
Pillow==8.4.0
pluggy==1.0.0
py==1.11.0
pycodestyle==2.9.1
pyflakes==2.5.0
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
python-coveralls==2.9.3
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
requests==2.27.1
scipy==1.5.4
six==1.17.0
snowballstemmer==2.2.0
Sphinx==4.3.2
sphinx-gallery==0.10.0
sphinx-issues==3.0.1
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==1.2.3
typing_extensions==4.1.1
-e git+https://github.com/jnothman/UpSetPlot.git@b8c0c99ee68c07ac0902d0f660570e33a55907b1#egg=upsetplot
urllib3==1.26.20
zipp==3.6.0

name: UpSetPlot
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - attrs==22.2.0
      - babel==2.11.0
      - charset-normalizer==2.0.12
      - coverage==6.2
      - cycler==0.11.0
      - docutils==0.17.1
      - flake8==5.0.4
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.2.0
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - mccabe==0.7.0
      - numpy==1.19.5
      - numpydoc==1.1.0
      - packaging==21.3
      - pandas==1.1.5
      - pillow==8.4.0
      - pluggy==1.0.0
      - py==1.11.0
      - pycodestyle==2.9.1
      - pyflakes==2.5.0
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-coveralls==2.9.3
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - requests==2.27.1
      - scipy==1.5.4
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==4.3.2
      - sphinx-gallery==0.10.0
      - sphinx-issues==3.0.1
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - zipp==3.6.0
prefix: /opt/conda/envs/UpSetPlot

upsetplot/tests/test_upsetplot.py::test_plot_smoke_test[kw0]
upsetplot/tests/test_upsetplot.py::test_process_data[False-degree-X1] upsetplot/tests/test_upsetplot.py::test_process_data[True-degree-X1]
upsetplot/tests/test_upsetplot.py::test_process_data[False-size-X0] upsetplot/tests/test_upsetplot.py::test_process_data[False-size-X1] upsetplot/tests/test_upsetplot.py::test_process_data[False-degree-X0] upsetplot/tests/test_upsetplot.py::test_process_data[True-size-X0] upsetplot/tests/test_upsetplot.py::test_process_data[True-size-X1] upsetplot/tests/test_upsetplot.py::test_process_data[True-degree-X0] upsetplot/tests/test_upsetplot.py::test_not_aggregated[False-size] upsetplot/tests/test_upsetplot.py::test_not_aggregated[False-degree] upsetplot/tests/test_upsetplot.py::test_not_aggregated[True-size] upsetplot/tests/test_upsetplot.py::test_not_aggregated[True-degree]
upsetplot/plotting.py
upsetplot/plotting.py