matplotlib / matplotlib/basemap

Hollow markers are not transparent

オープン
#455 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
817
フォーク
395
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello,

When I tried to plot hollow markers on the map, the marker is actually filled, not transparent. See this map below:

![image](https://user-images.githubusercontent.com/25124332/54645888-a3f89480-4a5a-11e9-8345-dec0ccb351c1.png)

Below is the code to reproduce this map:

```python
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap

lon_ll = -124.5 # lower left corner, longitude
lon_ur = -105.2 # upper right corner, longitude
lat_ll = 32.0 # lower left corner, latitude
lat_ur = 42.0 # upper right corner, latitude

f = plt.figure(dpi=100)
ax = plt.axes()

m = Basemap(llcrnrlon=lon_ll,llcrnrlat=lat_ll,
urcrnrlon=lon_ur,urcrnrlat=lat_ur,\
rsphere=(6378137.00,6356752.3142),\
resolution='c',projection='merc',\
lat_0=(lat_ll+lat_ur)/2,\
lon_0=(lon_ll+lon_ur)/2,lat_ts=20.,
epsg = 3310)

m.arcgisimage(service='World_Physical_Map', xpixels=120, epsg=3310, verbose=False)

m.drawstates()

LA = (34.05, -118.25)
LV = (36.175, -115.136389)
SF = (37.783333, -122.416667)
PH = (33.45, -112.066667)

ms = 15
alpha = 0.75

m.plot(*m(LV[1], LV[0]), marker='s', ms=ms,
ls='none', mew=1.25,c='blue', fillstyle='none', alpha=alpha)
m.plot(*m(LA[1], LA[0]), marker='o', ms=ms,
ls='none', mew=1.25,c='red', fillstyle='right', alpha=alpha)
m.plot(*m(PH[1], PH[0]), marker='o', ms=ms,
ls='none', mew=1.25,c='green', fillstyle='full', alpha=alpha)
m.plot(*m(SF[1], SF[0]), marker='o', ms=ms,
ls='none', mew=1.25,c='cyan', fillstyle='left', alpha=alpha,
markerfacecoloralt='white')

horiz_offset = 0.6 # unit: degrees
plt.text(*m(LA[1] + horiz_offset, LA[0]), 'Los Angeles')
plt.text(*m(LV[1] + horiz_offset, LV[0]), 'Las Vegas')
plt.text(*m(SF[1] + horiz_offset, SF[0]), 'San Francisco')
plt.text(*m(PH[1] + horiz_offset, PH[0]), 'Phoenix')
```

The markers for Los Angeles and Las Vegas should have been hollow (on the left side for LA, and fully for LV), but they are not. For half-full markers, such as the marker for San Francisco, I can set the `markerfacecoloralt` to other colors, but not for fully open markers.

- Operating system: Windows 10
- Python version: 3.6.6
- Basemap version: both 1.1.0 and 1.2.0 have this issue
- matplotlib version: 2.2.2

Note that I used to *not* have this issue some time ago, with older versions of matplotlib (I don't remember which).

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、指定された Basemap と matplotlib のバージョンで、提供された Python の再現コードを実行し、m.plot エントリポイントと、中抜き、半分塗り、完全塗りのマーカーに注目します。レンダリングされた出力を issue に記載された期待される透明度と比較し、その後、中抜きマーカーが塗りつぶしなしでレンダリングされ、他のマーカースタイルは変更されないことを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
data-visualization
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。