Skip to content

Commit 5787047

Browse files
committed
plotting unit test and doc updates
1 parent b5c5ace commit 5787047

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

quantum_inferno/plot_templates/plot_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ class WaveformPlotBase(PlotBase):
174174
175175
Attributes:
176176
label_panel_show: bool, if True, show the label. Default False
177-
labels_fontweight: optional str, font weight of the labels. Default None
177+
labels_fontweight: optional str, font weight of the labels. Default "bold"
178178
waveform_color: optional str, color of the waveform. Default None
179179
"""
180180
label_panel_show: bool = False

quantum_inferno/tests/plot_templates/test_plot_base.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ def test_mesh_base(self):
2727
self.assertEqual(test_mesh_base.frequency_hz_ymax, 3)
2828
self.assertIsNone(test_mesh_base.colormap)
2929
self.assertEqual(test_mesh_base.units_frequency, "Hz")
30+
test_mesh_base = pb.MeshBase(time=np.array([0, 1, 2, 3]), frequency=np.array([0, 1, 2, 3]))
31+
self.assertEqual(test_mesh_base.frequency_hz_ymin, 1)
32+
self.assertEqual(test_mesh_base.frequency_hz_ymax, 3)
3033

3134
def test_mesh_base_freq_scal(self):
3235
test_mesh_base = pb.MeshBase(time=np.array([1, 2, 3]), frequency=np.array([1, 2, 3]),
@@ -69,6 +72,7 @@ class MeshPanelTest(unittest.TestCase):
6972
def test_mesh_panel(self):
7073
test_mesh_panel = pb.MeshPanel(tfr=np.array([1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))
7174
self.assertTrue(test_mesh_panel.is_auto_color_min_max())
75+
self.assertEqual(test_mesh_panel.panel_label_color, "k")
7276

7377
def test_mesh_user_panel(self):
7478
test_mesh_panel = pb.MeshPanel(tfr=np.array([1, 2, 3]), colormap_scaling="user", color_min=5, color_max=10)
@@ -85,7 +89,7 @@ class WaveformBaseTest(unittest.TestCase):
8589
def test_waveform_base(self):
8690
test_wf_base = pb.WaveformPlotBase(station_id="test", figure_title="test")
8791
self.assertFalse(test_wf_base.label_panel_show)
88-
self.assertIsNone(test_wf_base.labels_fontweight)
92+
self.assertEqual(test_wf_base.labels_fontweight, "bold")
8993
self.assertIsNone(test_wf_base.waveform_color)
9094

9195

@@ -96,6 +100,7 @@ def test_waveform_panel(self):
96100
self.assertEqual(test_wf_panel.label, "(wf)")
97101
self.assertEqual(test_wf_panel.yscaling, "auto")
98102
self.assertEqual(test_wf_panel.ytick_style, "plain")
103+
self.assertEqual(test_wf_panel.panel_label_color, "k")
99104

100105
def test_waveform_panel_yscaling(self):
101106
test_wf_panel = pb.WaveformPanel(sig=np.array([1, 2, 3]), time=np.array([1, 2, 3]), yscaling="test")

0 commit comments

Comments
 (0)