def test_make_plot_9plots_lf(self): """Test make_plot""" print(sys._getframe().f_code.co_name) try: x1 = np.arange(0, 6) * 300000 y1 = np.arange(0, 6) x2 = np.arange(0, 6) * 300000 y2 = np.arange(0, 6) x3 = np.arange(0, 6) * 300000 y3 = np.arange(0, 6) x4 = np.arange(0, 6) * 300000 y4 = np.arange(0, 6) x5 = np.arange(0, 6) * 300000 y5 = np.arange(0, 6) x6 = np.arange(0, 6) * 300000 y6 = np.arange(0, 6) x7 = np.arange(0, 6) * 300000 y7 = np.arange(0, 6) x8 = np.arange(0, 6) * 300000 y8 = np.arange(0, 6) x9 = np.arange(0, 6) * 300000 y9 = np.arange(0, 6) x = [x1, x2, x3, x4, x5, x6, x7, x8, x9] y = [y1, y2, y3, y4, y5, y6, y7, y8, y9] pp.make_plot(x, y) except Exception as e: raise plt.close('all')
def test_make_plot_cutoff(self): """Test make_plot""" print(sys._getframe().f_code.co_name) try: x = np.arange(0, 6) * 300000 y = np.arange(0, 6) pp.make_plot(x, y, freq_cutoff=600000) except Exception as e: raise plt.close('all')
def test_make_plot_ui(self): """Test make_plot with ui plot_type""" print(sys._getframe().f_code.co_name) try: x = np.arange(0, 6) * 300000 y = np.arange(0, 6) pp.make_plot(x, y, plot_type='ui') except Exception as e: raise plt.close('all')
def test_save_plot(self): """Test publish""" print(sys._getframe().f_code.co_name) with patch('permittivitycalc.pplot._dirprompt', return_value='./'): try: x = np.arange(0, 6) * 300000 y = np.arange(0, 6) pp.make_plot(x, y, publish=True, name='test') except Exception as e: raise plt.close('all')
def test_make_plot_2plots(self): """Test make_plot""" print(sys._getframe().f_code.co_name) try: x1 = np.arange(0, 6) * 300000 y1 = np.arange(0, 6) x2 = np.arange(0, 6) * 300000 y2 = np.arange(0, 6) x = [x1, x2] y = [y1, y2] pp.make_plot(x, y) except Exception as e: raise plt.close('all')
def test_make_plot_log(self): """Test make_plot with log plot""" print(sys._getframe().f_code.co_name) try: x = np.arange(0, 6) * 300000 y = np.arange(0, 6) pp.make_plot(x, y, plot_type='d', y_axis_type='log', xticks=[0, 1, 2, 3], yticks=[0, 1, 2, 3]) except Exception as e: raise plt.close('all')
def test_make_plot_custom(self): """Test make_plot with custom plot_type""" print(sys._getframe().f_code.co_name) try: x = np.arange(0, 6) * 300000 y = np.arange(0, 6) pp.make_plot(x, y, plot_type='c', plot_title='test', ylabel='test', xlabel='test', xticks=[0, 2, 4, 6], yticks=[0, 2, 4, 6]) except Exception as e: raise plt.close('all')
def test_make_plot_log_flat(self): """Test make_plot with log plot""" print(sys._getframe().f_code.co_name) try: x = np.arange(0, 6) * 300000 y = [1, 2, 3, 4, 5, 6] pp.make_plot(x, y, plot_type='d', y_axis_type='log', xticks=[0, 1, 2, 3], yticks=[0, 1, 2, 3]) y = [-0.00005, -0.00004, -0.00003, -0.00002, -0.00001, 0] pp.make_plot(x, y, plot_type='lt', y_axis_type='log', xticks=[0, 1, 2, 3], yticks=[0, 1, 2, 3]) except Exception as e: raise plt.close('all')