Skip to content

Commit 0f10e11

Browse files
authored
Allow control of marker size (and other aspects of plt.scatter) (#78)
* allow control of marker size * allow data_label_filter arg * Revert "allow data_label_filter arg" This reverts commit 2764be6. * remove marker size arg, replace with scatter_kwargs * add default args * add default args to docs
1 parent 86e5eda commit 0f10e11

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cinnabar/plotting.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def _master_plot(
3535
bootstrap_x_uncertainty: bool = False,
3636
bootstrap_y_uncertainty: bool = False,
3737
statistic_type: str = "mle",
38+
scatter_kwargs: dict = {"s": 10, "marker": "o"},
3839
):
3940
"""Handles the aesthetics of the plots in one place.
4041
@@ -97,6 +98,8 @@ def _master_plot(
9798
statistic_type : str, default 'mle'
9899
the type of statistic to use, either 'mle' (i.e. sample statistic)
99100
or 'mean' (i.e. bootstrapped mean statistic)
101+
scatter_kwargs : dict, default {"s": 10, "marker": "o"}
102+
arguments to control plt.scatter()
100103
101104
Returns
102105
-------
@@ -166,7 +169,7 @@ def _master_plot(
166169
elinewidth=2.0,
167170
zorder=1,
168171
)
169-
plt.scatter(x, y, color=color, s=10, marker="o", zorder=2)
172+
plt.scatter(x, y, color=color, zorder=2, **scatter_kwargs)
170173

171174
# Label points
172175
texts = []

0 commit comments

Comments
 (0)