jarvisplot 1.0.3__tar.gz → 1.0.5__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.

Potentially problematic release.


This version of jarvisplot might be problematic. Click here for more details.

Files changed (48) hide show
  1. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/PKG-INFO +5 -2
  2. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/README.md +4 -1
  3. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/figure.py +80 -75
  4. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/2x1/rect_cmap.json +4 -4
  5. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/PKG-INFO +5 -2
  6. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/pyproject.toml +1 -1
  7. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/__init__.py +0 -0
  8. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/adapters.py +0 -0
  9. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/cards/std_axes_adapter_config.json +0 -0
  10. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/data_pipelines.py +0 -0
  11. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/helper.py +0 -0
  12. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/Figure/load_data.py +0 -0
  13. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/__init__.py +0 -0
  14. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/1x1/ternary.json +0 -0
  15. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/2x1/rect.json +0 -0
  16. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/2x1/rect5x1.json +0 -0
  17. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/2x1/ternary.json +0 -0
  18. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/2x1/ternary_cmap.json +0 -0
  19. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/4x1/rect.json +0 -0
  20. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/4x1/rect_cmap.json +0 -0
  21. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/4x1/ternary.json +0 -0
  22. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/a4paper/4x1/ternary_cmap.json +0 -0
  23. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/args.json +0 -0
  24. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/colors/colormaps.json +0 -0
  25. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/default/output.json +0 -0
  26. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/gambit/1x1/ternary.json +0 -0
  27. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/gambit/2x1/rect_cmap.json +0 -0
  28. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/gambit/2x1/ternary.json +0 -0
  29. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/gambit/2x1/ternary_cmap.json +0 -0
  30. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/icons/JarvisHEP.png +0 -0
  31. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/icons/gambit.png +0 -0
  32. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/icons/gambit_small.png +0 -0
  33. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cards/style_preference.json +0 -0
  34. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/cli.py +0 -0
  35. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/client.py +0 -0
  36. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/config.py +0 -0
  37. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/core.py +0 -0
  38. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/data_loader.py +0 -0
  39. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/inner_func.py +0 -0
  40. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/utils/__init__.py +0 -0
  41. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/utils/cmaps.py +0 -0
  42. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot/utils/interpolator.py +0 -0
  43. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/SOURCES.txt +0 -0
  44. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/dependency_links.txt +0 -0
  45. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/entry_points.txt +0 -0
  46. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/requires.txt +0 -0
  47. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/jarvisplot.egg-info/top_level.txt +0 -0
  48. {jarvisplot-1.0.3 → jarvisplot-1.0.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jarvisplot
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: JarvisPLOT: YAML-driven plotting engine
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -66,7 +66,7 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
66
66
  ## Requirements
67
67
 
68
68
  ### Python
69
- - **Python ≥ 3.9** (tested on 3.9–3.12)
69
+ - **Python ≥ 3.10** (tested on 3.10–3.13)
70
70
 
71
71
  ### Required Packages
72
72
  - `numpy`
@@ -76,6 +76,9 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
76
76
  - `jsonschema`
77
77
  - `scipy` — numerical utilities
78
78
  - `h5py` — required for loading HDF5 data files
79
+ - `shapely`
80
+ - `scipy`
81
+ - `sympy`
79
82
 
80
83
  ### Github Page
81
84
  [https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT](https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT)
@@ -49,7 +49,7 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
49
49
  ## Requirements
50
50
 
51
51
  ### Python
52
- - **Python ≥ 3.9** (tested on 3.9–3.12)
52
+ - **Python ≥ 3.10** (tested on 3.10–3.13)
53
53
 
54
54
  ### Required Packages
55
55
  - `numpy`
@@ -59,6 +59,9 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
59
59
  - `jsonschema`
60
60
  - `scipy` — numerical utilities
61
61
  - `h5py` — required for loading HDF5 data files
62
+ - `shapely`
63
+ - `scipy`
64
+ - `sympy`
62
65
 
63
66
  ### Github Page
64
67
  [https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT](https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT)
@@ -217,10 +217,10 @@ class Figure:
217
217
  if xscale not in ('log', 'symlog', 'logit'):
218
218
  fmt = mticker.ScalarFormatter(useMathText=True)
219
219
  # Do not use sci/offset for small exponents like 10^-1; reserve for <=1e-2 or >=1e4
220
- fmt.set_powerlimits((-2, 4))
220
+ fmt.set_powerlimits((-3, 4))
221
221
  axis.set_major_formatter(fmt)
222
222
  try:
223
- target.ticklabel_format(style='sci', axis='x', scilimits=(-2, 4))
223
+ target.ticklabel_format(style='sci', axis='x', scilimits=(-3, 4))
224
224
  except Exception:
225
225
  pass
226
226
  try:
@@ -255,71 +255,70 @@ class Figure:
255
255
  return
256
256
 
257
257
  # --- Y axis formatting
258
- if which != 'y':
259
- return
258
+ if which == 'y':
260
259
 
261
- # Detect scale
262
- try:
263
- yscale = target.get_yscale()
264
- except Exception:
265
- yscale = None
260
+ # Detect scale
261
+ try:
262
+ yscale = target.get_yscale()
263
+ except Exception:
264
+ yscale = None
266
265
 
267
- # 1) Log-like y-axis: compact decimals in range, otherwise default log formatter
268
- if yscale in ('log', 'symlog', 'logit'):
269
- from matplotlib.ticker import LogFormatterMathtext, FuncFormatter
266
+ # 1) Log-like y-axis: compact decimals in range, otherwise default log formatter
267
+ if yscale in ('log', 'symlog', 'logit'):
268
+ from matplotlib.ticker import LogFormatterMathtext, FuncFormatter
270
269
 
271
- base = LogFormatterMathtext()
272
- lo, hi = 1e-2, 1e2 # compact decimal range
270
+ base = LogFormatterMathtext()
271
+ lo, hi = 1e-2, 1e2 # compact decimal range
273
272
 
274
- def _fmt(val, pos=None):
275
- if val is None or val <= 0:
276
- return ""
273
+ def _fmt(val, pos=None):
274
+ if val is None or val <= 0:
275
+ return ""
276
+ try:
277
+ exp = np.log10(val)
278
+ except Exception:
279
+ return ""
280
+ # Only label exact decades
281
+ if (not np.isfinite(exp)) or (not np.isclose(exp, round(exp))):
282
+ return ""
283
+
284
+ if lo <= val <= hi:
285
+ e = int(round(exp))
286
+ if e >= 0:
287
+ return f"{int(10**e)}"
288
+ # e=-1 -> 0.1 (1 dp), e=-2 -> 0.01 (2 dp)
289
+ return f"{10**e:.{abs(e)}f}"
290
+
291
+ # outside compact range: defer to Matplotlib
292
+ return base(val, pos)
293
+
294
+ axis.set_major_formatter(FuncFormatter(_fmt))
295
+ return
296
+
297
+ # 2) Linear y-axis: ScalarFormatter sci notation
298
+ fmt = mticker.ScalarFormatter(useMathText=True)
299
+ # Do not use sci/offset for small exponents like 10^-1; reserve for <=1e-2 or >=1e4
300
+ fmt.set_powerlimits((-3, 4))
301
+ axis.set_major_formatter(fmt)
302
+ try:
303
+ target.ticklabel_format(style='sci', axis='y', scilimits=(-3, 4))
304
+ except Exception:
305
+ pass
306
+ try:
307
+ axis.set_offset_position('left')
308
+ except Exception:
309
+ pass
310
+ mpl.rcParams['axes.formatter.useoffset'] = True
311
+ try:
312
+ target.figure.canvas.draw_idle()
313
+ # shrink offset text a bit
277
314
  try:
278
- exp = np.log10(val)
315
+ tl = axis.get_ticklabels()
316
+ if tl:
317
+ axis.offsetText.set_fontsize(tl[0].get_size() * 0.8)
279
318
  except Exception:
280
- return ""
281
- # Only label exact decades
282
- if (not np.isfinite(exp)) or (not np.isclose(exp, round(exp))):
283
- return ""
284
-
285
- if lo <= val <= hi:
286
- e = int(round(exp))
287
- if e >= 0:
288
- return f"{int(10**e)}"
289
- # e=-1 -> 0.1 (1 dp), e=-2 -> 0.01 (2 dp)
290
- return f"{10**e:.{abs(e)}f}"
291
-
292
- # outside compact range: defer to Matplotlib
293
- return base(val, pos)
294
-
295
- axis.set_major_formatter(FuncFormatter(_fmt))
296
- return
297
-
298
- # 2) Linear y-axis: ScalarFormatter sci notation
299
- fmt = mticker.ScalarFormatter(useMathText=True)
300
- # Do not use sci/offset for small exponents like 10^-1; reserve for <=1e-2 or >=1e4
301
- fmt.set_powerlimits((-2, 4))
302
- axis.set_major_formatter(fmt)
303
- try:
304
- target.ticklabel_format(style='sci', axis='y', scilimits=(-2, 4))
305
- except Exception:
306
- pass
307
- try:
308
- axis.set_offset_position('left')
309
- except Exception:
310
- pass
311
- mpl.rcParams['axes.formatter.useoffset'] = True
312
- try:
313
- target.figure.canvas.draw_idle()
314
- # shrink offset text a bit
315
- try:
316
- tl = axis.get_ticklabels()
317
- if tl:
318
- axis.offsetText.set_fontsize(tl[0].get_size() * 0.8)
319
+ pass
319
320
  except Exception:
320
321
  pass
321
- except Exception:
322
- pass
323
322
 
324
323
  except Exception:
325
324
  # Always fail silently here; tick post-processing must never crash plotting.
@@ -857,13 +856,31 @@ class Figure:
857
856
  if "color" in self.frame['ax']['spines']:
858
857
  for s in self.axes['ax'].spines.values():
859
858
  s.set_color(self.frame['ax']['spines']['color'])
859
+
860
+ def _safe_cast(v):
861
+ try:
862
+ return float(v)
863
+ except Exception:
864
+ return v
865
+
866
+ xlim = self.frame["ax"].get("xlim")
867
+ if xlim:
868
+ xlim = list(map(_safe_cast, xlim))
869
+ self.ax.set_xlim(xlim)
870
+
871
+ ylim = self.frame["ax"].get("ylim")
872
+ if ylim:
873
+ ylim = list(map(_safe_cast, ylim))
874
+ self.ax.set_ylim(ylim)
875
+
860
876
 
877
+ from matplotlib.ticker import AutoMinorLocator, MaxNLocator, AutoLocator
861
878
  if self.frame['ax'].get("yscale", "").lower() == 'log':
862
879
  self.ax.set_yscale("log")
863
880
  from matplotlib.ticker import LogLocator
864
881
  self.ax.yaxis.set_minor_locator(LogLocator(subs='auto'))
865
882
  else:
866
- from matplotlib.ticker import AutoMinorLocator
883
+ self.ax.yaxis.set_major_locator(MaxNLocator(nbins=5, min_n_ticks=4))
867
884
  self.ax.yaxis.set_minor_locator(AutoMinorLocator())
868
885
 
869
886
  if self.frame['ax'].get("xscale", "").lower() == 'log':
@@ -871,14 +888,10 @@ class Figure:
871
888
  from matplotlib.ticker import LogLocator
872
889
  self.ax.xaxis.set_minor_locator(LogLocator(subs='auto'))
873
890
  else:
874
- from matplotlib.ticker import AutoMinorLocator
891
+ self.ax.xaxis.set_major_locator(MaxNLocator(nbins=5, min_n_ticks=4))
875
892
  self.ax.xaxis.set_minor_locator(AutoMinorLocator())
876
893
 
877
- def _safe_cast(v):
878
- try:
879
- return float(v)
880
- except Exception:
881
- return v
894
+
882
895
 
883
896
  if self.frame["ax"].get("text"):
884
897
  for txt in self.frame["ax"]["text"]:
@@ -889,15 +902,6 @@ class Figure:
889
902
  self.ax.text(**txt)
890
903
 
891
904
 
892
- xlim = self.frame["ax"].get("xlim")
893
- if xlim:
894
- xlim = list(map(_safe_cast, xlim))
895
- self.ax.set_xlim(xlim)
896
-
897
- ylim = self.frame["ax"].get("ylim")
898
- if ylim:
899
- ylim = list(map(_safe_cast, ylim))
900
- self.ax.set_ylim(ylim)
901
905
 
902
906
  if self.frame['ax']['labels'].get("x"):
903
907
  self.ax.set_xlabel(self.frame['ax']['labels']['x'], **self.frame['ax']['labels']['xlabel'])
@@ -1176,6 +1180,7 @@ class Figure:
1176
1180
 
1177
1181
  if "frame" in info:
1178
1182
  self.frame = info['frame']
1183
+ self.logger.debug("Figure frame information loaded")
1179
1184
 
1180
1185
  import matplotlib.pyplot as plt
1181
1186
  plt.rcParams['mathtext.fontset'] = 'stix'
@@ -92,16 +92,16 @@
92
92
  "zorder": 1000,
93
93
  "xlabel": {
94
94
  "loc": "center",
95
- "fontsize": 12,
95
+ "fontsize": 11,
96
96
  "fontfamily": "STIXGeneral"
97
97
  },
98
98
  "ylabel": {
99
99
  "loc": "center",
100
- "fontsize": 12,
100
+ "fontsize": 11,
101
101
  "fontfamily": "STIXGeneral"
102
102
  },
103
103
  "ylabel_coords": {
104
- "x": -0.12,
104
+ "x": -0.11,
105
105
  "y": 0.5
106
106
  }
107
107
  }
