Open poplarShift opened 5 years ago
Thanks for the issue, and yes, that logic should be used here too.
For the record, when specifying color
, the matplotlib backend still gives filled Polygons even for LineStrings:
import geoviews as gv
from shapely.geometry import LineString
gv.extension('matplotlib')
gv.Shape(LineString([(0,0),(0,1),(1,0)])).opts(xlim=(-.5,1.5), ylim=(-.5,1.5), color='red')
This is easy to fix, one would just have to pass the color option into "facecolor" instead. Currently that might be non-intuitive for end users.
Is there a reason for this behaviour? Could the same logic that is currently used for the bokeh backend be used to implement the distinction for mpl as well?
(If anyone's wondering, I use the mpl backend only for svg export.)
Compare
https://github.com/pyviz/geoviews/blob/56784cddefeca40e969da97f4d029cfa802ce503/geoviews/plotting/bokeh/__init__.py#L171
with
https://github.com/pyviz/geoviews/blob/56784cddefeca40e969da97f4d029cfa802ce503/geoviews/plotting/mpl/__init__.py#L302