def test_station_plot_replace(): 'Test that locations are properly replaced' setup_font() fig = make_figure(figsize=(3, 3)) # testing data x = np.array([1]) y = np.array([1]) # Make the plot sp = StationPlot(fig.add_subplot(1, 1, 1), x, y, fontsize=16) sp.plot_barb([20], [0]) sp.plot_barb([5], [0]) sp.plot_parameter('NW', [10.5], color='red') sp.plot_parameter('NW', [20], color='blue') sp.ax.set_xlim(-3, 3) sp.ax.set_ylim(-3, 3) hide_tick_labels(sp.ax) return fig
def test_stationplot_api(): 'Test the StationPlot api' setup_font() fig = make_figure(figsize=(9, 9)) # testing data x = np.array([1, 5]) y = np.array([2, 4]) # Make the plot sp = StationPlot(fig.add_subplot(1, 1, 1), x, y, fontsize=16) sp.plot_barb([20, 0], [0, -50]) sp.plot_text('E', ['KOKC', 'ICT'], color='blue') sp.plot_parameter('NW', [10.5, 15], color='red') sp.plot_symbol('S', [5, 7], high_clouds, color='green') sp.ax.set_xlim(0, 6) sp.ax.set_ylim(0, 6) hide_tick_labels(sp.ax) return fig