maidr 0.13.0__tar.gz → 0.14.0__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.13.0 → maidr-0.14.0}/PKG-INFO +1 -1
  2. {maidr-0.13.0 → maidr-0.14.0}/maidr/__init__.py +1 -1
  3. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/maidr.py +3 -2
  4. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/barplot.py +1 -1
  5. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/lineplot.py +4 -0
  6. {maidr-0.13.0 → maidr-0.14.0}/pyproject.toml +1 -1
  7. {maidr-0.13.0 → maidr-0.14.0}/LICENSE +0 -0
  8. {maidr-0.13.0 → maidr-0.14.0}/README.md +0 -0
  9. {maidr-0.13.0 → maidr-0.14.0}/maidr/api.py +0 -0
  10. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/__init__.py +0 -0
  11. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/context_manager.py +0 -0
  12. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/enum/__init__.py +0 -0
  13. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/enum/library.py +0 -0
  14. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/enum/maidr_key.py +0 -0
  15. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/enum/plot_type.py +0 -0
  16. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/figure_manager.py +0 -0
  17. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/__init__.py +0 -0
  18. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/boxplot.py +0 -0
  19. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/grouped_barplot.py +0 -0
  20. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/heatmap.py +0 -0
  21. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/histogram.py +0 -0
  22. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/maidr_plot.py +0 -0
  23. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/maidr_plot_factory.py +0 -0
  24. {maidr-0.13.0 → maidr-0.14.0}/maidr/core/plot/scatterplot.py +0 -0
  25. {maidr-0.13.0 → maidr-0.14.0}/maidr/exception/__init__.py +0 -0
  26. {maidr-0.13.0 → maidr-0.14.0}/maidr/exception/extraction_error.py +0 -0
  27. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/__init__.py +0 -0
  28. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/barplot.py +0 -0
  29. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/boxplot.py +0 -0
  30. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/clear.py +0 -0
  31. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/common.py +0 -0
  32. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/heatmap.py +0 -0
  33. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/highlight.py +0 -0
  34. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/histogram.py +0 -0
  35. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/lineplot.py +0 -0
  36. {maidr-0.13.0 → maidr-0.14.0}/maidr/patch/scatterplot.py +0 -0
  37. {maidr-0.13.0 → maidr-0.14.0}/maidr/util/__init__.py +0 -0
  38. {maidr-0.13.0 → maidr-0.14.0}/maidr/util/environment.py +0 -0
  39. {maidr-0.13.0 → maidr-0.14.0}/maidr/util/mixin/__init__.py +0 -0
  40. {maidr-0.13.0 → maidr-0.14.0}/maidr/util/mixin/extractor_mixin.py +0 -0
  41. {maidr-0.13.0 → maidr-0.14.0}/maidr/util/mixin/merger_mixin.py +0 -0
  42. {maidr-0.13.0 → maidr-0.14.0}/maidr/widget/__init__.py +0 -0
  43. {maidr-0.13.0 → maidr-0.14.0}/maidr/widget/shiny.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: maidr
3
- Version: 0.13.0
3
+ Version: 0.14.0
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
@@ -1,4 +1,4 @@
1
- __version__ = "0.13.0"
1
+ __version__ = "0.14.0"
2
2
 
3
3
  from .api import close, render, save_html, set_engine, show, stacked
4
4
  from .core import Maidr
@@ -44,6 +44,7 @@ class Maidr:
44
44
  self._fig = fig
45
45
  self._plots = []
46
46
  self.maidr_id = None
47
+ self.selector_id = Maidr._unique_id()
47
48
 
48
49
  @property
49
50
  def fig(self) -> Figure:
@@ -125,7 +126,7 @@ class Maidr:
125
126
  maidr = f"\nlet maidr = {json.dumps(self._flatten_maidr(), indent=2)}\n"
126
127
 
127
128
  # In SVG we will replace maidr=id with the unique id.
128
- svg = svg.replace('maidr="true"', f'maidr="{self.maidr_id}"')
129
+ svg = svg.replace('maidr="true"', f'maidr="{self.selector_id}"')
129
130
 
130
131
  # Inject plot's svg and MAIDR structure into html tag.
131
132
  return Maidr._inject_plot(svg, maidr, self.maidr_id)
@@ -142,7 +143,7 @@ class Maidr:
142
143
  for plot in maidr:
143
144
  if MaidrKey.SELECTOR in plot:
144
145
  plot[MaidrKey.SELECTOR] = plot[MaidrKey.SELECTOR].replace(
145
- "maidr='true'", f"maidr='{self.maidr_id}'"
146
+ "maidr='true'", f"maidr='{self.selector_id}'"
146
147
  )
147
148
 
148
149
  return maidr if len(maidr) != 1 else maidr[0]
@@ -41,7 +41,7 @@ class BarPlot(MaidrPlot, ContainerExtractorMixin, LevelExtractorMixin, DictMerge
41
41
  combined_data = (
42
42
  zip(levels, data) if plot[0].orientation == "vertical" else zip(levels, data) # type: ignore
43
43
  )
44
- if len(data) != len(plot): # type: ignore
44
+ if len(data) == len(plot): # type: ignore
45
45
  for x, y in combined_data: # type: ignore
46
46
  formatted_data.append({"x": x, "y": y})
47
47
  return formatted_data
@@ -6,6 +6,7 @@ from matplotlib.lines import Line2D
6
6
  from maidr.core.enum import MaidrKey, PlotType
7
7
  from maidr.core.plot import MaidrPlot
8
8
  from maidr.exception import ExtractionError
9
+ from maidr.util.environment import Environment
9
10
  from maidr.util.mixin import LineExtractorMixin
10
11
 
11
12
 
@@ -19,6 +20,9 @@ class LinePlot(MaidrPlot, LineExtractorMixin):
19
20
  def _extract_plot_data(self) -> list[dict]:
20
21
  plot = self.extract_line(self.ax)
21
22
  data = self._extract_line_data(plot)
23
+ engine = Environment.get_engine()
24
+ if engine == "ts":
25
+ data = [data]
22
26
 
23
27
  if data is None:
24
28
  raise ExtractionError(self.type, plot)
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [tool.poetry]
6
6
  name = "maidr"
7
- version = "0.13.0"
7
+ version = "0.14.0"
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
File without changes
File without changes