Skip to content

Commit

Permalink
Partially revert e938a67
Browse files Browse the repository at this point in the history
  • Loading branch information
jnothman committed Dec 28, 2023
1 parent 0837786 commit a1830a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 15 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ What's new in version 0.9
filtering (e.g. ``min_subset_size``) was applied. This bug was a regression
introduced in version 0.7. (:issue:`248`)
- Ability to disable totals plot with `totals_plot_elements=0`. (:issue:`246`)
- Ability to set totals y axis label (:issue:`243`)
- Added ``max_subset_rank`` to get only n most populous subsets.

What's new in version 0.8
Expand Down
11 changes: 1 addition & 10 deletions examples/plot_customize_after_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
=======================
This example illustrates how the return value of the plot method can be used
to customize aspects of the plot, such as axis labels.
to customize aspects of the plot, such as axis labels, legend position, etc.
"""

from matplotlib import pyplot as plt
Expand All @@ -18,14 +18,5 @@

plot_result = plot(example)
plot_result["intersections"].set_ylabel("Subset size")
plot_result["totals"].set_ylabel("Category size")
plot_result["matrix"].set_xlabel("Subsets between categories")
plt.show()


##########################################################################
# Or we can place the totals label on the x axis

plot_result = plot(example)
plot_result["totals"].set_xlabel("Category size")
plt.show()
6 changes: 2 additions & 4 deletions upsetplot/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ def plot_matrix(self, ax):
tick_axis.set_ticklabels(
data.index.names, rotation=0 if self._horizontal else -90
)
ax.xaxis.set_ticks([])
ax.xaxis.set_visible(False)
ax.tick_params(axis="both", which="both", length=0)
if not self._horizontal:
ax.yaxis.set_ticks_position("top")
Expand Down Expand Up @@ -929,9 +929,7 @@ def plot_totals(self, ax):
orig_ax.set_xlim(max_total, 0)
for x in ["top", "left", "right"]:
ax.spines[self._reorient(x)].set_visible(False)
ax.yaxis.set_visible(True)
ax.yaxis.set_ticklabels([])
ax.yaxis.set_ticks([])
ax.yaxis.set_visible(False)
ax.xaxis.grid(True)
ax.yaxis.grid(False)
ax.patch.set_visible(False)
Expand Down

0 comments on commit a1830a9

Please sign in to comment.