icplot 0.1.2__tar.gz → 0.1.3__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 (37) hide show
  1. {icplot-0.1.2/src/icplot.egg-info → icplot-0.1.3}/PKG-INFO +2 -2
  2. {icplot-0.1.2 → icplot-0.1.3}/pyproject.toml +1 -1
  3. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/axis.py +1 -0
  4. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/generator.py +6 -5
  5. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/matplotlib.py +7 -2
  6. {icplot-0.1.2 → icplot-0.1.3/src/icplot.egg-info}/PKG-INFO +2 -2
  7. {icplot-0.1.2 → icplot-0.1.3}/LICENSE +0 -0
  8. {icplot-0.1.2 → icplot-0.1.3}/README.md +0 -0
  9. {icplot-0.1.2 → icplot-0.1.3}/setup.cfg +0 -0
  10. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/__init__.py +0 -0
  11. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/cairo_interface.py +0 -0
  12. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/color.py +0 -0
  13. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/convert.py +0 -0
  14. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/gantt/__init__.py +0 -0
  15. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/gantt/gantt.py +0 -0
  16. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/gantt/gantt_renderer.py +0 -0
  17. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/gantt/pgfgantt.py +0 -0
  18. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/geometry.py +0 -0
  19. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/__init__.py +0 -0
  20. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/plot.py +0 -0
  21. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/graph/series.py +0 -0
  22. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/image_utils.py +0 -0
  23. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/main_cli.py +0 -0
  24. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/py.typed +0 -0
  25. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/tex.py +0 -0
  26. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/trace/__init__.py +0 -0
  27. {icplot-0.1.2 → icplot-0.1.3}/src/icplot/trace/trace.py +0 -0
  28. {icplot-0.1.2 → icplot-0.1.3}/src/icplot.egg-info/SOURCES.txt +0 -0
  29. {icplot-0.1.2 → icplot-0.1.3}/src/icplot.egg-info/dependency_links.txt +0 -0
  30. {icplot-0.1.2 → icplot-0.1.3}/src/icplot.egg-info/entry_points.txt +0 -0
  31. {icplot-0.1.2 → icplot-0.1.3}/src/icplot.egg-info/requires.txt +0 -0
  32. {icplot-0.1.2 → icplot-0.1.3}/src/icplot.egg-info/top_level.txt +0 -0
  33. {icplot-0.1.2 → icplot-0.1.3}/test/test_cairo_interface.py +0 -0
  34. {icplot-0.1.2 → icplot-0.1.3}/test/test_gantt_chart.py +0 -0
  35. {icplot-0.1.2 → icplot-0.1.3}/test/test_image_utils.py +0 -0
  36. {icplot-0.1.2 → icplot-0.1.3}/test/test_line_plots.py +0 -0
  37. {icplot-0.1.2 → icplot-0.1.3}/test/test_tex_interface.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: icplot
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Utilities for generating plots and graphics for technical reports.
5
5
  Author-email: "James Grogan, Irish Centre for High End Computing" <james.grogan@ichec.ie>
6
6
  Project-URL: Repository, https://git.ichec.ie/performance/toolshed/icplot
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "icplot"
3
- version = "0.1.2"
3
+ version = "0.1.3"
4
4
  authors = [
5
5
  { name="James Grogan, Irish Centre for High End Computing", email="james.grogan@ichec.ie" },
6
6
  ]
@@ -29,6 +29,7 @@ class PlotAxis(BaseModel, frozen=True):
29
29
 
30
30
  label: str = ""
31
31
  ticks: Range | None = None
32
+ scale: str = "linear"
32
33
 
33
34
  @property
34
35
  def resolved_ticks(self) -> list:
@@ -45,23 +45,24 @@ def make_plots(
45
45
 
46
46
  # Use a user-provided 'point_func' to get the series 'x, y' points
47
47
  # from the results, given a 'x_attr, y_attr' pair
48
- points = [point_func(r, config.x_attr, y_attr) for r in label_results].sort(
49
- key=lambda x: x[0]
48
+ all_points = [point_func(r, config.x_attr, y_attr) for r in label_results]
49
+ points = sorted(
50
+ [x for x in all_points if x is not None], key=lambda x: x[0]
50
51
  )
51
- x, y = zip(*points)
52
+ x, y = [list(xy) for xy in zip(*points)]
52
53
 
53
54
  if label in config.colormap:
54
55
  series.append(
55
56
  LinePlotSeries(
56
57
  x=x,
57
58
  y=y,
58
- label=label,
59
+ label=str(label),
59
60
  highlight=True,
60
61
  color=config.colormap[label],
61
62
  )
62
63
  )
63
64
  else:
64
- series.append(LinePlotSeries(x=x, y=y, label=label))
65
+ series.append(LinePlotSeries(x=x, y=y, label=str(label)))
65
66
  plots.append(plot_template.copy(update={"name": y_attr, "series": series}))
66
67
  return plots
67
68
 
@@ -26,10 +26,15 @@ class MatplotlibColorMap(ColorMap):
26
26
  def _set_decorations(axs, plot: Plot):
27
27
  ax = axs[0]
28
28
  if plot.legend.lower() != "none":
29
- ax.legend(loc=plot.legend)
29
+ lines = []
30
+ for axis in axs:
31
+ for line in axis.lines:
32
+ lines.append(line)
33
+ ax.legend(handles=lines, loc=plot.legend)
30
34
  if plot.x_axis.label:
31
35
  ax.set_xlabel(plot.x_axis.label)
32
36
  for idx, y_axis in enumerate(plot.y_axes):
37
+ axs[idx].set_yscale(y_axis.scale)
33
38
  if y_axis.label:
34
39
  axs[idx].set_ylabel(y_axis.label)
35
40
  if y_axis.ticks:
@@ -47,7 +52,7 @@ def _plot_line(axs, series: LinePlotSeries, color: Color | None):
47
52
  ax = axs[1]
48
53
 
49
54
  if color:
50
- render_color: list | None = series.color.as_list()
55
+ render_color: list | None = color.as_list()
51
56
  else:
52
57
  render_color = None
53
58
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.2
2
2
  Name: icplot
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Utilities for generating plots and graphics for technical reports.
5
5
  Author-email: "James Grogan, Irish Centre for High End Computing" <james.grogan@ichec.ie>
6
6
  Project-URL: Repository, https://git.ichec.ie/performance/toolshed/icplot
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