maidr 0.25.0__tar.gz → 0.25.2__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 (43) hide show
  1. {maidr-0.25.0 → maidr-0.25.2}/PKG-INFO +2 -2
  2. {maidr-0.25.0 → maidr-0.25.2}/README.md +1 -1
  3. {maidr-0.25.0 → maidr-0.25.2}/maidr/__init__.py +1 -1
  4. {maidr-0.25.0 → maidr-0.25.2}/maidr/api.py +6 -3
  5. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/maidr.py +6 -1
  6. {maidr-0.25.0 → maidr-0.25.2}/pyproject.toml +1 -1
  7. {maidr-0.25.0 → maidr-0.25.2}/LICENSE +0 -0
  8. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/__init__.py +0 -0
  9. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/context_manager.py +0 -0
  10. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/enum/__init__.py +0 -0
  11. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/enum/library.py +0 -0
  12. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/enum/maidr_key.py +0 -0
  13. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/enum/plot_type.py +0 -0
  14. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/figure_manager.py +0 -0
  15. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/__init__.py +0 -0
  16. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/barplot.py +0 -0
  17. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/boxplot.py +0 -0
  18. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/grouped_barplot.py +0 -0
  19. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/heatmap.py +0 -0
  20. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/histogram.py +0 -0
  21. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/lineplot.py +0 -0
  22. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/maidr_plot.py +0 -0
  23. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/maidr_plot_factory.py +0 -0
  24. {maidr-0.25.0 → maidr-0.25.2}/maidr/core/plot/scatterplot.py +0 -0
  25. {maidr-0.25.0 → maidr-0.25.2}/maidr/exception/__init__.py +0 -0
  26. {maidr-0.25.0 → maidr-0.25.2}/maidr/exception/extraction_error.py +0 -0
  27. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/__init__.py +0 -0
  28. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/barplot.py +0 -0
  29. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/boxplot.py +0 -0
  30. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/clear.py +0 -0
  31. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/common.py +0 -0
  32. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/heatmap.py +0 -0
  33. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/highlight.py +0 -0
  34. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/histogram.py +0 -0
  35. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/lineplot.py +0 -0
  36. {maidr-0.25.0 → maidr-0.25.2}/maidr/patch/scatterplot.py +0 -0
  37. {maidr-0.25.0 → maidr-0.25.2}/maidr/util/__init__.py +0 -0
  38. {maidr-0.25.0 → maidr-0.25.2}/maidr/util/environment.py +0 -0
  39. {maidr-0.25.0 → maidr-0.25.2}/maidr/util/mixin/__init__.py +0 -0
  40. {maidr-0.25.0 → maidr-0.25.2}/maidr/util/mixin/extractor_mixin.py +0 -0
  41. {maidr-0.25.0 → maidr-0.25.2}/maidr/util/mixin/merger_mixin.py +0 -0
  42. {maidr-0.25.0 → maidr-0.25.2}/maidr/widget/__init__.py +0 -0
  43. {maidr-0.25.0 → maidr-0.25.2}/maidr/widget/shiny.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: maidr
3
- Version: 0.25.0
3
+ Version: 0.25.2
4
4
  Summary: Multimodal Access and Interactive Data Representations
5
5
  License: GPL-3.0-or-later
6
6
  Keywords: accessibility,visualization,sonification,braille,tactile,multimodal,data representation,blind,low vision,visual impairments
@@ -39,7 +39,7 @@ Description-Content-Type: text/markdown
39
39
 
40
40
  <div align="center">
41
41
 
42
- <img src="https://github.com/xability/maidr/blob/main/logo/logo.svg" width="350px" alt="A stylized MAIDR logo, with curved characters for M A, a hand pointing for an I, the D character, and R represented in braille."/>
42
+ <img src="https://raw.githubusercontent.com/xability/maidr/main/docs/logo/logo.svg" width="350px" alt="A stylized MAIDR logo, with curved characters for M A, a hand pointing for an I, the D character, and R represented in braille."/>
43
43
 
