diff --git a/upsetplot/plotting.py b/upsetplot/plotting.py
index 89c8506..5203bf3 100644
--- a/upsetplot/plotting.py
+++ b/upsetplot/plotting.py
@@ -79,26 +79,29 @@ class UpSet:
     with_lines : bool
         Whether to show lines joining dots in the matrix, to mark multiple sets
         being intersected.
-    intersections_plot_size : float
+    element_size : float or None
+        Side length in pt. If None, size is estimated to fit figure
+    intersections_plot_elements : int
         The intersections plot should be large enough to fit this many matrix
-        dots.
-    totals_plot_size : float
+        elements.
+    totals_plot_elements : int
         The totals plot should be large enough to fit this many matrix
         dots.
     """
 
     def __init__(self, data, vert=True, sort_by='degree',
                  sort_sets_by='cardinality', forecolor='black',
-                 with_lines=True, intersection_plot_size=6,
-                 totals_plot_size=2):
+                 with_lines=True, element_size=32,
+                 intersection_plot_elements=6, totals_plot_elements=2):
 
         self._vert = vert
         if not vert:
             raise NotImplementedError()
         self._forecolor = forecolor
         self._with_lines = with_lines
-        self._totals_plot_size = totals_plot_size
-        self._intersection_plot_size = intersection_plot_size
+        self._element_size = element_size
+        self._totals_plot_elements = totals_plot_elements
+        self._intersection_plot_elements = intersection_plot_elements
 
         (self.intersections,
          self.totals) = _process_data(data,
@@ -111,29 +114,42 @@ class UpSet:
         n_cats = len(self.totals)
         n_inters = len(self.intersections)
 
-        text_space = self._calculate_text_ncols(fig)
-        GS = matplotlib.gridspec.GridSpec
-        gridspec = GS(n_cats + self._intersection_plot_size,
-                      n_inters + text_space + self._totals_plot_size,
-                      hspace=1)
-        return {'intersections': gridspec[:-n_cats, -n_inters:],
-                'matrix': gridspec[-n_cats:, -n_inters:],
-                'totals': gridspec[-n_cats:, :self._totals_plot_size],
-                'gs': gridspec}
-
-    def _calculate_text_ncols(self, fig):
         if fig is None:
             fig = plt.gcf()
+
+        # Determine text size to determine figure size / spacing
         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
-        MAGIC_MARGIN = 20  # FIXME
-        colw = (figw - textw - MAGIC_MARGIN) / (len(self.intersections) +
-                                                self._totals_plot_size)
         t.remove()
-        return int(np.ceil(figw / colw - (len(self.intersections) +
-                                          self._totals_plot_size)))
+
+        MAGIC_MARGIN = 10  # FIXME
+        figw = fig.get_window_extent(renderer=r).width
+        if self._element_size is None:
+            colw = (figw - textw - MAGIC_MARGIN) / (len(self.intersections) +
+                                                    self._totals_plot_elements)
+        else:
+            render_ratio = figw / fig.get_figwidth()
+            colw = self._element_size / 72 * render_ratio
+            figw = (colw * (len(self.intersections) +
+                            self._totals_plot_elements) +
+                    MAGIC_MARGIN + textw)
+            fig.set_figwidth(figw / render_ratio)
+            fig.set_figheight((colw * (n_cats +
+                                       self._intersection_plot_elements)) /
+                              render_ratio)
+
+        text_nelems = int(np.ceil(figw / colw - (len(self.intersections) +
+                                                 self._totals_plot_elements)))
+
+        GS = matplotlib.gridspec.GridSpec
+        gridspec = GS(n_cats + self._intersection_plot_elements,
+                      n_inters + text_nelems + self._totals_plot_elements,
+                      hspace=1)
+        return {'intersections': gridspec[:-n_cats, -n_inters:],
+                'matrix': gridspec[-n_cats:, -n_inters:],
+                'totals': gridspec[-n_cats:, :self._totals_plot_elements],
+                'gs': gridspec}
 
     def plot_matrix(self, ax):
         """Plot the matrix of intersection indicators onto ax
@@ -152,8 +168,12 @@ class UpSet:
         c[idx] = self._forecolor
         x = np.repeat(np.arange(len(data)), n_sets)
         y = np.tile(np.arange(n_sets), len(data))
