From de8c4edb99452144d7da9260f7b13751d6ece8ec Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@8a9318a1-56ba-4d59-b755-99d26321be01> Date: Thu, 16 May 2013 17:04:18 +0000 Subject: [PATCH] cleaning up the tagged data when drawing mapped figures with tag data so that the mask will be plotted correctly when only a few points are true git-svn-id: https://svn.ssec.wisc.edu/repos/glance/trunk@218 8a9318a1-56ba-4d59-b755-99d26321be01 --- pyglance/glance/figures.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyglance/glance/figures.py b/pyglance/glance/figures.py index 3408cd2..740bc88 100644 --- a/pyglance/glance/figures.py +++ b/pyglance/glance/figures.py @@ -190,7 +190,8 @@ def _plot_tag_data_mapped(bMap, tagData, x, y, addExplinationLabel=True) : if (numMismatchPoints > 1000000) : new_kwargs = {} new_kwargs['cmap'] = greenColorMap - p = maps.show_x_y_data(x, y, bMap, data=tagData, **new_kwargs) + cleanTagData = ma.array(tagData, mask=~tagData) + p = maps.show_x_y_data(x, y, bMap, data=cleanTagData, **new_kwargs) else : # plot our point on top of the existing figure p = bMap.plot(newX, newY, '.', color='#00FF00', markersize=1) @@ -483,7 +484,6 @@ def create_mapped_figure(data, latitude, longitude, baseMapInstance, boundingAxe kwargs['cmap'] = colorMap # draw our data placed on a map - #bMap, x, y = maps.mapshow(longitudeClean, latitudeClean, data, boundingAxes, **kwargs) maps.draw_basic_features(baseMapInstance, boundingAxes) bMap, x, y = maps.show_lon_lat_data(longitudeClean, latitudeClean, baseMapInstance, data=data, **kwargs) -- GitLab