44
44
  <hr style="color:transparent" />
45
45
  <br />
@@ -1,6 +1,6 @@
1
1
  <div align="center">
2
2
 
3
- <img src="https://github.com/xability/maidr/blob/main/logo/logo.svg" width="350px" alt="A stylized MAIDR logo, with curved characters for M A, a hand pointing for an I, the D character, and R represented in braille."/>
3
+ <img src="https://raw.githubusercontent.com/xability/maidr/main/docs/logo/logo.svg" width="350px" alt="A stylized MAIDR logo, with curved characters for M A, a hand pointing for an I, the D character, and R represented in braille."/>
4
4
 
5
5
  <hr style="color:transparent" />
6
6
  <br />
@@ -1,4 +1,4 @@
1
- __version__ = "0.25.0"
1
+ __version__ = "0.25.2"
2
2
 
3
3
  from .api import close, render, save_html, show, stacked
4
4
  from .core import Maidr
@@ -9,7 +9,6 @@ from matplotlib.container import BarContainer
9
9
  from maidr.core import Maidr
10
10
  from maidr.core.enum import PlotType
11
11
  from maidr.core.figure_manager import FigureManager
12
- from maidr.util.environment import Environment
13
12
 
14
13
 
15
14
  def render(plot: Any) -> Tag:
@@ -18,7 +17,11 @@ def render(plot: Any) -> Tag:
18
17
  return maidr.render()
19
18
 
20
19
 
21
- def show(plot: Any, renderer: Literal["auto", "ipython", "browser"] = "auto") -> object:
20
+ def show(
21
+ plot: Any,
22
+ renderer: Literal["auto", "ipython", "browser"] = "auto",
23
+ clear_fig: bool = True,
24
+ ) -> object:
22
25
  ax = FigureManager.get_axes(plot)
23
26
  if isinstance(ax, list):
24
27
  for axes in ax:
@@ -26,7 +29,7 @@ def show(plot: Any, renderer: Literal["auto", "ipython", "browser"] = "auto") ->
26
29
  return maidr.show(renderer)
27
30
  else:
28
31
  maidr = FigureManager.get_maidr(ax.get_figure())
29
- return maidr.show(renderer)
32
+ return maidr.show(renderer, clear_fig=clear_fig)
30
33
 
31
34
 
32
35
  def save_html(
@@ -8,6 +8,7 @@ import uuid
8
8
  import webbrowser
9
9
  from typing import Any, Literal
10
10
 
11
+ import matplotlib.pyplot as plt
11
12
  from htmltools import HTML, HTMLDocument, Tag, tags
12
13
  from lxml import etree
13
14
  from matplotlib.figure import Figure
@@ -21,7 +22,8 @@ from maidr.util.environment import Environment
21
22
 
22
23
  class Maidr:
23
24
  """
24
- A class to handle the rendering and interaction of matplotlib figures with additional metadata.
25
+ A class to handle the rendering and interaction
26
+ of matplotlib figures with additional metadata.
25
27
 
26
28
  Attributes
27
29
  ----------
@@ -84,6 +86,7 @@ class Maidr:
84
86
  def show(
85
87
  self,
86
88
  renderer: Literal["auto", "ipython", "browser"] = "auto",
89
+ clear_fig: bool = True,
87
90
  ) -> object:
88
91
  """
89
92
  Preview the HTML content using the specified renderer.
@@ -99,6 +102,8 @@ class Maidr:
99
102
  Environment.is_interactive_shell() and not Environment.is_notebook()
100
103
  ):
101
104
  return self._open_plot_in_browser()
105
+ if clear_fig:
106
+ plt.close()
102
107
  return html.show(renderer)
103
108
 
104
109
  def clear(self):
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "maidr"
7
- version = "0.25.0"
7
+ version = "0.25.2"
8
8
  description = "Multimodal Access and Interactive Data Representations"
9
9
  authors = [
10
10
  "JooYoung Seo <jseo1005@illinois.edu>",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes