Skip to content

Commit ede97c8

Browse files
authored
Merge branch 'deeplycloudy:master' into colorbytime
2 parents 6897fc5 + f0bb273 commit ede97c8

3 files changed

Lines changed: 15 additions & 1 deletion

File tree

pyxlma/plot/xlma_plot_feature.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def plot_points(bk_plot, lon_data, lat_data, alt_data, time_data,
108108
verticalalignment='center',transform=bk_plot.ax_hist.transAxes)
109109
# art_hist is a tuple of patch objects. Make it a flat list of artists
110110
art_out.append(art_txt)
111-
art_out.append(art_hist)
111+
art_out.append(art_hist)
112112
return art_out
113113

114114
def plot_3d_grid(bk_plot, xedges, yedges, zedges, tedges,

tests/test_base_plot.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ def test_plot_feature_plot_points_new_kw_no_bkmap():
7575
return bk_plot.fig
7676

7777

78+
@pytest.mark.mpl_image_compare
79+
def test_plot_feature_plot_points_new_kw_no_hist():
80+
start_time = dt.datetime(2023, 12, 24, 0, 57, 0, 0)
81+
end_time = start_time + dt.timedelta(seconds=60)
82+
bk_plot = BlankPlot(start_time, bkgmap=True, xlim=[-103.5, -99.5], ylim=[31.5, 35.5], zlim=[0, 20], tlim=[start_time, end_time], title='XLMA Test Plot')
83+
dataset = xr.open_dataset('tests/truth/lma_netcdf/lma.nc')
84+
times = pd.Series(dataset.event_time.data.flatten())
85+
vmin, vmax, colors = color_by_time(pd.to_datetime(times), (start_time, end_time))
86+
plot_points(bk_plot, dataset.event_longitude.data, dataset.event_latitude.data, dataset.event_altitude.data/1000,
87+
dataset.event_time.data, cmap='rainbow', s=5, vmin=vmin, vmax=vmax,
88+
c=colors, edgecolors='k', linewidths=0.1, add_to_histogram=False)
89+
return bk_plot.fig
90+
91+
7892
@pytest.mark.mpl_image_compare
7993
def test_plot_feature_plot_3d_grid():
8094
dataset = xr.open_dataset('tests/truth/lma_netcdf/lma.nc')
219 KB
Loading

0 commit comments

Comments
 (0)