Design: Customizing axis labelsΒΆ

This example illustrates how the return value of the plot method can be used to customize aspects of the plot, such as axis labels, legend position, etc.

from matplotlib import pyplot as plt

from upsetplot import generate_counts, plot

example = generate_counts()
print(example)
cat0   cat1   cat2
False  False  False      56
              True      283
       True   False    1279
              True     5882
True   False  False      24
              True       90
       True   False     429
              True     1957
Name: value, dtype: int64
plot_result = plot(example)
plot_result["intersections"].set_ylabel("Subset size")
plot_result["totals"].set_xlabel("Category size")
plt.show()
plot customize after plot

Total running time of the script: ( 0 minutes 0.202 seconds)

Gallery generated by Sphinx-Gallery