grplot 0.14.4__tar.gz → 0.14.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.
Files changed (158) hide show
  1. {grplot-0.14.4 → grplot-0.14.5}/PKG-INFO +1 -1
  2. {grplot-0.14.4 → grplot-0.14.5}/grplot/__init__.py +1 -1
  3. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/statdesc_sep/statdesc_sep_def.py +5 -4
  4. grplot-0.14.5/grplot/utils/trim_to_3_nonzero_after_decimal.py +37 -0
  5. {grplot-0.14.4 → grplot-0.14.5}/grplot.egg-info/PKG-INFO +1 -1
  6. {grplot-0.14.4 → grplot-0.14.5}/grplot.egg-info/SOURCES.txt +1 -0
  7. {grplot-0.14.4 → grplot-0.14.5}/setup.py +1 -1
  8. {grplot-0.14.4 → grplot-0.14.5}/LICENSE +0 -0
  9. {grplot-0.14.4 → grplot-0.14.5}/README.md +0 -0
  10. {grplot-0.14.4 → grplot-0.14.5}/grplot/analytic/__init__.py +0 -0
  11. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/__init__.py +0 -0
  12. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/label_add/__init__.py +0 -0
  13. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/label_add/check_label_add.py +0 -0
  14. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/label_add/label_add_def.py +0 -0
  15. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/label_add/label_add_type.py +0 -0
  16. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/statdesc_add/__init__.py +0 -0
  17. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/statdesc_add/statdesc_add_def.py +0 -0
  18. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/statdesc_add/statdesc_add_type.py +0 -0
  19. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/text_add/__init__.py +0 -0
  20. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/text_add/text_add_def.py +0 -0
  21. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/text_add/text_add_type.py +0 -0
  22. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/tick_add/__init__.py +0 -0
  23. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/tick_add/check_tick_add.py +0 -0
  24. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/tick_add/tick_add_def.py +0 -0
  25. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/add/tick_add/tick_add_type.py +0 -0
  26. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/dt/__init__.py +0 -0
  27. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/dt/check_dt.py +0 -0
  28. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/dt/dt_def.py +0 -0
  29. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/dt/dt_type.py +0 -0
  30. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/filter/__init__.py +0 -0
  31. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/filter/check_filter.py +0 -0
  32. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/filter/filter_def.py +0 -0
  33. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/font/__init__.py +0 -0
  34. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/font/check_fontsize.py +0 -0
  35. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/font/font_def.py +0 -0
  36. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/label/__init__.py +0 -0
  37. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/label/check_label.py +0 -0
  38. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/label/label_def.py +0 -0
  39. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/label/label_type.py +0 -0
  40. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/legend/__init__.py +0 -0
  41. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/legend/check_legend.py +0 -0
  42. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/lim/__init__.py +0 -0
  43. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/lim/check_lim.py +0 -0
  44. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/lim/lim_def.py +0 -0
  45. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/lim/lim_type.py +0 -0
  46. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/log/__init__.py +0 -0
  47. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/log/check_log.py +0 -0
  48. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/log/log_def.py +0 -0
  49. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/log/log_type.py +0 -0
  50. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/optimizer/__init__.py +0 -0
  51. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/optimizer/optimizer_analytic.py +0 -0
  52. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/optimizer/optimizer_data.py +0 -0
  53. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/optimizer/optimizer_key.py +0 -0
  54. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/pad/__init__.py +0 -0
  55. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/pad/check_pad.py +0 -0
  56. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/__init__.py +0 -0
  57. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/packedbubbles.py +0 -0
  58. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/plot_multi_def.py +0 -0
  59. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/plot_single_def.py +0 -0
  60. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/plot_type.py +0 -0
  61. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/plot/treemaps.py +0 -0
  62. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/rot/__init__.py +0 -0
  63. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/rot/check_rot.py +0 -0
  64. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/rot/rot_def.py +0 -0
  65. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/rot/rot_type.py +0 -0
  66. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/saveas/__init__.py +0 -0
  67. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/saveas/check_saveas.py +0 -0
  68. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/saveas/saveas_type.py +0 -0
  69. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/statdesc_sep/__init__.py +0 -0
  70. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/statdesc_sep/statdesc_sep_data_def.py +0 -0
  71. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/statdesc_sep/statdesc_sep_type.py +0 -0
  72. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/text_sep/__init__.py +0 -0
  73. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/text_sep/text_sep_data_def.py +0 -0
  74. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/text_sep/text_sep_def.py +0 -0
  75. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/text_sep/text_sep_type.py +0 -0
  76. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/tick_sep/__init__.py +0 -0
  77. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/tick_sep/check_tick_sep.py +0 -0
  78. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/tick_sep/tick_sep_data_def.py +0 -0
  79. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/tick_sep/tick_sep_def.py +0 -0
  80. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/sep/tick_sep/tick_sep_type.py +0 -0
  81. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/statdesc/__init__.py +0 -0
  82. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/statdesc/check_statdesc.py +0 -0
  83. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/statdesc/statdesc_multi_def.py +0 -0
  84. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/statdesc/statdesc_plot_def.py +0 -0
  85. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/statdesc/statdesc_type.py +0 -0
  86. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/text/__init__.py +0 -0
  87. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/text/check_text.py +0 -0
  88. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/text/text_def.py +0 -0
  89. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/text/text_type.py +0 -0
  90. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/title/__init__.py +0 -0
  91. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/title/check_title.py +0 -0
  92. {grplot-0.14.4 → grplot-0.14.5}/grplot/features/title/title_def.py +0 -0
  93. {grplot-0.14.4 → grplot-0.14.5}/grplot/hotfix/__init__.py +0 -0
  94. {grplot-0.14.4 → grplot-0.14.5}/grplot/hotfix/axislabel_fix.py +0 -0
  95. {grplot-0.14.4 → grplot-0.14.5}/grplot/hotfix/histplot_legend_fix.py +0 -0
  96. {grplot-0.14.4 → grplot-0.14.5}/grplot/hotfix/histplot_percent_add.py +0 -0
  97. {grplot-0.14.4 → grplot-0.14.5}/grplot/setting.py +0 -0
  98. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/__init__.py +0 -0
  99. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/arg_ax_type.py +0 -0
  100. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/arg_axis_ax_type.py +0 -0
  101. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/arg_plot_ax_type.py +0 -0
  102. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/check_axes.py +0 -0
  103. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/check_data_structure.py +0 -0
  104. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/check_pandas_index.py +0 -0
  105. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/first_valid_index.py +0 -0
  106. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/scientific_superscript.py +0 -0
  107. {grplot-0.14.4 → grplot-0.14.5}/grplot/utils/strtoarray.py +0 -0
  108. {grplot-0.14.4 → grplot-0.14.5}/grplot.egg-info/dependency_links.txt +0 -0
  109. {grplot-0.14.4 → grplot-0.14.5}/grplot.egg-info/requires.txt +0 -0
  110. {grplot-0.14.4 → grplot-0.14.5}/grplot.egg-info/top_level.txt +0 -0
  111. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/__init__.py +0 -0
  112. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/_core.py +0 -0
  113. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/_decorators.py +0 -0
  114. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/_docstrings.py +0 -0
  115. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/_statistics.py +0 -0
  116. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/_testing.py +0 -0
  117. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/algorithms.py +0 -0
  118. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/apionly.py +0 -0
  119. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/axisgrid.py +0 -0
  120. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/categorical.py +0 -0
  121. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/cm.py +0 -0
  122. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/colors/__init__.py +0 -0
  123. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/colors/crayons.py +0 -0
  124. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/colors/xkcd_rgb.py +0 -0
  125. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/conftest.py +0 -0
  126. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/distributions.py +0 -0
  127. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/external/__init__.py +0 -0
  128. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/external/docscrape.py +0 -0
  129. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/external/husl.py +0 -0
  130. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/external/six.py +0 -0
  131. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/linearmodels.py +0 -0
  132. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/matrix.py +0 -0
  133. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/miscplot.py +0 -0
  134. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/palettes.py +0 -0
  135. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/rcmod.py +0 -0
  136. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/regression.py +0 -0
  137. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/relational.py +0 -0
  138. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/__init__.py +0 -0
  139. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_algorithms.py +0 -0
  140. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_axisgrid.py +0 -0
  141. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_categorical.py +0 -0
  142. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_core.py +0 -0
  143. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_decorators.py +0 -0
  144. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_distributions.py +0 -0
  145. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_docstrings.py +0 -0
  146. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_matrix.py +0 -0
  147. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_miscplot.py +0 -0
  148. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_palettes.py +0 -0
  149. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_rcmod.py +0 -0
  150. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_regression.py +0 -0
  151. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_relational.py +0 -0
  152. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_statistics.py +0 -0
  153. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/tests/test_utils.py +0 -0
  154. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/timeseries.py +0 -0
  155. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/utils.py +0 -0
  156. {grplot-0.14.4 → grplot-0.14.5}/grplot_seaborn/widgets.py +0 -0
  157. {grplot-0.14.4 → grplot-0.14.5}/pyproject.toml +0 -0
  158. {grplot-0.14.4 → grplot-0.14.5}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: grplot
3
- Version: 0.14.4
3
+ Version: 0.14.5
4
4
  Summary: grplot: lazy statistical data visualization
5
5
  Home-page: https://github.com/ghiffaryr/grplot
6
6
  Download-URL: https://github.com/ghiffaryr/grplot
@@ -202,7 +202,7 @@ def plot2d(plot, # default general value
202
202
  by ghiffary rifqialdi
203
203
  based on numpy, scipy, matplotlib, seaborn, squarify, pandas, and ipython
204
204
 
205
- version = '0.14.4'
205
+ version = '0.14.5'
206
206
 
207
207
  release date
208
208
  14/02/2026
@@ -1,4 +1,5 @@
1
1
  from pandas.api.types import is_float_dtype, is_integer_dtype
2
+ from grplot.utils.trim_to_3_nonzero_after_decimal import trim_to_3_nonzero_after_decimal
2
3
 
3
4
 
4
5
  def statdesc_sep_def(num, sep):
@@ -8,8 +9,8 @@ def statdesc_sep_def(num, sep):
8
9
  if (sep in [',c', ',cL']) and (abs(num) >= 0.01):
9
10
  num = '{:,.2f}'.format(num)
10
11
  else:
11
- num = '{:,}'.format(num)
12
- else: # abs(num) >= 1
12
+ num = trim_to_3_nonzero_after_decimal(num, dec_point='.')
13
+ else: # abs(num) >= 1
13
14
  if sep in [',c', ',cL']:
14
15
  num = '{:,.2f}'.format(num)
15
16
  else:
@@ -28,8 +29,8 @@ def statdesc_sep_def(num, sep):
28
29
  if (sep in ['.c', '.cL']) and (abs(num) >= 0.01):
29
30
  num = '{:,.2f}'.format(num).replace(',', '~').replace('.', ',').replace('~', '.')
30
31
  else:
31
- num = '{:,}'.format(num).replace(',', '~').replace('.', ',').replace('~', '.')
32
- else: # abs(num) >= 1
32
+ num = trim_to_3_nonzero_after_decimal(num, dec_point=',')
33
+ else: # abs(num) >= 1
33
34
  if sep in ['.c', '.cL']:
34
35
  num = '{:,.2f}'.format(num).replace(',', '~').replace('.', ',').replace('~', '.')
35
36
  else:
@@ -0,0 +1,37 @@
1
+ from decimal import Decimal
2
+
3
+
4
+ def trim_to_3_nonzero_after_decimal(num, dec_point='.'):
5
+ """
6
+ For |num| < 1: return a string truncated at the digit that contains the 3rd
7
+ non-zero digit after the decimal point. Zeros between non-zero digits are kept.
8
+ Examples:
9
+ 0.000123456 -> '0.000123'
10
+ 0.004560078 -> '0.00456'
11
+ 0.12 -> '0.12'
12
+ """
13
+ sign = '-' if num < 0 else ''
14
+ n = abs(num)
15
+ d = Decimal(str(n))
16
+ s = format(d, 'f') # full decimal expansion, no exponent
17
+ if '.' not in s:
18
+ return sign + s.replace('.', dec_point)
19
+ int_part, frac = s.split('.')
20
+
21
+ nonzero = 0
22
+ cut = None
23
+ for i, ch in enumerate(frac):
24
+ if ch != '0':
25
+ nonzero += 1
26
+ if nonzero == 3:
27
+ cut = i
28
+ break
29
+
30
+ if cut is None:
31
+ # fewer than 3 non-zero digits -> strip trailing zeros
32
+ frac = frac.rstrip('0')
33
+ if not frac:
34
+ return sign + int_part.replace('.', dec_point)
35
+ return sign + int_part + dec_point + frac
36
+ else:
37
+ return sign + int_part + dec_point + frac[: cut + 1]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: grplot
3
- Version: 0.14.4
3
+ Version: 0.14.5
4
4
  Summary: grplot: lazy statistical data visualization
5
5
  Home-page: https://github.com/ghiffaryr/grplot
6
6
  Download-URL: https://github.com/ghiffaryr/grplot
@@ -107,6 +107,7 @@ grplot/utils/check_pandas_index.py
107
107
  grplot/utils/first_valid_index.py
108
108
  grplot/utils/scientific_superscript.py
109
109
  grplot/utils/strtoarray.py
110
+ grplot/utils/trim_to_3_nonzero_after_decimal.py
110
111
  grplot_seaborn/__init__.py
111
112
  grplot_seaborn/_core.py
112
113
  grplot_seaborn/_decorators.py
@@ -1,7 +1,7 @@
1
1
  from setuptools import setup
2
2
 
3
3
  DISTNAME = "grplot"
4
- VERSION = "0.14.4"
4
+ VERSION = "0.14.5"
5
5
  MAINTAINER = "Ghiffary Rifqialdi"
6
6
  MAINTAINER_EMAIL = "grifqialdi@gmail.com"
7
7
  DESCRIPTION = "grplot: lazy statistical data visualization"
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