Skip to content

Commit

Permalink
Example of highlight by degree (#252)
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Dec 28, 2023
1 parent 0f6a497 commit 16ff930
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion examples/plot_highlight.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
plt.show()

##########################################################################
# ... or their size or degree.
# ... or their size.

upset = UpSet(example)
upset.style_subsets(
Expand All @@ -44,6 +44,17 @@
plt.suptitle("Hatch subsets with size >1000")
plt.show()

##########################################################################
# ... or degree.

upset = UpSet(example)
upset.style_subsets(min_degree=1, facecolor="blue")
upset.style_subsets(min_degree=2, facecolor="purple")
upset.style_subsets(min_degree=3, facecolor="red")
upset.plot()
plt.suptitle("Coloring by degree")
plt.show()

##########################################################################
# Multiple stylings can be applied with different criteria in the same
# plot.
Expand Down

0 comments on commit 16ff930

Please sign in to comment.