@@ -138,7 +138,7 @@
138
138
  "label": {
139
139
  "ylabel": "",
140
140
  "loc": "center",
141
- "fontsize": 12,
141
+ "fontsize": 11,
142
142
  "fontfamily": "STIXGeneral"
143
143
  },
144
144
  "ticks": {
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: jarvisplot
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: JarvisPLOT: YAML-driven plotting engine
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -66,7 +66,7 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
66
66
  ## Requirements
67
67
 
68
68
  ### Python
69
- - **Python ≥ 3.9** (tested on 3.9–3.12)
69
+ - **Python ≥ 3.10** (tested on 3.10–3.13)
70
70
 
71
71
  ### Required Packages
72
72
  - `numpy`
@@ -76,6 +76,9 @@ jplot ./bin/SUSYRun2_GEWMSSM.yaml
76
76
  - `jsonschema`
77
77
  - `scipy` — numerical utilities
78
78
  - `h5py` — required for loading HDF5 data files
79
+ - `shapely`
80
+ - `scipy`
81
+ - `sympy`
79
82
 
80
83
  ### Github Page
81
84
  [https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT](https://github.com/Pengxuan-Zhu-Phys/Jarvis-PLOT)
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "jarvisplot"
7
- version = "1.0.3"
7
+ version = "1.0.5"
8
8
  description = "JarvisPLOT: YAML-driven plotting engine"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
File without changes
File without changes