How I can change the figsize in the upsetplot
module in Python? I see that there is a fig
parameter, but I don't get how to assign a new figure with a predefined size to it.
Asked
Active
Viewed 427 times
1 Answers
1
You can use matplotlib to define a figure, and then pass it to upsetplot. However, the figure size is reset automatically by upsetplot unless element_size=None
is set.
So please use something like:
from matplotlib import pyplot as plt
from upsetplot import generate_counts, plot
example = generate_counts()
fig = plt.figure(figsize=(10, 3))
plot(example, fig=fig, element_size=None)
plt.show()
Thanks for inspiring the development of an example on this topic: Customising element size and figure size

joeln
- 3,563
- 25
- 31
-
Thanks a lot, Joel, it definitely helps! – Elena_Kosourova Jul 15 '21 at 13:12