-        # TODO: make s relative to colw
-        ax.scatter(x, y, c=c.tolist(), linewidth=0, s=200)
+        if self._element_size is not None:
+            s = (self._element_size * .35) ** 2
+        else:
+            # TODO: make s relative to colw
+            s = 200
+        ax.scatter(x, y, c=c.tolist(), linewidth=0, s=s)
 
         if self._with_lines:
             line_data = (pd.Series(y[idx], index=x[idx])

Allow automatic determination of figsize from dot radius in pts
User should be able to specify a dot radius and the figure size is calculated from there...
diff --git a/upsetplot/tests/test_upsetplot.py b/upsetplot/tests/test_upsetplot.py
index f95cbb9..1dcfcab 100644
--- a/upsetplot/tests/test_upsetplot.py
+++ b/upsetplot/tests/test_upsetplot.py
@@ -72,7 +72,7 @@ def test_param_validation(kw):
         UpSet(X, **kw)
 
 
-@pytest.mark.parametrize('kw', [{}])
+@pytest.mark.parametrize('kw', [{}, {'element_size': None}])
 def test_plot_smoke_test(kw):
     fig = matplotlib.figure.Figure()
     X = generate_data(n_samples=100)
@@ -81,6 +81,32 @@ def test_plot_smoke_test(kw):
 
     # Also check fig is optional
     n_nums = len(plt.get_fignums())
-    plot(X)
+    plot(X, **kw)
     assert len(plt.get_fignums()) - n_nums == 1
     assert plt.gcf().axes
+
+
+def test_element_size():
+    X = generate_data(n_samples=100)
+    figsizes = []
+    for element_size in range(10, 50, 5):
+        fig = matplotlib.figure.Figure()
+        UpSet(X, element_size=element_size).make_grid(fig)
+        figsizes.append((fig.get_figwidth(), fig.get_figheight()))
+
+    figwidths, figheights = zip(*figsizes)
+    # Absolute width increases
+    assert np.all(np.diff(figwidths) > 0)
+    aspect = np.divide(figwidths, figheights)
+    # Font size stays constant, so aspect ratio decreases
+    assert np.all(np.diff(aspect) < 0)
+    # But doesn't decrease by much
+    assert np.all(aspect[:-1] / aspect[1:] < 1.1)
+
+    fig = matplotlib.figure.Figure()
+    figsize_before = fig.get_figwidth(), fig.get_figheight()
+    UpSet(X, element_size=None).make_grid(fig)
+    figsize_after = fig.get_figwidth(), fig.get_figheight()
+    assert figsize_before == figsize_after
+
+    # TODO: make sure axes are all within figure

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-cov
apt-get update apt-get install -y gcc
3.6
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.18.1
idna==3.10
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
kiwisolver==1.3.1
MarkupSafe==2.0.1
matplotlib==3.3.4
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
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
pytest-cov==4.0.0
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
scipy==1.5.4
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
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@a272986182e3f1de64ab7d20fd44c59f8b693017#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.18.1
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - kiwisolver==1.3.1
      - markupsafe==2.0.1
      - matplotlib==3.3.4
      - 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
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pytest-cov==4.0.0
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - scipy==1.5.4
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - 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[kw1] upsetplot/tests/test_upsetplot.py::test_element_size
upsetplot/tests/test_upsetplot.py::test_process_data[None-degree-X1] upsetplot/tests/test_upsetplot.py::test_process_data[cardinality-degree-X1]
upsetplot/tests/test_upsetplot.py::test_process_data[None-cardinality-X0] upsetplot/tests/test_upsetplot.py::test_process_data[None-cardinality-X1] upsetplot/tests/test_upsetplot.py::test_process_data[None-degree-X0] upsetplot/tests/test_upsetplot.py::test_process_data[cardinality-cardinality-X0] upsetplot/tests/test_upsetplot.py::test_process_data[cardinality-cardinality-X1] upsetplot/tests/test_upsetplot.py::test_process_data[cardinality-degree-X0] upsetplot/tests/test_upsetplot.py::test_not_aggregated[None-cardinality] upsetplot/tests/test_upsetplot.py::test_not_aggregated[None-degree] upsetplot/tests/test_upsetplot.py::test_not_aggregated[cardinality-cardinality] upsetplot/tests/test_upsetplot.py::test_not_aggregated[cardinality-degree] upsetplot/tests/test_upsetplot.py::test_param_validation[kw0] upsetplot/tests/test_upsetplot.py::test_param_validation[kw1] upsetplot/tests/test_upsetplot.py::test_param_validation[kw2] upsetplot/tests/test_upsetplot.py::test_param_validation[kw3] upsetplot/tests/test_upsetplot.py::test_param_validation[kw4] upsetplot/tests/test_upsetplot.py::test_plot_smoke_test[kw0]
upsetplot/plotting.py
upsetplot/plotting.py