def test_nws_layout(): """Test metpy's NWS layout for station plots.""" fig = plt.figure(figsize=(3, 3)) # testing data x = np.array([1]) y = np.array([2]) data = {'air_temperature': np.array([77]) * units.degF, 'dew_point_temperature': np.array([71]) * units.degF, 'air_pressure_at_sea_level': np.array([999.8]) * units('mbar'), 'eastward_wind': np.array([15.]) * units.knots, 'northward_wind': np.array([15.]) * units.knots, 'cloud_coverage': [7], 'present_weather': [80], 'high_cloud_type': [1], 'medium_cloud_type': [3], 'low_cloud_type': [2], 'visibility_in_air': np.array([5.]) * units.mile, 'tendency_of_air_pressure': np.array([-0.3]) * units('mbar'), 'tendency_of_air_pressure_symbol': [8]} # Make the plot sp = StationPlot(fig.add_subplot(1, 1, 1), x, y, fontsize=12, spacing=16) nws_layout.plot(sp, data) sp.ax.set_xlim(0, 3) sp.ax.set_ylim(0, 3) return fig
def test_nws_layout(): """Test metpy's NWS layout for station plots.""" fig = plt.figure(figsize=(3, 3)) # testing data x = np.array([1]) y = np.array([2]) data = {'air_temperature': np.array([77]) * units.degF, 'dew_point_temperature': np.array([71]) * units.degF, 'air_pressure_at_sea_level': np.array([999.8]) * units('mbar'), 'eastward_wind': np.array([15.]) * units.knots, 'northward_wind': np.array([15.]) * units.knots, 'cloud_coverage': [7], 'present_weather': [80], 'high_cloud_type': [1], 'medium_cloud_type': [3], 'low_cloud_type': [2], 'visibility_in_air': np.array([5.]) * units.mile, 'tendency_of_air_pressure': np.array([-0.3]) * units('mbar'), 'tendency_of_air_pressure_symbol': [8]} # Make the plot sp = StationPlot(fig.add_subplot(1, 1, 1), x, y, fontsize=12, spacing=16) nws_layout.plot(sp, data) sp.ax.set_xlim(0, 3) sp.ax.set_ylim(0, 3) return fig
def test_nws_layout(): """Test metpy's NWS layout for station plots.""" fig = plt.figure(figsize=(3, 3)) # testing data x = np.array([1]) y = np.array([2]) data = dict() data["air_temperature"] = np.array([77]) * units.degF data["dew_point_temperature"] = np.array([71]) * units.degF data["air_pressure_at_sea_level"] = np.array([999.8]) * units("mbar") data["eastward_wind"] = np.array([15.0]) * units.knots data["northward_wind"] = np.array([15.0]) * units.knots data["cloud_coverage"] = [7] data["present_weather"] = [80] data["high_cloud_type"] = [1] data["medium_cloud_type"] = [3] data["low_cloud_type"] = [2] data["visibility_in_air"] = np.array([5.0]) * units.mile data["tendency_of_air_pressure"] = np.array([-0.3]) * units("mbar") data["tendency_of_air_pressure_symbol"] = [8] # Make the plot sp = StationPlot(fig.add_subplot(1, 1, 1), x, y, fontsize=12, spacing=16) nws_layout.plot(sp, data) sp.ax.set_xlim(0, 3) sp.ax.set_ylim(0, 3) return fig