marsilea 0.4.7__tar.gz → 0.4.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {marsilea-0.4.7 → marsilea-0.4.8}/PKG-INFO +1 -1
  2. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/__init__.py +1 -1
  3. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/base.py +7 -0
  4. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/arc.py +2 -4
  5. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/area.py +1 -2
  6. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/bar.py +1 -2
  7. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/bio.py +3 -6
  8. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/range.py +1 -2
  9. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/upset.py +1 -1
  10. {marsilea-0.4.7 → marsilea-0.4.8}/.gitignore +0 -0
  11. {marsilea-0.4.7 → marsilea-0.4.8}/LICENSE +0 -0
  12. {marsilea-0.4.7 → marsilea-0.4.8}/README.md +0 -0
  13. {marsilea-0.4.7 → marsilea-0.4.8}/pyproject.toml +0 -0
  14. {marsilea-0.4.7 → marsilea-0.4.8}/setup.py +0 -0
  15. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/_api.py +0 -0
  16. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/_deform.py +0 -0
  17. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/dataset.py +0 -0
  18. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/dendrogram.py +0 -0
  19. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/exceptions.py +0 -0
  20. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/heatmap.py +0 -0
  21. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/layers.py +0 -0
  22. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/layout.py +0 -0
  23. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/__init__.py +0 -0
  24. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/_seaborn.py +0 -0
  25. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/_utils.py +0 -0
  26. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/base.py +0 -0
  27. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/images.py +0 -0
  28. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/mesh.py +0 -0
  29. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/plotter/text.py +0 -0
  30. {marsilea-0.4.7 → marsilea-0.4.8}/src/marsilea/utils.py +0 -0
  31. {marsilea-0.4.7 → marsilea-0.4.8}/src/oncoprinter/__init__.py +0 -0
  32. {marsilea-0.4.7 → marsilea-0.4.8}/src/oncoprinter/core.py +0 -0
  33. {marsilea-0.4.7 → marsilea-0.4.8}/src/oncoprinter/preset.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: marsilea
3
- Version: 0.4.7
3
+ Version: 0.4.8
4
4
  Dynamic: Summary
5
5
  Project-URL: Home, https://github.com/Marsilea-viz/marsilea
6
6
  Author: Zhihang Zheng
@@ -1,6 +1,6 @@
1
1
  """Declarative creation of composable visualization"""
2
2
 
3
- __version__ = "0.4.7"
3
+ __version__ = "0.4.8"
4
4
 
5
5
  import marsilea.plotter as plotter
6
6
  from ._deform import Deformation
@@ -169,7 +169,14 @@ class LegendMaker:
169
169
  for _, legs in legends.items():
170
170
  for leg in legs:
171
171
  try:
172
+ # Try to detach legend from figure
172
173
  leg.remove()
174
+ # For matplotlib >= 3.10.0
175
+ if hasattr(leg, "_parent_figure"):
176
+ setattr(leg, "_parent_figure", None)
177
+ # For matplotlib < 3.10.0
178
+ if hasattr(leg, "figure"):
179
+ setattr(leg, "figure", None)
173
180
  except Exception:
174
181
  pass
175
182
 
@@ -231,11 +231,9 @@ class Arc(StatsBase):
231
231
  ax.set_ylim(lim * 1.1, 0)
232
232
  ax.set_xlim(0, 1)
233
233
  if self.side == "top":
234
- if not ax.yaxis_inverted():
235
- ax.invert_yaxis()
234
+ ax.invert_yaxis()
236
235
  if self.side == "left":
237
- if not ax.xaxis_inverted():
238
- ax.invert_xaxis()
236
+ ax.invert_xaxis()
239
237
  ax.set_axis_off()
240
238
 
241
239
  def get_legends(self):
@@ -90,8 +90,7 @@ class Area(StatsBase):
90
90
  ax.plot(data, x, **line_options)
91
91
  ax.set_ylim(-0.5, len(data) - 0.5)
92
92
  if self.side == "left":
93
- if not ax.xaxis_inverted():
94
- ax.invert_xaxis()
93
+ ax.invert_xaxis()
95
94
  else:
96
95
  ax.fill_between(x, data, **fill_options)
97
96
  if self.add_outline:
@@ -270,8 +270,7 @@ class CenterBar(_BarBase):
270
270
  ax.xaxis.set_major_formatter(FuncFormatter(lambda x, p: f"{np.abs(x):g}"))
271
271
 
272
272
  if self.is_flank:
273
- if not ax.yaxis_inverted():
274
- ax.invert_yaxis()
273
+ ax.invert_yaxis()
275
274
 
276
275
  if self.show_value:
277
276
  left_label = _format_labels(left_bar, self.fmt)
@@ -171,12 +171,9 @@ class SeqLogo(StatsBase):
171
171
  ax.set_xlim(0, lim)
172
172
  ax.set_ylim(0, data.shape[1])
173
173
  if self.is_flank:
174
- if not ax.yaxis_inverted():
175
- ax.invert_yaxis()
174
+ ax.invert_yaxis()
176
175
  if self.side == "left":
177
- if not ax.xaxis_inverted():
178
- ax.invert_xaxis()
176
+ ax.invert_xaxis()
179
177
  if self.side == "bottom":
180
- if not ax.yaxis_inverted():
181
- ax.invert_yaxis()
178
+ ax.invert_yaxis()
182
179
  ax.set_axis_off()
@@ -125,8 +125,7 @@ class Range(StatsBase):
125
125
  else:
126
126
  ax.set_xlim(0, len(data))
127
127
  if self.side == "left":
128
- if not ax.xaxis_inverted():
129
- ax.invert_xaxis()
128
+ ax.invert_xaxis()
130
129
 
131
130
  def get_legends(self):
132
131
  return [
@@ -947,7 +947,7 @@ class Upset(WhiteBoard):
947
947
  def _extra_legends(self):
948
948
  handles = [Patch(**entry) for entry in self._legend_entries]
949
949
  highlight_legend = ListLegend(handles=handles, handlelength=2)
950
- highlight_legend.figure = None
950
+ # highlight_legend.set_figure(None)
951
951
  return {"highlight_subsets": [highlight_legend]}
952
952
 
953
953
  def render(self, figure=None, scale=1):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes