modusa 0.3.44__py3-none-any.whl → 0.3.45__py3-none-any.whl

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.
modusa/tools/plotter.py CHANGED
@@ -301,7 +301,7 @@ class Figure1D:
301
301
  # remove duplicates if needed
302
302
  fig.legend(all_handles, all_labels, loc='upper right', bbox_to_anchor=(0.9, ypos), ncol=2, frameon=True, bbox_transform=fig.transFigure)
303
303
 
304
- def add_meta_info(self, title="Title", ylabel="Y", xlabel="X"):
304
+ def add_meta_info(self, title=None, ylabel=None, xlabel=None):
305
305
  """
306
306
  Add meta info to the figure.
307
307
 
@@ -309,15 +309,15 @@ class Figure1D:
309
309
  ----------
310
310
  title: str
311
311
  - Title of the figure.
312
- - Default: "Title"
312
+ - Default: None
313
313
  ylabel: str
314
314
  - y label of the signal.
315
315
  - It will only appear in the signal subplot.
316
- - Default: "Y"
316
+ - Default: None
317
317
  xlabel: str
318
318
  - x label of the signal.
319
319
  - It will only appear in the signal subplot.
320
- - Default: "X"
320
+ - Default: None
321
321
 
322
322
  Returns
323
323
  -------
@@ -329,9 +329,12 @@ class Figure1D:
329
329
  ref_subplot = subplots[0]
330
330
  signal_subplot = subplots[-1]
331
331
 
332
- ref_subplot.set_title(title, pad=10, size=14)
333
- signal_subplot.set_xlabel(xlabel, size=12)
334
- signal_subplot.set_ylabel(ylabel, size=12)
332
+ if title is not None:
333
+ ref_subplot.set_title(title, pad=10, size=14)
334
+ if ylabel is not None:
335
+ signal_subplot.set_ylabel(ylabel, size=10)
336
+ if xlabel is not None:
337
+ signal_subplot.set_xlabel(xlabel, size=10)
335
338
 
336
339
 
337
340
  def save(self, path="./figure.png"):
@@ -690,7 +693,7 @@ class Figure2D:
690
693
  # remove duplicates if needed
691
694
  fig.legend(all_handles, all_labels, loc='upper right', bbox_to_anchor=(0.9, ypos), ncol=2, frameon=True, bbox_transform=fig.transFigure)
692
695
 
693
- def add_meta_info(self, title="Title", ylabel="Y", xlabel="X"):
696
+ def add_meta_info(self, title=None, ylabel=None, xlabel=None):
694
697
  """
695
698
  Add meta info to the figure.
696
699
 
@@ -698,15 +701,15 @@ class Figure2D:
698
701
  ----------
699
702
  title: str
700
703
  - Title of the figure.
701
- - Default: "Title"
704
+ - Default: None
702
705
  ylabel: str
703
706
  - y label of the signal.
704
707
  - It will only appear in the signal subplot.
705
- - Default: "Y"
708
+ - Default: None
706
709
  xlabel: str
707
710
  - x label of the signal.
708
711
  - It will only appear in the signal subplot.
709
- - Default: "X"
712
+ - Default: None
710
713
 
711
714
  Returns
712
715
  -------
@@ -718,10 +721,12 @@ class Figure2D:
718
721
  ref_subplot = subplots[0]
719
722
  signal_subplot = subplots[-1]
720
723
 
721
- ref_subplot.set_title(title, pad=10, size=14)
722
- signal_subplot.set_xlabel(xlabel, size=12)
723
- signal_subplot.set_ylabel(ylabel, size=12)
724
-
724
+ if title is not None:
725
+ ref_subplot.set_title(title, pad=10, size=14)
726
+ if ylabel is not None:
727
+ signal_subplot.set_ylabel(ylabel, size=10)
728
+ if xlabel is not None:
729
+ signal_subplot.set_xlabel(xlabel, size=10)
725
730
 
726
731
  def save(self, path="./figure.png"):
727
732
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: modusa
3
- Version: 0.3.44
3
+ Version: 0.3.45
4
4
  Summary: A modular signal analysis python library.
5
5
  Author-Email: Ankit Anand <ankit0.anand0@gmail.com>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- modusa-0.3.44.dist-info/METADATA,sha256=8OSPXPrH23lh6qk3p6419_8dZDv-C0Pm2u4-n5eB7lw,1403
2
- modusa-0.3.44.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
- modusa-0.3.44.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
- modusa-0.3.44.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
1
+ modusa-0.3.45.dist-info/METADATA,sha256=48KQYVR2GUnbfgZdxl902F7SdgbRAcbSdWoLV4jQuQY,1403
2
+ modusa-0.3.45.dist-info/WHEEL,sha256=9P2ygRxDrTJz3gsagc0Z96ukrxjr-LFBGOgv3AuKlCA,90
3
+ modusa-0.3.45.dist-info/entry_points.txt,sha256=fmKpleVXj6CdaBVL14WoEy6xx7JQCs85jvzwTi3lePM,73
4
+ modusa-0.3.45.dist-info/licenses/LICENSE.md,sha256=JTaXAjx5awk76VArKCx5dUW8vmLEWsL_ZlR7-umaHbA,1078
5
5
  modusa/.DS_Store,sha256=_gm6qJREwfMi8dE7n5S89_RG46u5t3xHyD-smNhtNoM,6148
6
6
  modusa/__init__.py,sha256=9KctzIbijMry7LBlzD2XYan9LluBFsnTBhP8CcctVXY,286
7
7
  modusa/config.py,sha256=bTqK4t00FZqERVITrxW_q284aDDJAa9aMSfFknfR-oU,280
@@ -50,7 +50,7 @@ modusa/tools/audio_player.py,sha256=GP04TWW4jBwQBjANkfR_cJtEy7cIhvbu8RTwnf9hD6E,
50
50
  modusa/tools/audio_recorder.py,sha256=d2fVt0Sd2tlBdb2WlUs60K4N23zuxM3KUpQqX0ifPi8,2769
51
51
  modusa/tools/base.py,sha256=C0ESJ0mIfjjRlAkRbSetNtMoOfS6IrHBjexRp3l_Mh4,1293
52
52
  modusa/tools/math_ops.py,sha256=ZZ7U4DgqT7cOeE7_Lzi_Qq-48WYfwR9_osbZwTmE9eg,8690
53
- modusa/tools/plotter.py,sha256=8NmmZX7XHKwBwsycUWN493lQY6o3JO_TDrdZZVBHDdU,23523
53
+ modusa/tools/plotter.py,sha256=ElEeYWXpEEcwERu0NhuLz2S3aRkAX4Ua2ZueR1QFfWQ,23670
54
54
  modusa/tools/youtube_downloader.py,sha256=hB_X8-7nOHXOlxg6vv3wyhBLoAsWyomrULP6_uCQL7s,1698
55
55
  modusa/utils/.DS_Store,sha256=nLXMwF7QJNuglLI_Gk74F7vl5Dyus2Wd74Mgowijmdo,6148
56
56
  modusa/utils/__init__.py,sha256=1oLL20yLB1GL9IbFiZD8OReDqiCpFr-yetIR6x1cNkI,23
@@ -59,4 +59,4 @@ modusa/utils/excp.py,sha256=L9vhaGjKpv9viJYdmC9n5ndmk2GVbUBuFyZyhAQZmWY,906
59
59
  modusa/utils/logger.py,sha256=K0rsnObeNKCxlNeSnVnJeRhgfmob6riB2uyU7h3dDmA,571
60
60
  modusa/utils/np_func_cat.py,sha256=TyIFgRc6bARRMDnZxlVURO5Z0I-GWhxRONYyIv-Vwxs,1007
61
61
  modusa/utils/plot.py,sha256=s_vNdxvKfwxEngvJPgrF1PcmxZNnNaaXPViHWjyjJ-c,5335
62
- modusa-0.3.44.dist-info/RECORD,,
62
+ modusa-0.3.45.dist-info/RECORD,,